]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Do not pin pages tracked by gfn=>pfn caches
authorSean Christopherson <seanjc@google.com>
Fri, 29 Apr 2022 21:00:25 +0000 (21:00 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 May 2022 09:23:44 +0000 (05:23 -0400)
commitb39ffe78435742503faaad04005d0e502fb04308
tree53f6265abd41eeff11990edf884eb52fe8d68d7f
parent21fa94747a14731eea1015d1c7707076f91aabcb
KVM: Do not pin pages tracked by gfn=>pfn caches

Put the reference to any struct page mapped/tracked by a gfn=>pfn cache
upon inserting the pfn into its associated cache, as opposed to putting
the reference only when the cache is done using the pfn.  In other words,
don't pin pages while they're in the cache.  One of the major roles of
the gfn=>pfn cache is to play nicely with invalidation events, i.e. it
exists in large part so that KVM doesn't rely on pinning pages.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220429210025.3293691-9-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/pfncache.c