]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Reset mmu->pkru_mask to avoid stale data
authorChenyi Qiang <chenyi.qiang@intel.com>
Thu, 21 Oct 2021 07:10:22 +0000 (15:10 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Oct 2021 15:09:29 +0000 (11:09 -0400)
commit0f2ef55078f63db8b948023d8ca75bc334b43f57
tree27a872ad72424bb825cedf0ee3a7b79c210b6758
parentb602e04543606a0b1832ecb2d9ae644250f856ea
KVM: MMU: Reset mmu->pkru_mask to avoid stale data

When updating mmu->pkru_mask, the value can only be added but it isn't
reset in advance. This will make mmu->pkru_mask keep the stale data.
Fix this issue.

Fixes: c9dec12d15a1 ("KVM, pkeys: introduce pkru_mask to cache conditions")
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Message-Id: <20211021071022.1140-1-chenyi.qiang@intel.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c