qemu-e2k/target/i386
Tao Xu 67192a298f x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE
UMONITOR, UMWAIT and TPAUSE are a set of user wait instructions.
This patch adds support for user wait instructions in KVM. Availability
of the user wait instructions is indicated by the presence of the CPUID
feature flag WAITPKG CPUID.0x07.0x0:ECX[5]. User wait instructions may
be executed at any privilege level, and use IA32_UMWAIT_CONTROL MSR to
set the maximum time.

The patch enable the umonitor, umwait and tpause features in KVM.
Because umwait and tpause can put a (psysical) CPU into a power saving
state, by default we dont't expose it to kvm and enable it only when
guest CPUID has it. And use QEMU command-line "-overcommit cpu-pm=on"
(enable_cpu_pm is enabled), a VM can use UMONITOR, UMWAIT and TPAUSE
instructions. If the instruction causes a delay, the amount of time
delayed is called here the physical delay. The physical delay is first
computed by determining the virtual delay (the time to delay relative to
the VM’s timestamp counter). Otherwise, UMONITOR, UMWAIT and TPAUSE cause
an invalid-opcode exception(#UD).

The release document ref below link:
https://software.intel.com/sites/default/files/\
managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf

Co-developed-by: Jingqi Liu <jingqi.liu@intel.com>
Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
Signed-off-by: Tao Xu <tao3.xu@intel.com>
Message-Id: <20191011074103.30393-2-tao3.xu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-10-23 17:50:27 +02:00
..
hvf target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro 2019-10-15 18:34:44 -03:00
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_template.h
cc_helper.c
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 x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE 2019-10-23 17:50:27 +02:00
cpu.h x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE 2019-10-23 17:50:27 +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
hax-interface.h
hax-mem.c
hax-posix.c
hax-posix.h
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_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
kvm-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm.c x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE 2019-10-23 17:50:27 +02:00
machine.c kvm: i386: halt poll control MSR support 2019-08-20 17:26:17 +02:00
Makefile.objs
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_header.h
ops_sse.h target/i386: Return 'indefinite integer value' for invalid SSE fp->int conversions 2019-08-20 17:26:20 +02:00
seg_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
sev_i386.h Include generated QAPI headers less 2019-08-16 13:31:51 +02: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
shift_helper_template.h
smm_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
svm_helper.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00
svm.h
TODO
trace-events
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