qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] [PATCH RFC v1 2/2] hyper-v: initialize Hyper-V CPUID leafs.
Date: Mon, 17 Oct 2011 12:41:05 +0200	[thread overview]
Message-ID: <4E9C0641.4080107@redhat.com> (raw)
In-Reply-To: <4E9BF816.3010205@redhat.com>

On 10/17/2011 11:40 AM, Paolo Bonzini wrote:
> 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?

I agree with you, especially as this already works for Xen.

Note it doesn't completely solve the issue (so we have two interfaces,
which is the preferred one?), but it's better than nothing.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-10-17 10:41 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
2011-10-17 10:41     ` Avi Kivity [this message]
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=4E9C0641.4080107@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --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).