[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> CC: Jun Nakajima <jun.nakajima@xxxxxxxxx> CC: Kevin Tian <kevin.tian@xxxxxxxxx> CC: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> CC: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> CC: Brian Woods <brian.woods@xxxxxxx> --- xen/arch/x86/hvm/svm/svm.c | 5 ++--- xen/arch/x86/hvm/vmx/vmx.c | 2 +- xen/include/asm-x86/hvm/hvm.h | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 07a5ed8..396ee4a 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1581,10 +1581,9 @@ static void svm_inject_event(const struct x86_event *event) HVMTRACE_2D(INJ_EXC, _event.vector, _event.error_code); } -static int svm_event_pending(struct vcpu *v) +static bool svm_event_pending(const struct vcpu *v) { - struct vmcb_struct *vmcb = v->arch.hvm.svm.vmcb; - return vmcb->eventinj.fields.v; + return v->arch.hvm.svm.vmcb->eventinj.fields.v; } static void svm_cpu_dead(unsigned int cpu) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index e065f8b..365eeb2 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -1903,7 +1903,7 @@ static void vmx_inject_event(const struct x86_event *event) HVMTRACE_2D(INJ_EXC, _event.vector, _event.error_code); } -static int vmx_event_pending(struct vcpu *v) +static bool vmx_event_pending(const struct vcpu *v) { unsigned long intr_info; diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 2a1acd8..3d3250d 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -158,7 +158,7 @@ struct hvm_function_table { void (*init_hypercall_page)(struct domain *d, void *hypercall_page); - int (*event_pending)(struct vcpu *v); + bool (*event_pending)(const struct vcpu *v); bool (*get_pending_event)(struct vcpu *v, struct x86_event *info); void (*invlpg)(struct vcpu *v, unsigned long linear); @@ -507,7 +507,7 @@ static inline void hvm_inject_page_fault(int errcode, unsigned long cr2) hvm_inject_event(&event); } -static inline int hvm_event_pending(struct vcpu *v) +static inline bool hvm_event_pending(const struct vcpu *v) { return hvm_funcs.event_pending(v); } -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |