KVM: nVMX: Add a TSC multiplier field in VMCS12
This is required for supporting nested TSC scaling. Signed-off-by: Ilias Stamatis <ilstam@amazon.com> Reviewed-by: Jim Mattson <jmattson@google.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20210526184418.28881-6-ilstam@amazon.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
fe3eb50418
commit
3c0f99366e
|
@ -37,6 +37,7 @@ const unsigned short vmcs_field_to_offset_table[] = {
|
|||
FIELD64(VM_ENTRY_MSR_LOAD_ADDR, vm_entry_msr_load_addr),
|
||||
FIELD64(PML_ADDRESS, pml_address),
|
||||
FIELD64(TSC_OFFSET, tsc_offset),
|
||||
FIELD64(TSC_MULTIPLIER, tsc_multiplier),
|
||||
FIELD64(VIRTUAL_APIC_PAGE_ADDR, virtual_apic_page_addr),
|
||||
FIELD64(APIC_ACCESS_ADDR, apic_access_addr),
|
||||
FIELD64(POSTED_INTR_DESC_ADDR, posted_intr_desc_addr),
|
||||
|
|
|
@ -70,7 +70,8 @@ struct __packed vmcs12 {
|
|||
u64 eptp_list_address;
|
||||
u64 pml_address;
|
||||
u64 encls_exiting_bitmap;
|
||||
u64 padding64[2]; /* room for future expansion */
|
||||
u64 tsc_multiplier;
|
||||
u64 padding64[1]; /* room for future expansion */
|
||||
/*
|
||||
* To allow migration of L1 (complete with its L2 guests) between
|
||||
* machines of different natural widths (32 or 64 bit), we cannot have
|
||||
|
@ -258,6 +259,7 @@ static inline void vmx_check_vmcs12_offsets(void)
|
|||
CHECK_OFFSET(eptp_list_address, 304);
|
||||
CHECK_OFFSET(pml_address, 312);
|
||||
CHECK_OFFSET(encls_exiting_bitmap, 320);
|
||||
CHECK_OFFSET(tsc_multiplier, 328);
|
||||
CHECK_OFFSET(cr0_guest_host_mask, 344);
|
||||
CHECK_OFFSET(cr4_guest_host_mask, 352);
|
||||
CHECK_OFFSET(cr0_read_shadow, 360);
|
||||
|
|
Loading…
Reference in New Issue