• Sean Christopherson's avatar
    KVM: nVMX: Disable PML in hardware when running L2 · c3bb9a20
    Sean Christopherson authored
    Unconditionally disable PML in vmcs02, KVM emulates PML purely in the
    MMU, e.g. vmx_flush_pml_buffer() doesn't even try to copy the L2 GPAs
    from vmcs02's buffer to vmcs12.  At best, enabling PML is a nop.  At
    worst, it will cause vmx_flush_pml_buffer() to record bogus GFNs in the
    dirty logs.
    
    Initialize vmcs02.GUEST_PML_INDEX such that PML writes would trigger
    VM-Exit if PML was somehow enabled, skip flushing the buffer for guest
    mode since the index is bogus, and freak out if a PML full exit occurs
    when L2 is active.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20210213005015.1651772-7-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c3bb9a20
nested.c 202 KB