qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] kvm: Trim cpu features not supported by kvm


From: Mark McLoughlin
Subject: Re: [Qemu-devel] [PATCH 4/4] kvm: Trim cpu features not supported by kvm
Date: Tue, 12 May 2009 12:52:34 +0100

On Sun, 2009-05-03 at 17:04 +0300, Avi Kivity wrote:
> Remove cpu features that are not supported by kvm from the cpuid features
> reported to the guest.
> 
> Signed-off-by: Avi Kivity <address@hidden>
....
> @@ -1699,5 +1714,20 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
>  
>      qemu_init_vcpu(env);
>  
> +    if (kvm_enabled()) {
> +        kvm_trim_features(&env->cpuid_features,
> +                          kvm_arch_get_supported_cpuid(env, 1, R_EDX),
> +                          feature_name);

This isn't work in qemu.git because the features are only queried from
qemu_init_vcpu() (see kvm_arch_init_vcpu())

The obvious fix is to move qemu_init_vcpu() after the feature trimming,
but that requires us to split env->kvm_state initialization out of
kvm_init_vcpu()

Also, it works in qemu-kvm.git, but only because actually call
kvm_qemu_init_env() twice - once before feature trimming and once after.

Cheers,
Mark.





reply via email to

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