summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichal Luczaj <mhal@rbox.co>2022-10-13 21:12:28 +0000
committerDavid Woodhouse <dwmw@amazon.co.uk>2022-11-30 19:25:24 +0000
commit0318f207d1c2e297d1ec1c6e145bb8bd053236f9 (patch)
treec3558739bed5ec7bf71b50644999a489fe1dd3ba /include
parent2a0b128a906ab28b1ab41ceedcaf462b6f74f1aa (diff)
downloadlinux-stable-0318f207d1c2e297d1ec1c6e145bb8bd053236f9.tar.gz
linux-stable-0318f207d1c2e297d1ec1c6e145bb8bd053236f9.tar.bz2
linux-stable-0318f207d1c2e297d1ec1c6e145bb8bd053236f9.zip
KVM: Use gfn_to_pfn_cache's immutable "kvm" in kvm_gpc_refresh()
Make kvm_gpc_refresh() use kvm instance cached in gfn_to_pfn_cache. No functional change intended. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> [sean: leave kvm_gpc_unmap() as-is] Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm_host.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index befc8114ed0d..3ce4650776b8 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -1317,23 +1317,21 @@ bool kvm_gpc_check(struct gfn_to_pfn_cache *gpc, gpa_t gpa, unsigned long len);
/**
* kvm_gpc_refresh - update a previously initialized cache.
*
- * @kvm: pointer to kvm instance.
* @gpc: struct gfn_to_pfn_cache object.
* @gpa: updated guest physical address to map.
* @len: sanity check; the range being access must fit a single page.
- *
+
* @return: 0 for success.
* -EINVAL for a mapping which would cross a page boundary.
- * -EFAULT for an untranslatable guest physical address.
+ * -EFAULT for an untranslatable guest physical address.
*
* This will attempt to refresh a gfn_to_pfn_cache. Note that a successful
- * returm from this function does not mean the page can be immediately
+ * return from this function does not mean the page can be immediately
* accessed because it may have raced with an invalidation. Callers must
* still lock and check the cache status, as this function does not return
* with the lock still held to permit access.
*/
-int kvm_gpc_refresh(struct kvm *kvm, struct gfn_to_pfn_cache *gpc, gpa_t gpa,
- unsigned long len);
+int kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, gpa_t gpa, unsigned long len);
/**
* kvm_gpc_unmap - temporarily unmap a gfn_to_pfn_cache.