mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
27f08ea1c7
commit
6785e76701
3 changed files with 110 additions and 9 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue