qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] i386/kvm: add support for Hyper-V TLB flush


From: Roman Kagan
Subject: Re: [Qemu-devel] [PATCH] i386/kvm: add support for Hyper-V TLB flush
Date: Mon, 11 Jun 2018 18:45:10 +0300
User-agent: Mutt/1.10.0 (2018-05-17)

On Sun, Jun 10, 2018 at 08:49:27PM +0200, Vitaly Kuznetsov wrote:
> Add support for Hyper-V TLB flush which recently got added to KVM.
> 
> Just like regular Hyper-V we announce HV_EX_PROCESSOR_MASKS_RECOMMENDED
> regardless of how many vCPUs we have. Windows is 'smart' and uses less
> expensive non-EX Hypercall whenever possible (when it wants to flush TLB
> for all vCPUs or the maximum vCPU index in the vCPU set requires flushing
> is less than 64).

Indeed, reading the spec it sounds like this bit indicates the
availability of hypercalls accepting sparse processor sets, rather than
the recommendation to use them (dunno if we want to ajust the name).

> Signed-off-by: Vitaly Kuznetsov <address@hidden>
> ---
>  linux-headers/linux/kvm.h  |  1 +
>  target/i386/cpu.c          |  1 +
>  target/i386/cpu.h          |  1 +
>  target/i386/hyperv-proto.h |  1 +
>  target/i386/kvm.c          | 15 ++++++++++++++-
>  5 files changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
> index cdb148e959..a52a685690 100644
> --- a/linux-headers/linux/kvm.h
> +++ b/linux-headers/linux/kvm.h
> @@ -948,6 +948,7 @@ struct kvm_ppc_resize_hpt {
>  #define KVM_CAP_S390_BPB 152
>  #define KVM_CAP_GET_MSR_FEATURES 153
>  #define KVM_CAP_HYPERV_EVENTFD 154
> +#define KVM_CAP_HYPERV_TLBFLUSH 155
>  
>  #ifdef KVM_CAP_IRQ_ROUTING
>  

This header is imported from the kernel, so, to make life easier for the
maintainers, I tend to post changes to it in a separate patch,
indicating which kernel version contains it (AFAIK it's in kvm/queue
ATM).  But if they actually do want it they'll let you know ;)

Reviewed-by: Roman Kagan <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]