qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3] qapi: introduce 'query-cpu-model-cpuid' action


From: Daniel P . Berrangé
Subject: Re: [PATCH v3] qapi: introduce 'query-cpu-model-cpuid' action
Date: Mon, 29 Mar 2021 10:20:54 +0100
User-agent: Mutt/2.0.5 (2021-01-21)

On Fri, Mar 26, 2021 at 08:30:00PM +0300, Valeriy Vdovin wrote:
> Other than debug, the method is useful in cases when we would like to
> utilize QEMU's virtual cpu initialization routines and put the retrieved
> values into kernel CPUID overriding mechanics for more precise control
> over how various processes perceive its underlying hardware with
> container processes as a good example.

When I read this, my impression is that QEMU's CPU handling doesn't do
what you need, and you're trying to work around it outside of QEMU.
Can you give more detailed information about what situations QEMU's
CPUID handling doesn't work, and why we can't simply enhance QEMU
to do what you need ?

> virsh qemu-monitor-command VM --pretty '{ "execute": "query-cpu-model-cpuid" 
> }'
> {
>   "return": {
>     "cpuid": {
>       "leafs": [
>         {
>           "leaf": 0,
>           "subleafs": [
>             {
>               "eax": 13,
>               "edx": 1231384169,
>               "ecx": 1818588270,
>               "ebx": 1970169159,
>               "subleaf": 0
>             }
>           ]
>         },
>         {
>           "leaf": 1,
>           "subleafs": [
>             {
>               "eax": 329443,
>               "edx": 529267711,
>               "ecx": 4160369187,
>               "ebx": 133120,
>               "subleaf": 0
>             }
>           ]
>         },
>         {
>           "leaf": 2,
>           "subleafs": [
>             {
>               "eax": 1,
>               "edx": 2895997,
>               "ecx": 0,
>               "ebx": 0,
>               "subleaf": 0
>             }
>           ]
>         },
>       ]
>     },
>     "vendor": "GenuineIntel",
>     "class-name": "Skylake-Client-IBRS-x86_64-cpu",
>     "model-id": "Intel Core Processor (Skylake, IBRS)"
>   },
>   "id": "libvirt-40"
> }

There's feels like there's a lot of conceptual overlap with the
query-cpu-model-expansion command. That reports in a arch independant
format, but IIUC the property data it returns can be mapped into
CPUID leaf values. Is it not possible for you to use this existing
command and maintain a mapping of property names -> CPUID leaves ?


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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