|
[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
On 26/06/17 17:28, Wei Liu wrote:
> There is only one caller for that function. Simplify the function,
> move it close to the caller and rename it.
>
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Good improvement. In principle, Reviewed-by: Andrew Cooper
<andrew.cooper3@xxxxxxxxxx>, although...
> ---
> xen/arch/x86/cpu/mcheck/vmce.c | 11 ++++++++++-
> xen/arch/x86/traps.c | 18 ------------------
> xen/include/asm-x86/traps.h | 8 --------
> 3 files changed, 10 insertions(+), 27 deletions(-)
>
> diff --git a/xen/arch/x86/cpu/mcheck/vmce.c b/xen/arch/x86/cpu/mcheck/vmce.c
> index d591d31600..368285810a 100644
> --- 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.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |