[PATCH 0/3] Fix VMX-* feature detection from MSR

Hector Cao via Devel posted 3 patches 2 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20251124134031.58469-1-hector.cao@canonical.com
src/cpu_map/sync_qemu_features_i386.py        |  19 +++
src/cpu_map/x86_features.xml                  | 136 +++++++++---------
.../x86_64-cpuid-Atom-P5362-2-enabled.xml     |  10 +-
.../x86_64-cpuid-Atom-P5362-enabled.xml       |  10 +-
.../x86_64-cpuid-Cooperlake-enabled.xml       |  10 +-
.../x86_64-cpuid-Core-i7-1270P-enabled.xml    |  10 +-
.../x86_64-cpuid-Core-i7-1365U-enabled.xml    |  10 +-
.../x86_64-cpuid-Core-i7-8550U-enabled.xml    |  10 +-
.../x86_64-cpuid-Xeon-6731E-enabled.xml       |  10 +-
.../x86_64-cpuid-Xeon-6788P-disabled.xml      |   1 +
.../x86_64-cpuid-Xeon-6788P-enabled.xml       |  10 +-
.../x86_64-cpuid-Xeon-6788P-guest.xml         |  17 ++-
.../x86_64-cpuid-Xeon-6788P-host.xml          |  17 ++-
...x86_64-cpuid-Xeon-Bronze-3408U-enabled.xml |  10 +-
.../x86_64-cpuid-Xeon-E3-1270-v5-enabled.xml  |  10 +-
.../x86_64-cpuid-Xeon-Gold-6152-enabled.xml   |  10 +-
.../x86_64-cpuid-Xeon-Gold-6530-enabled.xml   |  10 +-
...86_64-cpuid-Xeon-Platinum-9242-enabled.xml |  10 +-
...x86_64-cpuid-Xeon-Silver-4214R-enabled.xml |  10 +-
.../x86_64-cpuid-Xeon-w7-3465X-enabled.xml    |  10 +-
20 files changed, 181 insertions(+), 159 deletions(-)
[PATCH 0/3] Fix VMX-* feature detection from MSR
Posted by Hector Cao via Devel 2 weeks, 3 days ago
Currently, libvirt is unable to detect the CPU
model of recent Intel CPUs (like Granite Rapids)
with VMX-* features specified in the MSRs (Model Specific
Registers). This is due to the wrong parsing of these
VMX-* features from the MSR values.

This series of 3 commits allow to fix the MSR VMX-*
feature detection.

This has been tested successfully on a platform equipped
with Intel Granite Rapids CPU.

Hector Cao (3):
  cpu_map: fix sync script to extract correctly vmx-* features
  cpu_map: update vmx-* features
  cputest : fix test failures due to VMX-* feature update

 src/cpu_map/sync_qemu_features_i386.py        |  19 +++
 src/cpu_map/x86_features.xml                  | 136 +++++++++---------
 .../x86_64-cpuid-Atom-P5362-2-enabled.xml     |  10 +-
 .../x86_64-cpuid-Atom-P5362-enabled.xml       |  10 +-
 .../x86_64-cpuid-Cooperlake-enabled.xml       |  10 +-
 .../x86_64-cpuid-Core-i7-1270P-enabled.xml    |  10 +-
 .../x86_64-cpuid-Core-i7-1365U-enabled.xml    |  10 +-
 .../x86_64-cpuid-Core-i7-8550U-enabled.xml    |  10 +-
 .../x86_64-cpuid-Xeon-6731E-enabled.xml       |  10 +-
 .../x86_64-cpuid-Xeon-6788P-disabled.xml      |   1 +
 .../x86_64-cpuid-Xeon-6788P-enabled.xml       |  10 +-
 .../x86_64-cpuid-Xeon-6788P-guest.xml         |  17 ++-
 .../x86_64-cpuid-Xeon-6788P-host.xml          |  17 ++-
 ...x86_64-cpuid-Xeon-Bronze-3408U-enabled.xml |  10 +-
 .../x86_64-cpuid-Xeon-E3-1270-v5-enabled.xml  |  10 +-
 .../x86_64-cpuid-Xeon-Gold-6152-enabled.xml   |  10 +-
 .../x86_64-cpuid-Xeon-Gold-6530-enabled.xml   |  10 +-
 ...86_64-cpuid-Xeon-Platinum-9242-enabled.xml |  10 +-
 ...x86_64-cpuid-Xeon-Silver-4214R-enabled.xml |  10 +-
 .../x86_64-cpuid-Xeon-w7-3465X-enabled.xml    |  10 +-
 20 files changed, 181 insertions(+), 159 deletions(-)

