From: Paolo Bonzini <pbonzini@redhat.com>
To: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC v1 2/2] hyper-v: initialize Hyper-V CPUID leafs.
Date: Mon, 17 Oct 2011 11:40:38 +0200 [thread overview]
Message-ID: <4E9BF816.3010205@redhat.com> (raw)
In-Reply-To: <1318843022-20344-3-git-send-email-vrozenfe@redhat.com>
On 10/17/2011 11:17 AM, Vadim Rozenfeld wrote:
> @@ -379,11 +380,16 @@ int kvm_arch_init_vcpu(CPUState *env)
> cpuid_i = 0;
>
> /* Paravirtualization CPUIDs */
> - memcpy(signature, "KVMKVMKVM\0\0\0", 12);
> c =&cpuid_data.entries[cpuid_i++];
> memset(c, 0, sizeof(*c));
> c->function = KVM_CPUID_SIGNATURE;
> - c->eax = 0;
> + if (!hyperv_enabled()) {
> + memcpy(signature, "KVMKVMKVM\0\0\0", 12);
> + c->eax = 0;
> + } else {
> + memcpy(signature, "Microsoft Hv", 12);
> + c->eax = HYPERV_CPUID_MIN;
> + }
Even not counting that hyper-v support should IMHO not be in
KVM-specific code, I still think this shouldn't remove KVM leaves
completely but rather move them to 0x40000100. The KVM
paravirtualization code then can similarly probe with 0x100 stride up to
0x40001000. This is what was done for Xen, and it allows to enable
enlightenments independent of whether the guest is Linux or Windows.
However, let's get a third opinion---Avi, what do you think?
Paolo
next prev parent reply other threads:[~2011-10-17 9:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 9:17 [Qemu-devel] [PATCH RFC v1 0/2] Initial support for Microsoft Hyper-V Vadim Rozenfeld
2011-10-17 9:17 ` [Qemu-devel] [PATCH RFC v1 1/2] hyper-v: introduce Hyper-V support infrastructure Vadim Rozenfeld
2011-10-17 9:30 ` Kevin Wolf
2011-10-17 9:37 ` Jan Kiszka
2011-10-17 9:17 ` [Qemu-devel] [PATCH RFC v1 2/2] hyper-v: initialize Hyper-V CPUID leafs Vadim Rozenfeld
2011-10-17 9:40 ` Paolo Bonzini [this message]
2011-10-17 10:41 ` Avi Kivity
2011-10-17 10:42 ` Paolo Bonzini
2011-10-17 13:57 ` Avi Kivity
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=4E9BF816.3010205@redhat.com \
--to=pbonzini@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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).