Re: [PATCH v5 27/34] KVM: SVM: Add support for booting APs for an SEV-ES guest
From: Paolo Bonzini
Date: Mon Dec 14 2020 - 11:08:15 EST
On 10/12/20 18:10, Tom Lendacky wrote:
@@ -10144,6 +10144,15 @@ void kvm_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector)
{
struct kvm_segment cs;
+ /*
+ * Guests with protected state can't have their state altered by KVM,
+ * call the vcpu_deliver_sipi_vector() x86 op for processing.
+ */
+ if (vcpu->arch.guest_state_protected) {
+ kvm_x86_ops.vcpu_deliver_sipi_vector(vcpu, vector);
+ return;
+ }
+
Also, I don't mind that you just call
kvm_x86_ops.vcpu_deliver_sipi_vector from lapic.c, and make VMX just do
.vcpu_deliver_sipi_vector = kvm_vcpu_deliver_sipi_vector,
(SVM would do it if !guest_state_protected). This matches more or less
how I redid the MSR part.
Paolo