Skip to content

Commit d76c4f7

Browse files
jgross1suryasaimadhu
authored andcommitted
x86/cpu: Remove X86_FEATURE_XENPV usage in setup_cpu_entry_area()
Testing of X86_FEATURE_XENPV in setup_cpu_entry_area() can be removed, as this code path is 32-bit only, and Xen PV guests are 64-bit only. Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Dave Hansen <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent dfbd9e4 commit d76c4f7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

arch/x86/mm/cpu_entry_area.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,13 @@ static void __init setup_cpu_entry_area(unsigned int cpu)
138138
pgprot_t tss_prot = PAGE_KERNEL_RO;
139139
#else
140140
/*
141-
* On native 32-bit systems, the GDT cannot be read-only because
141+
* On 32-bit systems, the GDT cannot be read-only because
142142
* our double fault handler uses a task gate, and entering through
143143
* a task gate needs to change an available TSS to busy. If the
144144
* GDT is read-only, that will triple fault. The TSS cannot be
145145
* read-only because the CPU writes to it on task switches.
146-
*
147-
* On Xen PV, the GDT must be read-only because the hypervisor
148-
* requires it.
149146
*/
150-
pgprot_t gdt_prot = boot_cpu_has(X86_FEATURE_XENPV) ?
151-
PAGE_KERNEL_RO : PAGE_KERNEL;
147+
pgprot_t gdt_prot = PAGE_KERNEL;
152148
pgprot_t tss_prot = PAGE_KERNEL;
153149
#endif
154150

0 commit comments

Comments
 (0)