From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 0/2] KVM: nVMX: Fix nested posted interrupts delivery Date: Mon, 24 Jul 2017 19:08:14 +0200 Message-ID: <4299a76f-5740-aa04-a893-d4f643c37320@redhat.com> References: <1493356439-7293-1-git-send-email-fanwenyi0529@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: fanwenyi0529@gmail.com, jmattson@google.com, kvm@vger.kernel.org Return-path: Received: from mail-wm0-f66.google.com ([74.125.82.66]:34798 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755448AbdGXRIS (ORCPT ); Mon, 24 Jul 2017 13:08:18 -0400 Received: by mail-wm0-f66.google.com with SMTP id c184so905253wmd.1 for ; Mon, 24 Jul 2017 10:08:17 -0700 (PDT) In-Reply-To: <1493356439-7293-1-git-send-email-fanwenyi0529@gmail.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 28/04/2017 07:13, fanwenyi0529@gmail.com wrote: > From: Wincy Van > > The nested/non-nested PI vector is the same currently, this is wrong > since the non-nested PI may not be recognized if dest vcpu is in L2. > > This patch series introduce a new vector for nested PI to solve the > problem. > > Wincy Van (2): > x86: irq: Define a global vector for nested posted interrupts > KVM: nVMX: Fix posted intr delivery when vcpu is in guest mode > > arch/x86/entry/entry_64.S | 1 + > arch/x86/include/asm/entry_arch.h | 2 ++ > arch/x86/include/asm/hardirq.h | 1 + > arch/x86/include/asm/hw_irq.h | 2 ++ > arch/x86/include/asm/irq_vectors.h | 1 + > arch/x86/kernel/irq.c | 13 +++++++++++++ > arch/x86/kernel/irqinit.c | 2 ++ > arch/x86/kvm/vmx.c | 22 +++++++++++----------- > 8 files changed, 33 insertions(+), 11 deletions(-) > Belatedly applying this, with this change: diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index e3d4718faa95..6b85958ea2ec 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -155,6 +155,12 @@ int arch_show_interrupts(struct seq_file *p, int prec) seq_printf(p, "%10u ", irq_stats(j)->kvm_posted_intr_ipis); seq_puts(p, " Posted-interrupt notification event\n"); + seq_printf(p, "%*s: ", prec, "NPI"); + for_each_online_cpu(j) + seq_printf(p, "%10u ", + irq_stats(j)->kvm_posted_intr_nested_ipis); + seq_puts(p, " Nested posted-interrupt wakeup event\n"); + seq_printf(p, "%*s: ", prec, "PIW"); for_each_online_cpu(j) seq_printf(p, "%10u ", on top of patch 1. Paolo