]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Put the extra pfn reference when reusing a pfn in the gpc cache
authorSean Christopherson <seanjc@google.com>
Fri, 29 Apr 2022 21:00:21 +0000 (21:00 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 May 2022 09:23:41 +0000 (05:23 -0400)
commit7321e35f72666f008ac0f9470012f3eb3b6f0586
tree8b068db831c9b8db6a179763a710adec69a75469
parent75c629001af99852336f554fd17d3c9c5560abec
KVM: Put the extra pfn reference when reusing a pfn in the gpc cache

Put the struct page reference to pfn acquired by hva_to_pfn() when the
old and new pfns for a gfn=>pfn cache match.  The cache already has a
reference via the old/current pfn, and will only put one reference when
the cache is done with the pfn.

Fixes: a6e521f19aee ("KVM: Reinstate gfn_to_pfn_cache with invalidation support")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220429210025.3293691-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/pfncache.c