qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with "allow-emulat


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [RFC 0/2] GET_EMULATED_CPUID support with "allow-emulation" option
Date: Thu, 5 Jun 2014 14:52:45 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jun 05, 2014 at 07:38:49PM +0200, Paolo Bonzini wrote:
> Il 05/06/2014 19:17, Eduardo Habkost ha scritto:
> > 
> > If you don't want MONITOR/MWAIT you shouldn't be using a CPU model
> > containing MONITOR/MWAIT in the first place. If you use "-cpu
> > somethingWithMONITOR", that means you are already asking QEMU for a CPU
> > with MONITOR. If you were not getting MONITOR before using
> > allow-emulation, that means you were not using the "enforce" flag, which
> > you should be using, already.
> 
> Except that many cpus don't work with enforce:
> 
> $ /usr/libexec/qemu-kvm -cpu core2duo,enforce
> warning: host doesn't support requested feature: CPUID.01H:EDX.ds [bit 21]
> warning: host doesn't support requested feature: CPUID.01H:EDX.acpi [bit 22]
> warning: host doesn't support requested feature: CPUID.01H:EDX.ht [bit 28]
> warning: host doesn't support requested feature: CPUID.01H:EDX.tm [bit 29]
> warning: host doesn't support requested feature: CPUID.01H:EDX.pbe [bit 31]
> warning: host doesn't support requested feature: CPUID.01H:ECX.dtes64 [bit 2]
> warning: host doesn't support requested feature: CPUID.01H:ECX.monitor [bit 3]
> warning: host doesn't support requested feature: CPUID.01H:ECX.ds_cpl [bit 4]
> warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
> warning: host doesn't support requested feature: CPUID.01H:ECX.est [bit 7]
> warning: host doesn't support requested feature: CPUID.01H:ECX.tm2 [bit 8]
> warning: host doesn't support requested feature: CPUID.01H:ECX.xtpr [bit 14]
> warning: host doesn't support requested feature: CPUID.01H:ECX.pdcm [bit 15]

Probably this means the CPU model definition have AMD alises that
shouldn't be there (as they are added automatically when CPU vendor is
AMD). A bug in the CPU model. You still need "enforce" if you care about
stable CPUID data.

> 
> Like VMX above, some AMD models require nested SVM to be enabled:
> 
> $ /usr/libexec/qemu-kvm -cpu phenom,enforce
> warning: host doesn't support requested feature: CPUID.01H:EDX.ht [bit 28]
> warning: host doesn't support requested feature: CPUID.01H:ECX.monitor [bit 3]
> warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 
> 2]
> warning: host doesn't support requested feature: CPUID.8000000AH:EDX.npt [bit 
> 0]
> warning: host doesn't support requested feature: CPUID.8000000AH:EDX.lbrv 
> [bit 1]
> 
> (actually, even with nested SVM, LBR virtualization is not supported in L2 
> guests)
> 
> Testing some of the bits does not make sense, for example HT.  Some others 
> will
> never be supported (TM/TM2, ACPI, PBE, xTPR, ...).

If a CPU model doesn't work with enforce, that means that _without_
enforce, you already risk getting CPUID data suddenly change on
migration (if GET_SUPPORTED_CPUID changes). Isn't that exactly the
problem Alex was complaining about?

If existing CPU models have not very useful defaults that allow them to
be useful with "enforce", we may change them. But is not a reason to
drop "enforce", or you risk getting even worse problems.

> 
> The set of CPUs that work with enforce is pretty much what you tested (the
> Opteron_G* models and some of the code-named Intel chips).

So we need to fix this. Just like we fixed the MONITOR flag issue on KVM
mode recently.

-- 
Eduardo



reply via email to

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