]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Set CR4.PKE/LA57 in MMU role iff long mode is active
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:12 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:41 +0000 (18:00 -0400)
commita30c8b03fa0309d9b7387220c848ed9f3eedbf49
treed1f357134c52ba6e9c07d88c979a995fac1aad65
parente8683d5d7e47bdf64117ecd21903e057b6e0233c
KVM: x86/mmu: Set CR4.PKE/LA57 in MMU role iff long mode is active

Don't set cr4_pke or cr4_la57 in the MMU role if long mode isn't active,
which is required for protection keys and 5-level paging to be fully
enabled.  Ignoring the bit avoids unnecessary reconfiguration on reuse,
and also means consumers of mmu_role don't need to manually check for
long mode.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210622175739.3610207-28-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c