All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add CPU topology extension support for mshv guests
@ 2026-11-24 15:53 Doru Blânzeanu
  2026-11-24 15:53 ` [PATCH v3 1/2] mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves Doru Blânzeanu
  2026-11-24 15:53 ` [PATCH v3 2/2] target/i386/mshv: Initialize the extended CPUID limit for host/max CPUs Doru Blânzeanu
  0 siblings, 2 replies; 5+ messages in thread
From: Doru Blânzeanu @ 2026-11-24 15:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: Doru Blânzeanu, Magnus Kulke, Wei Liu, Paolo Bonzini,
	Wei Liu, Zhao Liu, Magnus Kulke, Doru Blânzeanu

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

1. mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves
2. target/i386/mshv: Initialize the extended CPUID limit for host/max CPUs

Previous to the first 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).
This fix correctly reports CPU topology and cache leaves when TOPOEXT is
enabled.

The second commit changes the minimum extended CPUID level to 0x8000_001E during
mshv instance initialization for host/max CPUs (the ones that have TOPOEXT
enabled).

Changes since V2:
- Drop the unconditional SMT support in the mshv partition. It will be submitted
  in a later patch
- Change how xlevel is set, from generic accelerator to mshv specific.
  Now, mshv follows kvm's approach of setting xlevel to the host's visible
  extended CPUID maximum for host/max CPUs.

Changes since V1:
- Enable SMT support in the mshv partition

Doru Blânzeanu (2):
  mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache
    subleaves
  target/i386/mshv: Initialize the extended CPUID limit for host/max
    CPUs

 target/i386/mshv/mshv-cpu.c | 48 ++++++++++++++++++++++++++++++-------
 1 file changed, 40 insertions(+), 8 deletions(-)

-- 
2.48.1.vfs.0.0



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

end of thread, other threads:[~2026-11-30 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 15:53 [PATCH v3 0/2] Add CPU topology extension support for mshv guests Doru Blânzeanu
2026-11-24 15:53 ` [PATCH v3 1/2] mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves Doru Blânzeanu
2026-11-30 15:59   ` Magnus Kulke
2026-11-24 15:53 ` [PATCH v3 2/2] target/i386/mshv: Initialize the extended CPUID limit for host/max CPUs Doru Blânzeanu
2026-11-30 15:47   ` Magnus Kulke

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.