[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 09/16] x86: don't setup PV hypercall stubs and entries when !CONFIG_PV



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
v2: new
---
 xen/arch/x86/x86_64/traps.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index 27154f2..2b7ec7d 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -267,6 +267,7 @@ void do_double_fault(struct cpu_user_regs *regs)
     panic("DOUBLE FAULT -- system shutdown\n");
 }
 
+#ifdef CONFIG_PV
 static unsigned int write_stub_trampoline(
     unsigned char *stub, unsigned long stub_va,
     unsigned long stack_bottom, unsigned long target_va)
@@ -296,6 +297,7 @@ static unsigned int write_stub_trampoline(
     /* Round up to a multiple of 16 bytes. */
     return 32;
 }
+#endif
 
 DEFINE_PER_CPU(struct stubs, stubs);
 void lstar_enter(void);
@@ -303,14 +305,17 @@ void cstar_enter(void);
 
 void subarch_percpu_traps_init(void)
 {
+#ifdef CONFIG_PV
     unsigned long stack_bottom = get_stack_bottom();
     unsigned long stub_va = this_cpu(stubs.addr);
     unsigned char *stub_page;
     unsigned int offset;
+#endif
 
     /* IST_MAX IST pages + at least 1 guard page + primary stack. */
     BUILD_BUG_ON((IST_MAX + 1) * PAGE_SIZE + PRIMARY_STACK_SIZE > STACK_SIZE);
 
+#ifdef CONFIG_PV
     stub_page = map_domain_page(_mfn(this_cpu(stubs.mfn)));
 
     /*
@@ -347,6 +352,7 @@ void subarch_percpu_traps_init(void)
     /* Common SYSCALL parameters. */
     wrmsrl(MSR_STAR, XEN_MSR_STAR);
     wrmsrl(MSR_SYSCALL_MASK, XEN_SYSCALL_MASK);
+#endif
 }
 
 void hypercall_page_initialise(struct domain *d, void *hypercall_page)
-- 
git-series 0.9.1

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.