From 1bf465f3e0a786bf3267931461c0c15fe6232bc8 Mon Sep 17 00:00:00 2001 From: Zhao Liu Date: Fri, 11 Jul 2025 18:46:02 +0800 Subject: [PATCH] i386/cpu: Enable 0x1f leaf for SapphireRapids by default Host SapphireRapids CPU has 0x1f leaf by default, so that enable it for Guest CPU by default as well. Suggested-by: Igor Mammedov Reviewed-by: Dapeng Mi Tested-by: Yi Lai Signed-off-by: Zhao Liu Link: https://lore.kernel.org/r/20250711104603.1634832-9-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a11e9bb111..216e0232df 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5081,8 +5081,12 @@ static const X86CPUDefinition builtin_x86_defs[] = { }, { .version = 4, - .note = "with spr-sp cache model", + .note = "with spr-sp cache model and 0x1f leaf", .cache_info = &xeon_spr_cache_info, + .props = (PropValue[]) { + { "x-force-cpuid-0x1f", "on" }, + { /* end of list */ }, + } }, { /* end of list */ } } -- 2.47.2