Re: [PATCH v2 4/4] KVM: SVM: Support #GP handling for the case of nested on nested

From: Paolo Bonzini
Date: Thu Jan 21 2021 - 09:28:57 EST


On 21/01/21 07:55, Wei Huang wrote:
+ if (nested && guest_cpuid_has(vcpu, X86_FEATURE_SVM)) {
+ best = kvm_find_cpuid_entry(vcpu, 0x8000000A, 0);
+ best->edx |= (1 << 28);
+ }
+

Instead of this, please use kvm_cpu_cap_set in svm_set_cpu_caps's "if (nested)".

Paolo