qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu h


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu host
Date: Mon, 21 May 2012 11:25:01 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, May 17, 2012 at 01:26:55PM -0300, Eduardo Habkost wrote:
[...]
> @@ -521,6 +523,12 @@ static int cpu_x86_fill_host(x86_def_t *x86_cpu_def)
>      x86_cpu_def->ext_features = ecx;
>      x86_cpu_def->features = edx;
>  
> +    if (x86_cpu_def->level >= 7) {
> +        x86_cpu_def->cpuid_7_0_ebx_features = 
> kvm_arch_get_supported_cpuid(kvm_state, 0x7, 0, R_EBX);

This needs a check for kvm_enabled(). The code for "-cpu host" checks
for kvm_enabled() before calling cpu_x86_fill_host() already, but "-cpu
enforce" uses cpu_x86_fill_host() and doesn't check for kvm_enabled()
(that doesn't make much sense, but I won't try to fix 2 bugs in the same
patch). I will send v3.

Thanks to Gleb Natapov for catching it.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]