• Aaron Lewis's avatar
    KVM: nVMX: Add support for capturing highest observable L2 TSC · 662f1d1d
    Aaron Lewis authored
    The L1 hypervisor may include the IA32_TIME_STAMP_COUNTER MSR in the
    vmcs12 MSR VM-exit MSR-store area as a way of determining the highest
    TSC value that might have been observed by L2 prior to VM-exit. The
    current implementation does not capture a very tight bound on this
    value.  To tighten the bound, add the IA32_TIME_STAMP_COUNTER MSR to the
    vmcs02 VM-exit MSR-store area whenever it appears in the vmcs12 VM-exit
    MSR-store area.  When L0 processes the vmcs12 VM-exit MSR-store area
    during the emulation of an L2->L1 VM-exit, special-case the
    IA32_TIME_STAMP_COUNTER MSR, using the value stored in the vmcs02
    VM-exit MSR-store area to derive the value to be stored in the vmcs12
    VM-exit MSR-store area.
    Reviewed-by: default avatarLiran Alon <liran.alon@oracle.com>
    Reviewed-by: default avatarJim Mattson <jmattson@google.com>
    Signed-off-by: default avatarAaron Lewis <aaronlewis@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    662f1d1d
vmx.h 13.4 KB