From: Roman Kagan <rkagan@virtuozzo.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] i386/kvm: add support for Hyper-V TLB flush
Date: Mon, 11 Jun 2018 18:45:10 +0300 [thread overview]
Message-ID: <20180611154509.GB9807@rkaganip.lan> (raw)
In-Reply-To: <20180610184927.19309-1-vkuznets@redhat.com>
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 <vkuznets@redhat.com>
> ---
> 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 <rkagan@virtuozzo.com>
next prev parent reply other threads:[~2018-06-11 17:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-10 18:49 [Qemu-devel] [PATCH] i386/kvm: add support for Hyper-V TLB flush Vitaly Kuznetsov
2018-06-11 15:45 ` Roman Kagan [this message]
2018-06-29 12:23 ` Vitaly Kuznetsov
2018-06-29 13:55 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180611154509.GB9807@rkaganip.lan \
--to=rkagan@virtuozzo.com \
--cc=ehabkost@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).