include/hw/i386/pc.h | 1 + include/hw/i386/topology.h | 60 +++++++- target/i386/cpu.h | 43 +++++- target/i386/helper.h | 4 +- hw/i386/pc.c | 3 + hw/i386/pc_piix.c | 3 + hw/i386/pc_q35.c | 2 + hw/i386/pc_sysfw.c | 8 +- hw/i386/x86-common.c | 54 +++++-- hw/i386/x86.c | 13 +- target/i386/cpu.c | 310 +++++++++++++++++++++++++++++++-------- target/i386/helper.c | 4 + target/i386/kvm/hyperv.c | 2 +- target/i386/kvm/kvm.c | 3 +- target/i386/tcg/int_helper.c | 19 +-- tests/unit/test-x86-topo.c | 56 ++++--- target/i386/tcg/decode-new.c.inc | 4 +- target/i386/tcg/emit.c.inc | 34 +++-- qemu-options.hx | 18 ++- 19 files changed, 491 insertions(+), 150 deletions(-)