1. 28 Jul, 2022 3 commits
    • Sean Christopherson's avatar
      KVM: x86/mmu: Directly "destroy" PTE list when recycling rmaps · a42989e7
      Sean Christopherson authored
      Use pte_list_destroy() directly when recycling rmaps instead of bouncing
      through kvm_unmap_rmapp() and kvm_zap_rmapp().  Calling kvm_unmap_rmapp()
      is unnecessary and odd as it requires passing dummy parameters; passing
      NULL for @slot when __rmap_add() already has a valid slot is especially
      weird and confusing.
      
      No functional change intended.
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220715224226.3749507-3-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a42989e7
    • Sean Christopherson's avatar
      KVM: x86/mmu: Return a u64 (the old SPTE) from mmu_spte_clear_track_bits() · 35d539c3
      Sean Christopherson authored
      Return a u64, not an int, from mmu_spte_clear_track_bits().  The return
      value is the old SPTE value, which is very much a 64-bit value.  The sole
      caller that consumes the return value, drop_spte(), already uses a u64.
      The only reason that truncating the SPTE value is not problematic is
      because drop_spte() only queries the shadow-present bit, which is in the
      lower 32 bits.
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220715224226.3749507-2-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      35d539c3
    • Maciej S. Szmigiero's avatar
      KVM: nSVM: Pull CS.Base from actual VMCB12 for soft int/ex re-injection · da0b93d6
      Maciej S. Szmigiero authored
      enter_svm_guest_mode() first calls nested_vmcb02_prepare_control() to copy
      control fields from VMCB12 to the current VMCB, then
      nested_vmcb02_prepare_save() to perform a similar copy of the save area.
      
      This means that nested_vmcb02_prepare_control() still runs with the
      previous save area values in the current VMCB so it shouldn't take the L2
      guest CS.Base from this area.
      
      Explicitly pull CS.Base from the actual VMCB12 instead in
      enter_svm_guest_mode().
      
      Granted, having a non-zero CS.Base is a very rare thing (and even
      impossible in 64-bit mode), having it change between nested VMRUNs is
      probably even rarer, but if it happens it would create a really subtle bug
      so it's better to fix it upfront.
      
      Fixes: 6ef88d6e ("KVM: SVM: Re-inject INT3/INTO instead of retrying the instruction")
      Signed-off-by: default avatarMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
      Message-Id: <4caa0f67589ae3c22c311ee0e6139496902f2edc.1658159083.git.maciej.szmigiero@oracle.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      da0b93d6
  2. 22 Jul, 2022 1 commit
  3. 20 Jul, 2022 3 commits
  4. 19 Jul, 2022 5 commits
  5. 14 Jul, 2022 28 commits