From 67a4e7aca39fdd373f6dd88d0eccf4ce10d3055b Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 8 Jun 2017 17:02:08 +0100 Subject: [PATCH] x86/traps: move init_int80_direct_trap to pv/traps.c Signed-off-by: Wei Liu Acked-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/pv/traps.c | 14 ++++++++++++++ xen/arch/x86/x86_64/traps.c | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/pv/traps.c b/xen/arch/x86/pv/traps.c index bf2efa63f3..7d2f9aa638 100644 --- a/xen/arch/x86/pv/traps.c +++ b/xen/arch/x86/pv/traps.c @@ -134,6 +134,20 @@ bool set_guest_nmi_trapbounce(void) return !null_trap_bounce(curr, tb); } +void init_int80_direct_trap(struct vcpu *v) +{ + struct trap_info *ti = &v->arch.pv_vcpu.trap_ctxt[0x80]; + struct trap_bounce *tb = &v->arch.pv_vcpu.int80_bounce; + + tb->cs = ti->cs; + tb->eip = ti->address; + + if ( null_trap_bounce(v, tb) ) + tb->flags = 0; + else + tb->flags = TBF_EXCEPTION | (TI_GET_IF(ti) ? TBF_INTERRUPT : 0); +} + /* * Local variables: * mode: C diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index 4641bc6d06..a4ea09b1ac 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -336,20 +336,6 @@ void subarch_percpu_traps_init(void) wrmsrl(MSR_SYSCALL_MASK, XEN_SYSCALL_MASK); } -void init_int80_direct_trap(struct vcpu *v) -{ - struct trap_info *ti = &v->arch.pv_vcpu.trap_ctxt[0x80]; - struct trap_bounce *tb = &v->arch.pv_vcpu.int80_bounce; - - tb->cs = ti->cs; - tb->eip = ti->address; - - if ( null_trap_bounce(v, tb) ) - tb->flags = 0; - else - tb->flags = TBF_EXCEPTION | (TI_GET_IF(ti) ? TBF_INTERRUPT : 0); -} - static long register_guest_callback(struct callback_register *reg) { long ret = 0; -- 2.30.2