target/i386: do not include undefined bits in the AMD topoext leaf
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 3 Jul 2024 09:29:17 +0000 (11:29 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 3 Jul 2024 16:41:26 +0000 (18:41 +0200)
commit29a51b2bb55c6b2e0224d82c154d82498ccece35
treeb46c7d6dd6d8a309479a16510ffc61df81d5acc0
parent9b40d376f66640eb7b6080ca000c866dfe630dc7
target/i386: do not include undefined bits in the AMD topoext leaf

Commit d7c72735f61 ("target/i386: Add new EPYC CPU versions with updated
cache_info", 2023-05-08) ensured that AMD-defined CPU models did not
have the 'complex_indexing' bit set, but left it set in "-cpu host"
which uses the default ("legacy") cache information.

Reimplement that commit using a CPU feature, so that it can be applied
to all guests using a new machine type, independent of the CPU model.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/pc.c
target/i386/cpu.c
target/i386/cpu.h