diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 11:41:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 11:41:21 -0400 |
commit | 1e2f5b598aa56c3978c2e623f72e9656a565c6c9 (patch) | |
tree | 31b3a7555ac7c1d9a856adc0436ed9943c9cab36 /arch/x86/power | |
parent | f9b3bcfbc43ac80f2019a5093ad9a1e624e611b1 (diff) | |
parent | 4d681be3c33dd74efffbe2a8f70634f7128602ec (diff) |
Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 paravirt update from Ingo Molnar:
"Various paravirtualization related changes - the biggest one makes
guest support optional via CONFIG_HYPERVISOR_GUEST"
* 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, wakeup, sleep: Use pvops functions for changing GDT entries
x86, xen, gdt: Remove the pvops variant of store_gdt.
x86-32, gdt: Store/load GDT for ACPI S3 or hibernation/resume path is not needed
x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path is not needed.
x86: Make Linux guest support optional
x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu
Diffstat (limited to 'arch/x86/power')
-rw-r--r-- | arch/x86/power/cpu.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 3c68768d7a75..6d6e907cee46 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c | |||
@@ -62,11 +62,9 @@ static void __save_processor_state(struct saved_context *ctxt) | |||
62 | * descriptor tables | 62 | * descriptor tables |
63 | */ | 63 | */ |
64 | #ifdef CONFIG_X86_32 | 64 | #ifdef CONFIG_X86_32 |
65 | store_gdt(&ctxt->gdt); | ||
66 | store_idt(&ctxt->idt); | 65 | store_idt(&ctxt->idt); |
67 | #else | 66 | #else |
68 | /* CONFIG_X86_64 */ | 67 | /* CONFIG_X86_64 */ |
69 | store_gdt((struct desc_ptr *)&ctxt->gdt_limit); | ||
70 | store_idt((struct desc_ptr *)&ctxt->idt_limit); | 68 | store_idt((struct desc_ptr *)&ctxt->idt_limit); |
71 | #endif | 69 | #endif |
72 | store_tr(ctxt->tr); | 70 | store_tr(ctxt->tr); |
@@ -135,7 +133,10 @@ static void fix_processor_context(void) | |||
135 | { | 133 | { |
136 | int cpu = smp_processor_id(); | 134 | int cpu = smp_processor_id(); |
137 | struct tss_struct *t = &per_cpu(init_tss, cpu); | 135 | struct tss_struct *t = &per_cpu(init_tss, cpu); |
138 | 136 | #ifdef CONFIG_X86_64 | |
137 | struct desc_struct *desc = get_cpu_gdt_table(cpu); | ||
138 | tss_desc tss; | ||
139 | #endif | ||
139 | set_tss_desc(cpu, t); /* | 140 | set_tss_desc(cpu, t); /* |
140 | * This just modifies memory; should not be | 141 | * This just modifies memory; should not be |
141 | * necessary. But... This is necessary, because | 142 | * necessary. But... This is necessary, because |
@@ -144,7 +145,9 @@ static void fix_processor_context(void) | |||
144 | */ | 145 | */ |
145 | 146 | ||
146 | #ifdef CONFIG_X86_64 | 147 | #ifdef CONFIG_X86_64 |
147 | get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS].type = 9; | 148 | memcpy(&tss, &desc[GDT_ENTRY_TSS], sizeof(tss_desc)); |
149 | tss.type = 0x9; /* The available 64-bit TSS (see AMD vol 2, pg 91 */ | ||
150 | write_gdt_entry(desc, GDT_ENTRY_TSS, &tss, DESC_TSS); | ||
148 | 151 | ||
149 | syscall_init(); /* This sets MSR_*STAR and related */ | 152 | syscall_init(); /* This sets MSR_*STAR and related */ |
150 | #endif | 153 | #endif |
@@ -183,11 +186,9 @@ static void __restore_processor_state(struct saved_context *ctxt) | |||
183 | * ltr is done i fix_processor_context(). | 186 | * ltr is done i fix_processor_context(). |
184 | */ | 187 | */ |
185 | #ifdef CONFIG_X86_32 | 188 | #ifdef CONFIG_X86_32 |
186 | load_gdt(&ctxt->gdt); | ||
187 | load_idt(&ctxt->idt); | 189 | load_idt(&ctxt->idt); |
188 | #else | 190 | #else |
189 | /* CONFIG_X86_64 */ | 191 | /* CONFIG_X86_64 */ |
190 | load_gdt((const struct desc_ptr *)&ctxt->gdt_limit); | ||
191 | load_idt((const struct desc_ptr *)&ctxt->idt_limit); | 192 | load_idt((const struct desc_ptr *)&ctxt->idt_limit); |
192 | #endif | 193 | #endif |
193 | 194 | ||