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 via email to