diff mbox

[0/2] KVM: nVMX: Fix nested posted interrupts delivery

Message ID 4299a76f-5740-aa04-a893-d4f643c37320@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paolo Bonzini July 24, 2017, 5:08 p.m. UTC
On 28/04/2017 07:13, fanwenyi0529@gmail.com wrote:
> From: Wincy Van <fanwenyi0529@gmail.com>
> 
> 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:


on top of patch 1.

Paolo

Comments

Wincy Van July 25, 2017, 1:25 a.m. UTC | #1
On Tue, Jul 25, 2017 at 1:08 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 28/04/2017 07:13, fanwenyi0529@gmail.com wrote:
>> From: Wincy Van <fanwenyi0529@gmail.com>
>>
>> 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.
>

It's nice, thank you :)

Wincy
diff mbox

Patch

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 ",