[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 11/18] x86/traps: move guest_has_trap_callback to pv/traps.c
No functional change. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/pv/traps.c | 18 ++++++++++++++++++ xen/arch/x86/traps.c | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/xen/arch/x86/pv/traps.c b/xen/arch/x86/pv/traps.c index 54d77922c5..4e9a376000 100644 --- a/xen/arch/x86/pv/traps.c +++ b/xen/arch/x86/pv/traps.c @@ -255,6 +255,24 @@ long unregister_guest_nmi_callback(void) return 0; } +int guest_has_trap_callback(struct domain *d, uint16_t vcpuid, + unsigned int trap_nr) +{ + struct vcpu *v; + struct trap_info *t; + + BUG_ON(d == NULL); + BUG_ON(vcpuid >= d->max_vcpus); + + /* Sanity check - XXX should be more fine grained. */ + BUG_ON(trap_nr >= NR_VECTORS); + + v = d->vcpu[vcpuid]; + t = &v->arch.pv_vcpu.trap_ctxt[trap_nr]; + + return (t->address != 0); +} + /* * Local variables: * mode: C diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index ecc767dca1..2517b10ddf 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1905,24 +1905,6 @@ void __init trap_init(void) open_softirq(PCI_SERR_SOFTIRQ, pci_serr_softirq); } -int guest_has_trap_callback(struct domain *d, uint16_t vcpuid, unsigned int trap_nr) -{ - struct vcpu *v; - struct trap_info *t; - - BUG_ON(d == NULL); - BUG_ON(vcpuid >= d->max_vcpus); - - /* Sanity check - XXX should be more fine grained. */ - BUG_ON(trap_nr >= NR_VECTORS); - - v = d->vcpu[vcpuid]; - t = &v->arch.pv_vcpu.trap_ctxt[trap_nr]; - - return (t->address != 0); -} - - int send_guest_trap(struct domain *d, uint16_t vcpuid, unsigned int trap_nr) { struct vcpu *v; -- 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 |