qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/17] target-i386: move kvm_check_features_agai


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH 03/17] target-i386: move kvm_check_features_against_host() check to realize time
Date: Tue, 2 Apr 2013 17:30:57 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jan 11, 2013 at 12:25:50AM -0200, Eduardo Habkost wrote:
> On Fri, Jan 11, 2013 at 03:10:17AM +0100, Igor Mammedov wrote:
> > kvm_check_features_against_host() should be called when features can't be
> > changed and when features are convereted to properties it would be possible 
> > to
> > change them until realize time, so correct way is to call
> > kvm_check_features_against_host() in x86_cpu_realize()
> > 
> > Signed-off-by: Igor Mammedov <address@hidden>
> 
> Reviewed-by: Eduardo Habkost <address@hidden>

Oops, I missed a problem on this patch:

> 
[...]
> > @@ -2177,6 +2174,11 @@ void x86_cpu_realize(Object *obj, Error **errp)
> >  #ifdef CONFIG_KVM
> >          filter_features_for_kvm(cpu);
> >  #endif
> > +        if (check_cpuid && kvm_check_features_against_host(cpu)
> > +            && enforce_cpuid) {
> > +            error_setg(errp, "Host's CPU doesn't support requested 
> > features");
> > +            return;
> > +        }

Checking kvm_check_features_against_host() after
filter_features_for_kvm() is useless, as filter_features_for_kvm() will
have filtered out everything that is not supported by the host, already.
This patch broke "-cpu enforce" on v1.4.0.

I will send a fix soon.

-- 
Eduardo



reply via email to

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