| From | Jim Mattson <> | Date | Tue, 3 Mar 2020 10:37:14 -0800 | Subject | Re: [PATCH v2 64/66] KVM: nSVM: Expose SVM features to L1 iff nested is enabled |
| |
On Mon, Mar 2, 2020 at 3:57 PM Sean Christopherson <sean.j.christopherson@intel.com> wrote: > > Set SVM feature bits in KVM capabilities if and only if nested=true, KVM > shouldn't advertise features that realistically can't be used. Use > kvm_cpu_cap_has(X86_FEATURE_SVM) to indirectly query "nested" in > svm_set_supported_cpuid() in anticipation of moving CPUID 0x8000000A > adjustments into common x86 code.
Why not go ahead and report the SVM feature bits regardless of "nested," and lock SVM off in VM_CR when nested=false? That would be more like hardware behavior.
|