KVM: MMU: shadow nested paging does not have PKU
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 22 Nov 2021 18:01:37 +0000 (13:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:44 +0000 (09:04 +0100)
commit87d9c628be264a4d2dbb9eb0e7d629aef8b66339
tree514ebb32b265c45c8615df739415205ac514fd69
parent9325b1dbdbf9563f78e61ad2865a66eb03e7b4ff
KVM: MMU: shadow nested paging does not have PKU

commit 28f091bc2f8c23b7eac2402956b692621be7f9f4 upstream.

Initialize the mask for PKU permissions as if CR4.PKE=0, avoiding
incorrect interpretations of the nested hypervisor's page tables.

Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu/mmu.c