On Tue, Nov 10, 2026 at 11:56:15AM +0200, Doru Blânzeanu wrote:
> This ensures the guests can discover the AMD cache and processor topology 
> leaves
> when TOPOEXT feature is enabled.
> 
> Signed-off-by: Doru Blânzeanu <[email protected]>
> ---
>  target/i386/cpu.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index eab0d5a4d4..e443132ce9 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -9911,6 +9911,11 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
>          x86_cpu_adjust_level(cpu, &env->cpuid_min_xlevel, 0x8000000A);
>      }
>  
> +    /* TOPOEXT requires CPUID[0x8000001D] and CPUID[0x8000001E] */
> +    if (env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) {
> +        x86_cpu_adjust_level(cpu, &env->cpuid_min_xlevel, 0x8000001E);
> +    }
> +
>      /* SEV requires CPUID[0x8000001F] */
>      if (sev_enabled()) {
>          x86_cpu_adjust_level(cpu, &env->cpuid_min_xlevel, 0x8000001F);
> -- 
> 2.54.0

It looks correct, but since this change touches a generic path it might
have an unintended fallout. Maybe we can split this out and post this
as a isolated patch, and solve the issue in allocator-local code like
KVM apparently does in kvm_cpu_instance_init() w/
kvm_cpu_max_instance_init()?

Reply via email to