summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_types.h
diff options
context:
space:
mode:
authorMichal Luczaj <mhal@rbox.co>2022-10-13 21:12:24 +0000
committerDavid Woodhouse <dwmw@amazon.co.uk>2022-11-30 19:25:23 +0000
commit8c82a0b3ba1a411b84af5d43a4cc5994efa897ec (patch)
treeb7305a994d35882a01e9514207160bcd7cd0f408 /include/linux/kvm_types.h
parent214b0a88c46d5f32d80abe0d1bc2eea1cbd38f11 (diff)
downloadlinux-stable-8c82a0b3ba1a411b84af5d43a4cc5994efa897ec.tar.gz
linux-stable-8c82a0b3ba1a411b84af5d43a4cc5994efa897ec.tar.bz2
linux-stable-8c82a0b3ba1a411b84af5d43a4cc5994efa897ec.zip
KVM: Store immutable gfn_to_pfn_cache properties
Move the assignment of immutable properties @kvm, @vcpu, and @usage to the initializer. Make _activate() and _deactivate() use stored values. Note, @len is also effectively immutable for most cases, but not in the case of the Xen runstate cache, which may be split across two pages and the length of the first segment will depend on its address. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> [sean: handle @len in a separate patch] Signed-off-by: Sean Christopherson <seanjc@google.com> [dwmw2: acknowledge that @len can actually change for some use cases] Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Diffstat (limited to 'include/linux/kvm_types.h')
-rw-r--r--include/linux/kvm_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h
index 3ca3db020e0e..76de36e56cdf 100644
--- a/include/linux/kvm_types.h
+++ b/include/linux/kvm_types.h
@@ -67,6 +67,7 @@ struct gfn_to_pfn_cache {
gpa_t gpa;
unsigned long uhva;
struct kvm_memory_slot *memslot;
+ struct kvm *kvm;
struct kvm_vcpu *vcpu;
struct list_head list;
rwlock_t lock;