Message ID | 20170608171203.20416-19-wei.liu2@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 08/06/17 18:11, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.liu2@citrix.com> > Acked-by: Jan Beulich <jbeulich@suse.com> > --- > 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 0c1600d886..f2556c7e4a 100644 > --- a/xen/arch/x86/pv/traps.c > +++ b/xen/arch/x86/pv/traps.c > @@ -342,6 +342,20 @@ int send_guest_trap(struct domain *d, uint16_t vcpuid, unsigned int trap_nr) > return -EIO; > } > > +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; Mind reducing the spaces here? Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff --git a/xen/arch/x86/pv/traps.c b/xen/arch/x86/pv/traps.c index 0c1600d886..f2556c7e4a 100644 --- a/xen/arch/x86/pv/traps.c +++ b/xen/arch/x86/pv/traps.c @@ -342,6 +342,20 @@ int send_guest_trap(struct domain *d, uint16_t vcpuid, unsigned int trap_nr) return -EIO; } +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 1a8beb8068..d15c9023e8 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -335,20 +335,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 void hypercall_page_initialise_ring3_kernel(void *hypercall_page) { char *p;