[libvirt] [PATCH v6 7/9] tests: check CPU features handling in libxl driver

Marek Marczykowski-Górecki marmarek at invisiblethingslab.com
Thu Mar 22 15:47:21 UTC 2018


On Thu, Mar 22, 2018 at 10:03:50AM +0000, Daniel P. Berrangé wrote:
> On Wed, Mar 21, 2018 at 05:32:31PM +0100, Marek Marczykowski-Górecki wrote:
> > Test enabling/disabling individual CPU features and also setting
> > nested HVM support, which is also controlled by CPU features node.
> > 
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
> > Reviewed-by: Jim Fehlig <jfehlig at suse.com>
> > ---
> > Changes since v3:
> >  - adjust for modified nested HVM handling
> > Changes since v1:
> >  - rewritten to Jim's test suite for libxl_domain_config generator
> > ---
> >  tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 64 +++++++++++++++++-
> >  tests/libxlxml2domconfigdata/fullvirt-cpuid.xml  | 37 ++++++++++-
> >  tests/libxlxml2domconfigtest.c                   |  1 +-
> >  3 files changed, 102 insertions(+)
> >  create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.json
> >  create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.xml
> > 
> > diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid.json b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
> > new file mode 100644
> > index 0000000..28037be
> > --- /dev/null
> > +++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid.json
> > @@ -0,0 +1,64 @@
> > +{
> > +    "c_info": {
> > +        "type": "hvm",
> > +        "name": "XenGuest2",
> > +        "uuid": "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
> > +    },
> > +    "b_info": {
> > +        "max_vcpus": 1,
> > +        "avail_vcpus": [
> > +            0
> > +        ],
> > +        "max_memkb": 592896,
> > +        "target_memkb": 403456,
> > +        "video_memkb": 8192,
> > +        "shadow_memkb": 5656,
> > +        "cpuid": [
> > +            {
> > +                "leaf": 1,
> > +                "ecx": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0",
> > +                "edx": "xxxxxxxxxxxxxxxxxxxxxxxxxxx1xxxx"
> 
> IIUC, this means we have 1 bit marked as forbidden and 1 bit
> marked as required but....
> 
> 
> > +  <cpu mode='host-passthrough'>
> > +    <feature policy='forbid' name='pni'/>
> > +    <feature policy='forbid' name='vmx'/>
> 
> 2 features marked forbidden

vmx is translated to nested_hvm setting.

> > +    <feature policy='require' name='tsc'/>
> 
> and 1 marked required.
> 
> IOW, shouldn't we have seen two 0 bits in the cpuid config above
> not just one ?
> 
> 
> Regards,
> Daniel

-- 
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: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180322/8a25e8f1/attachment-0001.sig>


More information about the libvir-list mailing list