From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanpeng Li Subject: Re: [PATCH v3 5/6] KVM: X86: Add NMI support to PV IPIs Date: Fri, 20 Jul 2018 11:53:05 +0800 Message-ID: References: <1530598891-21370-1-git-send-email-wanpengli@tencent.com> <1530598891-21370-6-git-send-email-wanpengli@tencent.com> <20180719163138.GC11749@flask> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: LKML , kvm , Paolo Bonzini , Vitaly Kuznetsov To: Radim Krcmar Return-path: In-Reply-To: <20180719163138.GC11749@flask> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, 20 Jul 2018 at 00:31, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > > 2018-07-03 14:21+0800, Wanpeng Li: > > From: Wanpeng Li > > > > The NMI delivery mode of ICR is used to deliver an NMI to the processor= , > > and the vector information is ignored. > > > > Cc: Paolo Bonzini > > Cc: Radim Kr=C4=8Dm=C3=A1=C5=99 > > Cc: Vitaly Kuznetsov > > Signed-off-by: Wanpeng Li > > --- > > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c > > @@ -479,7 +479,16 @@ static int __send_ipi_mask(const struct cpumask *m= ask, int vector) > > } > > } > > > > - ret =3D kvm_hypercall3(KVM_HC_SEND_IPI, ipi_bitmap_low, ipi_bitma= p_high, vector); > > + switch (vector) { > > + default: > > + icr =3D APIC_DM_FIXED | vector; > > + break; > > + case NMI_VECTOR: > > + icr =3D APIC_DM_NMI; > > I think it would be better to say that KVM interprets NMI_VECTOR and > sends the interrupt as APIC_DM_NMI. Yeah, in addition, SDM 10.6.1 also mentioned that: Delivery mode: 100 (NMI) Delivers an NMI interrupt to the target processor or processors. The vector information is ignored. Regards, Wanpeng Li