From: Paolo Bonzini <pbonzini@redhat.com>
To: zhanghailiang <zhang.zhanghailiang@huawei.com>, kvm@vger.kernel.org
Cc: gleb@kernel.org, peter.huangpeng@huawei.com
Subject: Re: [PATCH] KVM: add KVM_CAP_VMX_APICV to advertise hardware apic-v support
Date: Thu, 11 Dec 2014 18:15:39 +0100 [thread overview]
Message-ID: <5489D13B.3000703@redhat.com> (raw)
In-Reply-To: <548993D8.6010004@huawei.com>
On 11/12/2014 13:53, zhanghailiang wrote:
>
>
>> I think it's a Windows bug---it should prefer x2apic to hv-vapic if both
>> are available.
>>
>
> No, i don't think it is a windows bug, it has nothing to do with x2apic,
hv-vapic MSRs doesn't provide any performance improvement over x2apic
MSRs. So Windows should use x2apic MSRs if both are available. Windows
can use x2apic MSRs together with its EOI optimization, like Linux does.
There definitely are Windows versions that know how to use x2apic (e.g.
2008R2).
> but apic-v (need hardware support, i.e. Haswell cpu).
APICv can use the x2apic MSRs.
> When we don't passthough host cpu model to Guest os,
> it has no idea about whether it supports apic-v in host,
The presence of APICv should be totally transparent to the guest.
> Actually, qemu has a option 'hv_vapic' for -cpu, we can choose not to
> configure it if we know there is apic-v support in host. But IMHO,
> we'd better to do it automatically.
... and cause the CPUID to change under the guest's feet if you migrate
from a non-APICv to an APICv machines, or vice versa.
Paolo
next prev parent reply other threads:[~2014-12-11 17:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 8:07 [PATCH] KVM: add KVM_CAP_VMX_APICV to advertise hardware apic-v support zhanghailiang
2014-12-11 11:48 ` Paolo Bonzini
2014-12-11 12:53 ` zhanghailiang
2014-12-11 13:28 ` Radim Krčmář
2014-12-11 17:15 ` Paolo Bonzini [this message]
2014-12-17 22:17 ` Stefan Fritsch
2014-12-18 3:37 ` zhanghailiang
2014-12-18 8:30 ` Paolo Bonzini
2014-12-18 8:57 ` Stefan Fritsch
2014-12-18 9:23 ` Paolo Bonzini
2014-12-11 13:08 ` Radim Krčmář
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=5489D13B.3000703@redhat.com \
--to=pbonzini@redhat.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=peter.huangpeng@huawei.com \
--cc=zhang.zhanghailiang@huawei.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