Skip to content
Commit 8c82a0b3 authored by Michal Luczaj's avatar Michal Luczaj Committed by David Woodhouse
Browse files

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: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarMichal Luczaj <mhal@rbox.co>
[sean: handle @len in a separate patch]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
[dwmw2: acknowledge that @len can actually change for some use cases]
Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
parent 214b0a88
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment