KVM: nSVM: split nested_vmcb_check_controls
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 May 2020 17:02:15 +0000 (13:02 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jun 2020 08:26:03 +0000 (04:26 -0400)
commitca46d739e3caf44dcd3db9eb8da30d0ff3aa9180
treee6c9bd92b758d9da8cdbd944984444f0fbbddcea
parent08245e6d2e589f2b6e9e275ddb343e2ec9ce94ec
KVM: nSVM: split nested_vmcb_check_controls

The authoritative state does not come from the VMCB once in guest mode,
but KVM_SET_NESTED_STATE can still perform checks on L1's provided SVM
controls because we get them from userspace.

Therefore, split out a function to do them.

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