KVM: MMU: pass arbitrary CR0/CR4/EFER to kvm_init_shadow_mmu
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 May 2020 10:18:31 +0000 (06:18 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jun 2020 08:26:03 +0000 (04:26 -0400)
commit929d1cfaa6926ccee28d8d4220e0b4e2defd9cd1
tree225611f1c1b5ea16921c1e93a7eaad02341d5b14
parentc513f484c5582a8efadf3d72298e2285b041536e
KVM: MMU: pass arbitrary CR0/CR4/EFER to kvm_init_shadow_mmu

This allows fetching the registers from the hsave area when setting
up the NPT shadow MMU, and is needed for KVM_SET_NESTED_STATE (which
runs long after the CR0, CR4 and EFER values in vcpu have been switched
to hold L2 guest state).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/svm/nested.c