qemu-e2k/target/i386
Vitaly Kuznetsov 30d6ff662d i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment
Hyper-V TLFS specifies this enlightenment as:
"NoNonArchitecturalCoreSharing - Indicates that a virtual processor will never
share a physical core with another virtual processor, except for virtual
processors that are reported as sibling SMT threads. This can be used as an
optimization to avoid the performance overhead of STIBP".

However, STIBP is not the only implication. It was found that Hyper-V on
KVM doesn't pass MD_CLEAR bit to its guests if it doesn't see
NoNonArchitecturalCoreSharing bit.

KVM reports NoNonArchitecturalCoreSharing in KVM_GET_SUPPORTED_HV_CPUID to
indicate that SMT on the host is impossible (not supported of forcefully
disabled).

Implement NoNonArchitecturalCoreSharing support in QEMU as tristate:
'off' - the feature is disabled (default)
'on' - the feature is enabled. This is only safe if vCPUS are properly
 pinned and correct topology is exposed. As CPU pinning is done outside
 of QEMU the enablement decision will be made on a higher level.
'auto' - copy KVM setting. As during live migration SMT settings on the
source and destination host may differ this requires us to add a migration
blocker.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20191018163908.10246-1-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-10-22 09:38:42 +02:00
..
hvf target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro 2019-10-15 18:34:44 -03:00
Makefile.objs target-i386: add kvm stubs to user-mode emulators 2019-03-11 16:33:49 +01:00
TODO
arch_dump.c
arch_memory_mapping.c
bpt_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
cc_helper.c
cc_helper_template.h
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 07:03:34 -07:00
cpu-qom.h hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
cpu.c i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment 2019-10-22 09:38:42 +02:00
cpu.h i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment 2019-10-22 09:38:42 +02:00
excp_helper.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
fpu_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
gdbstub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
hax-all.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
hax-i386.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
hax-interface.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
hax-mem.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
hax-posix.c hax: Support for Linux hosts 2019-01-11 13:57:24 +01:00
hax-posix.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
hax-windows.c
hax-windows.h
helper.c Fix wrong behavior of cpu_memory_rw_debug() function in SMM 2019-10-04 18:49:18 +02:00
helper.h target/i386: Implement CPUID_EXT_RDRAND 2019-05-22 12:38:54 -04:00
hyperv-proto.h i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment 2019-10-22 09:38:42 +02:00
hyperv-stub.c target/i386: fix feature check in hyperv-stub.c 2019-07-05 22:16:46 +02:00
hyperv.c i386/kvm: convert hyperv enlightenments properties from bools to bits 2019-06-21 02:29:38 +02:00
hyperv.h
int_helper.c target/i386: Implement CPUID_EXT_RDRAND 2019-05-22 12:38:54 -04:00
kvm-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm.c i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment 2019-10-22 09:38:42 +02:00
kvm_i386.h target/i386: kvm: Demand nested migration kernel capabilities only when vCPU may have enabled VMX 2019-07-19 18:01:47 +02:00
machine.c kvm: i386: halt poll control MSR support 2019-08-20 17:26:17 +02:00
mem_helper.c cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
misc_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
monitor.c Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
mpx_helper.c
ops_sse.h target/i386: Return 'indefinite integer value' for invalid SSE fp->int conversions 2019-08-20 17:26:20 +02:00
ops_sse_header.h
seg_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
sev-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
sev.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
sev_i386.h Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
shift_helper_template.h
smm_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
svm.h
svm_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
translate.c tcg: TCGMemOp is now accelerator independent MemOp 2019-09-03 08:30:38 -07:00
whp-dispatch.h Normalize position of header guard 2019-06-12 13:20:20 +02:00
whpx-all.c target/i386: Fix broken build with WHPX enabled 2019-09-26 19:00:53 +01:00
xsave_helper.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00