]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Always set new mmu_role immediately after checking old role
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:13 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:42 +0000 (18:00 -0400)
commit62faf4dc95f4535db810fa7e427be7d260daa317
treeb5b344e2c21dc5b713d19b1dea42100b0c5fd6d7
parenta30c8b03fa0309d9b7387220c848ed9f3eedbf49
KVM: x86/mmu: Always set new mmu_role immediately after checking old role

Refactor shadow MMU initialization to immediately set its new mmu_role
after verifying it differs from the old role, and so that all flavors
of MMU initialization share the same check-and-set pattern.  Immediately
setting the role will allow future commits to use mmu_role to configure
the MMU without consuming stale state.

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