]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: nSVM: Advertise and enable NRIPS for L1 iff nrips is enabled
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 2 Mar 2020 23:57:08 +0000 (15:57 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Mar 2020 16:58:44 +0000 (17:58 +0100)
commit4eb87460c4740030086411c3b7a7e167fb7e57bd
tree7cfa19b2b95f78365de59c55f96c874dd28259dd
parenta50718cc3f43f12e6e33b098b5e2a9eb19f13158
KVM: nSVM: Advertise and enable NRIPS for L1 iff nrips is enabled

Set NRIPS in KVM capabilities if and only if nrips=true, which naturally
incorporates the boot_cpu_has() check, and set nrips_enabled only if the
KVM capability is enabled.

Note, previously KVM would set nrips_enabled based purely on userspace
input, but at worst that would cause KVM to propagate garbage into L1,
i.e. userspace would simply be hosing its VM.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c