From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@qumranet.com>
Cc: "Yang, Sheng" <sheng.yang@intel.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: VMX: NMI injection without virtual NMI support
Date: Sat, 13 Sep 2008 08:27:10 +0200 [thread overview]
Message-ID: <48CB5D3E.1000505@web.de> (raw)
In-Reply-To: <48CB4C2A.5030804@qumranet.com>
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
Avi Kivity wrote:
> Jan Kiszka wrote:
>> Well, I thought in this direction already as well. But I wasn't sure if,
>> while the guest is in NMI context, hard IRQs will also be blocked and
>> won't cause guest exists anymore. Can you comment on this?
>>
>> However, even if that is no issue, I do not really like this workaround.
>> Specifically the need to fiddle with the guest's IDT and, of course,
>> that we may delays host NMIs.
>>
>> I'm now playing with this idea, basically a "light" version of yours:
>> After we injected an NMI, consider the guest being in NMI context until
>> the next IRQ window opens. That may cause lost NMIs if the guest blocks
>> IRQ delivery infinitely, but I would say this is rather untypical and
>> still much better than the current situation (no NMIs at all!). And it
>> is easier to implement. Comments?
>>
>>
>>
>
>
> In some cases misbehaving NMIs are worse than no NMIs. For example, a
> software watchdog may use NMIs to monitor a system. But if the guest
> spins with interrupts disabled, the irq window will never open, and NMIs
> will never be delivered, so the watchdog will deliver a false negative.
>
I fail to see the regression. Currently that watchdog would _always_
deliver false positives and pull the trigger immediately (in fact, this
is precisely the situation we face @work with some special board
emulation where we have to provide an NMI-based watchdog).
Moreover, only the second and succeeding NMIs under the same
interrupts-disabled window need to get lost: Along with injecting the
first NMI we could request the IRQ window unconditionally, using it to
reset the virtual NMI-blocked state.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2008-09-13 6:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-11 15:11 VMX: NMI injection without virtual NMI support Jan Kiszka
2008-09-12 6:29 ` Yang, Sheng
2008-09-12 8:34 ` Jan Kiszka
2008-09-13 5:14 ` Avi Kivity
2008-09-13 6:27 ` Jan Kiszka [this message]
2008-09-13 8:58 ` Avi Kivity
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=48CB5D3E.1000505@web.de \
--to=jan.kiszka@web.de \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=sheng.yang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox