diff options
author | Mukesh Rathor <mukesh.rathor@oracle.com> | 2014-09-10 16:36:06 -0700 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-10-06 10:27:47 +0100 |
commit | a2ef5dc2c7cbedbeb4c847039845afaea5e63745 (patch) | |
tree | 0dc9014daac67ace499d36cd1051cda7acc68271 /arch/x86/xen/smp.h | |
parent | d1e9abd630fe66046087f6501a4e4b8de55f7ab9 (diff) |
x86/xen: Set EFER.NX and EFER.SCE in PVH guests
This fixes two bugs in PVH guests:
- Not setting EFER.NX means the NX bit in page table entries is
ignored on Intel processors and causes reserved bit page faults on
AMD processors.
- After the Xen commit 7645640d6ff1 ("x86/PVH: don't set EFER_SCE for
pvh guest") PVH guests are required to set EFER.SCE to enable the
SYSCALL instruction.
Secondary VCPUs are started with pagetables with the NX bit set so
EFER.NX must be set before using any stack or data segment.
xen_pvh_cpu_early_init() is the new secondary VCPU entry point that
sets EFER before jumping to cpu_bringup_and_idle().
Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/x86/xen/smp.h')
-rw-r--r-- | arch/x86/xen/smp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/xen/smp.h b/arch/x86/xen/smp.h index c7c2d89efd76..963d62a35c82 100644 --- a/arch/x86/xen/smp.h +++ b/arch/x86/xen/smp.h @@ -8,4 +8,12 @@ extern void xen_send_IPI_allbutself(int vector); extern void xen_send_IPI_all(int vector); extern void xen_send_IPI_self(int vector); +#ifdef CONFIG_XEN_PVH +extern void xen_pvh_early_cpu_init(int cpu, bool entry); +#else +static inline void xen_pvh_early_cpu_init(int cpu, bool entry) +{ +} +#endif + #endif |