mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
KVM: Skip unnecessary "unmap" if gpc is already valid during refresh
When refreshing a gfn=>pfn cache, skip straight to unlocking if the cache already valid instead of stuffing the "old" variables to turn the unmapping outro into a nop. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
This commit is contained in:
committed by
David Woodhouse
parent
58f5ee5fed
commit
06e155c44a
@@ -301,9 +301,8 @@ static int __kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, gpa_t gpa,
|
|||||||
* may have changed.
|
* may have changed.
|
||||||
*/
|
*/
|
||||||
gpc->khva = old_khva + page_offset;
|
gpc->khva = old_khva + page_offset;
|
||||||
old_pfn = KVM_PFN_ERR_FAULT;
|
|
||||||
old_khva = NULL;
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
Reference in New Issue
Block a user