From: Sahid Orentino Ferdjaoui <sferdjao@redhat.com>
To: "Xu, Anthony" <anthony.xu@intel.com>
Cc: "'qemu-devel@nongnu.org'" <qemu-devel@nongnu.org>,
'Paolo Bonzini' <pbonzini@redhat.com>,
'Stefan Hajnoczi' <stefanha@gmail.com>
Subject: Re: [Qemu-devel] [PATCH]Enable kvmvapic only when host doesn't support VAPIC capability in KVM mode
Date: Mon, 10 Apr 2017 14:53:39 +0200 [thread overview]
Message-ID: <20170410125339.GA31761@redhat> (raw)
In-Reply-To: <4712D8F4B26E034E80552F30A67BE0B1A51E90@ORSMSX112.amr.corp.intel.com>
On Thu, Apr 06, 2017 at 06:18:33PM +0000, Xu, Anthony wrote:
> > > --- a/kvm-all.c
> > > +++ b/kvm-all.c
> > > @@ -2232,6 +2232,10 @@ int kvm_has_sync_mmu(void)
> > > return kvm_check_extension(kvm_state, KVM_CAP_SYNC_MMU);
> > > }
> > >
> > > +int kvm_has_vapic(void){
> > > + return !kvm_check_extension(kvm_state, KVM_CAP_VAPIC);
> > > +}
> > > +
> >
> > Is that function shouldn't return true if KVM is providing VAPIC
> > capability?
> >
>
> It should, but it doesn't. see below KVM kernel code segment,
> it returns false if KVM provides VAPIC.
I think we shouldn't read it like that. It seems that KVM is always
returning the VAPIC capability except when the CPU is providing a
special acceleration [0].
I would say you can't really refer yourself at this bit to enable or
not kvmapic in QEMU.
Does that make sense?
[0] https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=774ead3ad9bcbc05ef6aaebb9bdf8b4c3126923b
> Thanks for your comments,
>
> Will resend the patch.
>
>
> Anthony
>
>
>
> arch/x86/kvm/x86.c
>
> case KVM_CAP_VAPIC:
> r = !kvm_x86_ops->cpu_has_accelerated_tpr();
> break;
>
next prev parent reply other threads:[~2017-04-10 12:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 0:52 [Qemu-devel] [PATCH]Enable kvmvapic only when host doesn't support VAPIC capability in KVM mode Xu, Anthony
2017-04-06 11:58 ` Sahid Orentino Ferdjaoui
2017-04-06 18:18 ` Xu, Anthony
2017-04-10 12:53 ` Sahid Orentino Ferdjaoui [this message]
2017-04-11 0:54 ` Xu, Anthony
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=20170410125339.GA31761@redhat \
--to=sferdjao@redhat.com \
--cc=anthony.xu@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).