All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add CPU topology extension support for mshv guests
@ 2026-10-12 15:44 Doru Blânzeanu
  2026-10-12 15:44 ` [PATCH 1/2] i386/cpu.c: Adjust minimum xlevel to 0x8000_001E when TOPOEXT is enabled Doru Blânzeanu
  2026-10-12 15:44 ` [PATCH 2/2] mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves Doru Blânzeanu
  0 siblings, 2 replies; 3+ messages in thread
From: Doru Blânzeanu @ 2026-10-12 15:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Doru Blânzeanu, Wei Liu, Magnus Kulke, Magnus Kulke,
	Zhao Liu, Paolo Bonzini, Wei Liu, Doru Blânzeanu

This patch changes how MSHV constructs and registers the guest CPUID table.
It consists of two commits:

1. i386/cpu.c: Adjust minimum xlevel to 0x8000_001E when TOPOEXT is enabled
2. mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves

The first commit changes the extended CPUID level to 0x8000_001E when the TOPOEXT
feature is enabled.
This fix correctly reports CPU topology and cache leaves when TOPOEXT is
enabled.

Previous to the second commit, `collect_cpuid_entries` treated `0x0b` and `0x1f`
like ordinary leaves and collected only sub-leaf zero. But these Intel topology
leaves contain one sub-leaf per topology level.
With this patch, now it repeatedly calls `cpu_x86_cpuid` and stores every
result until ECX[15:8] becomes zero (same as kvm does).

Doru Blânzeanu (2):
  i386/cpu.c: Adjust minimum xlevel to 0x8000_001E when TOPOEXT is
    enabled
  mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache
    subleaves

 target/i386/cpu.c           |  5 +++++
 target/i386/mshv/mshv-cpu.c | 41 +++++++++++++++++++++++++++++--------
 2 files changed, 38 insertions(+), 8 deletions(-)

-- 
2.53.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-12 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 15:44 [PATCH 0/2] Add CPU topology extension support for mshv guests Doru Blânzeanu
2026-10-12 15:44 ` [PATCH 1/2] i386/cpu.c: Adjust minimum xlevel to 0x8000_001E when TOPOEXT is enabled Doru Blânzeanu
2026-10-12 15:44 ` [PATCH 2/2] mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves Doru Blânzeanu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.