From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 2/4] Rewrite twisted maze of if() statements with more straightforward switch()
Date: Mon, 30 Mar 2009 18:03:58 +0200 [thread overview]
Message-ID: <49D0ED6E.9070808@web.de> (raw)
In-Reply-To: <49D07652.30502@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
Avi Kivity wrote:
> Gleb Natapov wrote:
>> Signed-off-by: Gleb Natapov <gleb@redhat.com>
>>
>
> This is actually not just a rewrite, but also a bugfix:
>
>> INTR_INFO);
>> @@ -3289,34 +3288,42 @@ static void vmx_complete_interrupts(struct
>> vcpu_vmx *vmx)
>> vmx->vnmi_blocked_time +=
>> ktime_to_ns(ktime_sub(ktime_get(), vmx->entry_time));
>>
>> + vmx->vcpu.arch.nmi_injected = false;
>> + kvm_clear_exception_queue(&vmx->vcpu);
>> + kvm_clear_interrupt_queue(&vmx->vcpu);
>> +
>> + if (!idtv_info_valid)
>> + return;
>> +
>> vector = idt_vectoring_info & VECTORING_INFO_VECTOR_MASK;
>> type = idt_vectoring_info & VECTORING_INFO_TYPE_MASK;
>> - if (vmx->vcpu.arch.nmi_injected) {
>> +
>> + switch(type) {
>> + case INTR_TYPE_NMI_INTR:
>> + vmx->vcpu.arch.nmi_injected = true;
>> /*
>>
>
> The existing code would leave nmi_injected == false if we exit on
> NMI_INTR, so we drop an NMI here.
>
I think NMI_INTR and nmi_injected always go together. However, the
rework looks good and more logical to me, too. Will see that I can give
this (more precisely -v2) a try with our scenarios ASAP.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-03-30 16:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 14:12 [PATCH 1/4] Fix handling of a fault during NMI unblocked due to IRET Gleb Natapov
2009-03-29 14:12 ` [PATCH 2/4] Rewrite twisted maze of if() statements with more straightforward switch() Gleb Natapov
2009-03-30 7:35 ` Avi Kivity
2009-03-30 16:03 ` Jan Kiszka [this message]
2009-03-29 14:12 ` [PATCH 3/4] Do not zero idt_vectoring_info in vmx_complete_interrupts() Gleb Natapov
2009-03-29 14:12 ` [PATCH 4/4] Fix task switching Gleb Natapov
2009-03-30 7:39 ` Avi Kivity
2009-03-30 13:06 ` Gleb Natapov
2009-03-30 16:04 ` Jan Kiszka
2009-03-30 16:21 ` Gleb Natapov
2009-03-30 16:35 ` Jan Kiszka
2009-03-30 16:39 ` Gleb Natapov
2009-03-30 16:46 ` Gleb Natapov
2009-03-30 23:54 ` Julian Stecklina
2009-03-31 9:03 ` Kohl, Bernhard (NSN - DE/Munich)
2009-03-31 15:21 ` Kohl, Bernhard (NSN - DE/Munich)
2009-03-31 15:22 ` Gleb Natapov
2009-04-01 7:21 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49D0ED6E.9070808@web.de \
--to=jan.kiszka@web.de \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.