]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Do not set paging-related bits in MMU role if CR0.PG=0
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:11 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:41 +0000 (18:00 -0400)
commite8683d5d7e47bdf64117ecd21903e057b6e0233c
tree2fcf82a5078f2b91cff342ba487b3bb68b86f8f2
parenta8f3e47e3cb18cce95256ce312252cec468c2614
KVM: x86/mmu: Do not set paging-related bits in MMU role if CR0.PG=0

Don't set CR0/CR4/EFER bits in the MMU role if paging is disabled, paging
modifiers are irrelevant if there is no paging in the first place.
Somewhat arbitrarily clear gpte_is_8_bytes for shadow paging if paging is
disabled in the guest.  Again, there are no guest PTEs to process, so the
size is meaningless.

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