[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 06/13] x86: simplify guest_has_trap_callback
>>> Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 06/26/17 6:58 PM >>> >On 26/06/17 17:28, Wei Liu wrote: >> --- a/xen/arch/x86/cpu/mcheck/vmce.c >> +++ b/xen/arch/x86/cpu/mcheck/vmce.c >> @@ -359,6 +359,15 @@ static int vmce_load_vcpu_ctxt(struct domain *d, >> hvm_domain_context_t *h) >> HVM_REGISTER_SAVE_RESTORE(VMCE_VCPU, vmce_save_vcpu_ctxt, >> vmce_load_vcpu_ctxt, 1, HVMSR_PER_VCPU); >> >> +static inline bool pv_callback_registered(const struct vcpu *v, uint8_t >> vector) >> +{ >> +#ifdef CONFIG_PV >> + return v->arch.pv_vcpu.trap_ctxt[vector].address; >> +#else >> + return false; >> +#endif >> +} >> + > >Isn't there a header file this would be better living in? Its certainly >not vmce-specific. We certainly have the equivalent of this check in assembly code (which iirc we mean to convert to C eventually), so pv/traps.h would seem to be the right place. The function name would need to change a little though, as we're talking about exception callbacks here, not the things we call callbacks in the public interface. pv_trap_callback_registered() perhaps? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |