Re: [PATCH] KVM: x86/mmu: Refactor slot null check in kvm_mmu_hugepage_adjust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 24, 2021, David Matlack wrote:
> The current code is correct but relies on is_error_noslot_pfn() to
> ensure slot is not null. The only reason is_error_noslot_pfn() was
> checked instead is because we did not have the slot before
> commit 6574422f913e ("KVM: x86/mmu: Pass the memslot around via struct
> kvm_page_fault") and looking up the memslot is expensive.
> 
> Now that the slot is available, explicitly check if it's null and
> get rid of the redundant is_error_noslot_pfn() check.
> 
> Suggested-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
> ---

Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux