diff options
author | Sunil Muthuswamy <sunilmut@microsoft.com> | 2020-02-26 20:54:39 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-16 23:02:21 +0100 |
commit | 6785e767017a3fcc39e245b7bca2c383b8bf39ef (patch) | |
tree | c1a080df48d48a2bf309cad33773793e3a0d1689 /include/sysemu | |
parent | 27f08ea1c7abf04125f6f9f23b8ba2f8c20e95b6 (diff) | |
download | qemu-6785e767017a3fcc39e245b7bca2c383b8bf39ef.zip qemu-6785e767017a3fcc39e245b7bca2c383b8bf39ef.tar.gz qemu-6785e767017a3fcc39e245b7bca2c383b8bf39ef.tar.bz2 |
WHPX: TSC get and set should be dependent on VM state
Currently, TSC is set as part of the VM runtime state. Setting TSC at
runtime is heavy and additionally can have side effects on the guest,
which are not very resilient to variances in the TSC. This patch uses
the VM state to determine whether to set TSC or not. Some minor
enhancements for getting TSC values as well that considers the VM state.
Additionally, while setting the TSC, the partition is suspended to
reduce the variance in the TSC value across vCPUs.
Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Message-Id: <SN4PR2101MB08804D23439166E81FF151F7C0EA0@SN4PR2101MB0880.namprd21.prod.outlook.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/whpx.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h index 4794e8e..a84b49e 100644 --- a/include/sysemu/whpx.h +++ b/include/sysemu/whpx.h @@ -35,4 +35,11 @@ int whpx_enabled(void); #endif /* CONFIG_WHPX */ +/* state subset only touched by the VCPU itself during runtime */ +#define WHPX_SET_RUNTIME_STATE 1 +/* state subset modified during VCPU reset */ +#define WHPX_SET_RESET_STATE 2 +/* full state set, modified during initialization or on vmload */ +#define WHPX_SET_FULL_STATE 3 + #endif /* QEMU_WHPX_H */ |