-- 
2.45.2
Re: [PATCH 0/3] Fix VMX-* feature detection from MSR
Posted by Jiri Denemark via Devel 2 weeks, 3 days ago
On Mon, Nov 24, 2025 at 14:40:28 +0100, Hector Cao wrote:
> Currently, libvirt is unable to detect the CPU
> model of recent Intel CPUs (like Granite Rapids)
> with VMX-* features specified in the MSRs (Model Specific
> Registers). This is due to the wrong parsing of these
> VMX-* features from the MSR values.
> 
> This series of 3 commits allow to fix the MSR VMX-*
> feature detection.
> 
> This has been tested successfully on a platform equipped
> with Intel Granite Rapids CPU.
> 
> Hector Cao (3):
>   cpu_map: fix sync script to extract correctly vmx-* features
>   cpu_map: update vmx-* features
>   cputest : fix test failures due to VMX-* feature update
> 
>  src/cpu_map/sync_qemu_features_i386.py        |  19 +++
>  src/cpu_map/x86_features.xml                  | 136 +++++++++---------
>  .../x86_64-cpuid-Atom-P5362-2-enabled.xml     |  10 +-
>  .../x86_64-cpuid-Atom-P5362-enabled.xml       |  10 +-
>  .../x86_64-cpuid-Cooperlake-enabled.xml       |  10 +-
>  .../x86_64-cpuid-Core-i7-1270P-enabled.xml    |  10 +-
>  .../x86_64-cpuid-Core-i7-1365U-enabled.xml    |  10 +-
>  .../x86_64-cpuid-Core-i7-8550U-enabled.xml    |  10 +-
>  .../x86_64-cpuid-Xeon-6731E-enabled.xml       |  10 +-
>  .../x86_64-cpuid-Xeon-6788P-disabled.xml      |   1 +
>  .../x86_64-cpuid-Xeon-6788P-enabled.xml       |  10 +-
>  .../x86_64-cpuid-Xeon-6788P-guest.xml         |  17 ++-
>  .../x86_64-cpuid-Xeon-6788P-host.xml          |  17 ++-
>  ...x86_64-cpuid-Xeon-Bronze-3408U-enabled.xml |  10 +-
>  .../x86_64-cpuid-Xeon-E3-1270-v5-enabled.xml  |  10 +-
>  .../x86_64-cpuid-Xeon-Gold-6152-enabled.xml   |  10 +-
>  .../x86_64-cpuid-Xeon-Gold-6530-enabled.xml   |  10 +-
>  ...86_64-cpuid-Xeon-Platinum-9242-enabled.xml |  10 +-
>  ...x86_64-cpuid-Xeon-Silver-4214R-enabled.xml |  10 +-
>  .../x86_64-cpuid-Xeon-w7-3465X-enabled.xml    |  10 +-
>  20 files changed, 181 insertions(+), 159 deletions(-)

