x86/traps: move init_int80_direct_trap to pv/traps.c

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Wei Liu committed 2017-06-23 16:06:19 +01:00
1 parent 538bb4c06e
commit 67a4e7aca3
2 files changed
+14 -14

No files matched your search

+14
View File
@@ -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
-14
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.