[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 01/18] x86/traps: factor out pv_percpu_traps_init
The body of subarch_percpu_traps_init is for setting up PV syscall trampoline. Move that into a dedicated function. Leave the BUILD_BUG_ON in the original function as it is not tied to PV. No functional change. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/x86_64/traps.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index ad4d6c1f44..a237f4d5c2 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -374,16 +374,13 @@ DEFINE_PER_CPU(struct stubs, stubs); void lstar_enter(void); void cstar_enter(void); -void subarch_percpu_traps_init(void) +static void pv_percpu_traps_init(void) { unsigned long stack_bottom = get_stack_bottom(); unsigned long stub_va = this_cpu(stubs.addr); unsigned char *stub_page; unsigned int offset; - /* IST_MAX IST pages + 1 syscall page + 1 guard page + primary stack. */ - BUILD_BUG_ON((IST_MAX + 2) * PAGE_SIZE + PRIMARY_STACK_SIZE > STACK_SIZE); - stub_page = map_domain_page(_mfn(this_cpu(stubs.mfn))); /* @@ -422,6 +419,14 @@ void subarch_percpu_traps_init(void) wrmsrl(MSR_SYSCALL_MASK, XEN_SYSCALL_MASK); } +void subarch_percpu_traps_init(void) +{ + /* IST_MAX IST pages + 1 syscall page + 1 guard page + primary stack. */ + BUILD_BUG_ON((IST_MAX + 2) * PAGE_SIZE + PRIMARY_STACK_SIZE > STACK_SIZE); + + pv_percpu_traps_init(); +} + void init_int80_direct_trap(struct vcpu *v) { struct trap_info *ti = &v->arch.pv_vcpu.trap_ctxt[0x80]; -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |