mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
538bb4c06e
commit
67a4e7aca3
2 files changed
+14
-14
No files matched your search
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||