[libvirt] [PATCH 1/3] cpu: define sub-leaf 0 for leaf 7 in cpu_map.xml

Marek Marczykowski-Górecki marmarek at invisiblethingslab.com
Thu Jun 29 08:31:28 UTC 2017


On Thu, Jun 29, 2017 at 09:51:58AM +0200, Jiri Denemark wrote:
> On Thu, Jun 29, 2017 at 03:11:41 +0200, Marek Marczykowski-Górecki wrote:
> > CPUID leaf 7 is sub-leaf aware. Add missing attribute.
> > ---
> >  src/cpu/cpu_map.xml | 58 +++++++++++++++++++++++-----------------------
> >  1 file changed, 29 insertions(+), 29 deletions(-)
> > 
> > diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
> > index 29b5b59..037a057 100644
> > --- a/src/cpu/cpu_map.xml
> > +++ b/src/cpu/cpu_map.xml
> > @@ -195,93 +195,93 @@
> >  
> >      <!-- cpuid function 0x7 ecx 0x0 features -->
> >      <feature name='fsgsbase'>
> > -      <cpuid eax_in='0x07' ebx='0x00000001'/>
> > +      <cpuid eax_in='0x07' ecx_in='0' ebx='0x00000001'/>
> 
> Why? Zero is the default value for ecx_in, I don't see a strong reason
> for mentioning it explicitly. If we do this, we should set the value to
> 0x00 though.

There is a difference (at CPUID instruction level) between ignoring ECX
value (leaf 1 for example) and requiring it to be set to 0. Looks like
virCPUx86CPUID structure does not support this distinction though.
Anyway I think it's better to include it there, will change to 0x00.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170629/e7e7410d/attachment-0001.sig>


More information about the libvir-list mailing list