I wanted to fix the empty lines in the first patch, squash patches 2 and
3 into a single one so that I can push the series, but the patches are
missing Signed-off-by tags (see
https://libvirt.org/hacking.html#developer-certificate-of-origin)

You can either do the appropriate changes, add Signed-off-by and
resubmit or just reply with your Signed-off-by here and I'll add that to
the commits myself before pushing.

Thanks
Jirka
Re: [PATCH 0/3] Fix VMX-* feature detection from MSR
Posted by Hector Cao via Devel 2 weeks, 2 days ago
Thanks Jiri,

I am grateful for that quick feedback and your proposal to do further
changes,

Here is my Sign-off line:

    Signed-off-by: Hector Cao <hector.cao@canonical.com>

Best regards
Hector

On Tue, Nov 25, 2025 at 11:59 AM Jiri Denemark <jdenemar@redhat.com> wrote:

> On Mon, Nov 24, 2025 at 14:40:28 +0100, Hector Cao wrote:
> > Currently, libvirt is unable to detect the CPU
> > model of recent Intel CPUs (like Granite Rapids)
> > with VMX-* features specified in the MSRs (Model Specific
> > Registers). This is due to the wrong parsing of these
> > VMX-* features from the MSR values.
> >
> > This series of 3 commits allow to fix the MSR VMX-*
> > feature detection.
> >
> > This has been tested successfully on a platform equipped
> > with Intel Granite Rapids CPU.
> >
> > Hector Cao (3):
> >   cpu_map: fix sync script to extract correctly vmx-* features
> >   cpu_map: update vmx-* features
> >   cputest : fix test failures due to VMX-* feature update
> >
> >  src/cpu_map/sync_qemu_features_i386.py        |  19 +++
> >  src/cpu_map/x86_features.xml                  | 136 +++++++++---------
> >  .../x86_64-cpuid-Atom-P5362-2-enabled.xml     |  10 +-
> >  .../x86_64-cpuid-Atom-P5362-enabled.xml       |  10 +-
> >  .../x86_64-cpuid-Cooperlake-enabled.xml       |  10 +-
> >  .../x86_64-cpuid-Core-i7-1270P-enabled.xml    |  10 +-
> >  .../x86_64-cpuid-Core-i7-1365U-enabled.xml    |  10 +-
> >  .../x86_64-cpuid-Core-i7-8550U-enabled.xml    |  10 +-
> >  .../x86_64-cpuid-Xeon-6731E-enabled.xml       |  10 +-
> >  .../x86_64-cpuid-Xeon-6788P-disabled.xml      |   1 +
> >  .../x86_64-cpuid-Xeon-6788P-enabled.xml       |  10 +-
> >  .../x86_64-cpuid-Xeon-6788P-guest.xml         |  17 ++-
> >  .../x86_64-cpuid-Xeon-6788P-host.xml          |  17 ++-
> >  ...x86_64-cpuid-Xeon-Bronze-3408U-enabled.xml |  10 +-
> >  .../x86_64-cpuid-Xeon-E3-1270-v5-enabled.xml  |  10 +-
> >  .../x86_64-cpuid-Xeon-Gold-6152-enabled.xml   |  10 +-
> >  .../x86_64-cpuid-Xeon-Gold-6530-enabled.xml   |  10 +-
> >  ...86_64-cpuid-Xeon-Platinum-9242-enabled.xml |  10 +-
> >  ...x86_64-cpuid-Xeon-Silver-4214R-enabled.xml |  10 +-
> >  .../x86_64-cpuid-Xeon-w7-3465X-enabled.xml    |  10 +-
> >  20 files changed, 181 insertions(+), 159 deletions(-)
>
> I wanted to fix the empty lines in the first patch, squash patches 2 and
> 3 into a single one so that I can push the series, but the patches are
> missing Signed-off-by tags (see
> https://libvirt.org/hacking.html#developer-certificate-of-origin)
>
> You can either do the appropriate changes, add Signed-off-by and
> resubmit or just reply with your Signed-off-by here and I'll add that to
> the commits myself before pushing.
>
> Thanks
> Jirka
>
>

-- 
Hector CAO
Software Engineer – Server Team / Virtualization
hector.cao@canonical.com
https://launc <https://launchpad.net/~hectorcao>hpad.net/~hectorcao
<https://launchpad.net/~hectorcao>

<https://launchpad.net/~hectorcao>
Re: [PATCH 0/3] Fix VMX-* feature detection from MSR
Posted by Jiří Denemark via Devel 1 week, 3 days ago
On Tue, Nov 25, 2025 at 13:36:53 +0100, Hector Cao wrote:
> Thanks Jiri,
> 
> I am grateful for that quick feedback and your proposal to do further
> changes,
> 
> Here is my Sign-off line:
> 
>     Signed-off-by: Hector Cao <hector.cao@canonical.com>

Thanks, pushed now as the freeze is over.

Jirka