mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs
CPUID.7.0.EBX[1]=1 indicates IA32_TSC_ADJUST MSR 0x3b is supported Basic design is to emulate the MSR by allowing reads and writes to the hypervisor vcpu specific locations to store the value of the emulated MSRs. In this way the IA32_TSC_ADJUST value will be included in all reads to the TSC MSR whether through rdmsr or rdtsc. As this is a new MSR that the guest may access and modify its value needs to be migrated along with the other MRSs. The changes here are specifically for recognizing when IA32_TSC_ADJUST is enabled in CPUID and code added for migrating its value. Signed-off-by: Will Auld <will.auld@intel.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
committed by
Marcelo Tosatti
parent
e376a788ae
commit
f28558d3d3
@@ -295,6 +295,7 @@
|
||||
#define MSR_IA32_APICBASE_BSP (1<<8)
|
||||
#define MSR_IA32_APICBASE_ENABLE (1<<11)
|
||||
#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
|
||||
#define MSR_TSC_ADJUST 0x0000003b
|
||||
#define MSR_IA32_TSCDEADLINE 0x6e0
|
||||
|
||||
#define MSR_MTRRcap 0xfe
|
||||
@@ -774,6 +775,7 @@ typedef struct CPUX86State {
|
||||
uint64_t pv_eoi_en_msr;
|
||||
|
||||
uint64_t tsc;
|
||||
uint64_t tsc_adjust;
|
||||
uint64_t tsc_deadline;
|
||||
|
||||
uint64_t mcg_status;
|
||||
|
||||
Reference in New Issue
Block a user