From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>,
"Xu, Jiajun" <jiajun.xu@intel.com>,
"Yang, Sheng" <sheng.yang@intel.com>
Subject: Re: [PATCH] KVM: VMX: Fix race between pending IRQ and NMI
Date: Tue, 25 Nov 2008 15:55:23 +0100 [thread overview]
Message-ID: <492C11DB.3060800@siemens.com> (raw)
In-Reply-To: <492C0F6C.7060604@redhat.com>
Avi Kivity wrote:
> Jan Kiszka wrote:
>>>>> But I think I see a bigger issue - if we inject an regular interrupt
>>>>> while another is pending, then we will encounter this problem. Looks
>>>>> like we have to enable the interrupt window after injecting an
>>>>> interrupt
>>>>> if there are still pending interrupts.
>>>>>
>>>> Yeah, probably. I'm just wondering now if we can set
>>>> exit-on-interrupt-window while the vcpu state is interruptible (ie.
>>>> _before_ the injection). There is some entry check like this for NMIs,
>>>> but maybe no for interrupts. Need to check.
>>>>
>>> Turns out it's not necessary, since the guest eoi will cause an exit and
>>> allow the code to request an interrupt window.
>>>
>>
>> But you added explicit handling now nevertheless?
>>
>
> Yes, in case some eoi-less mode is introduced either by hardware or
> paravirt. I regard the fact that it works as accidental (though applies
> to x86 virtualization in general).
>
>>> I've added an apic test program so we can track these issues
>>> (user/test/x86/apic.c).
>>>
>>>
>>
>> That's good. BTW, your NMI race fix is still lacking support for the
>> -no-kvm-irqchip case. Will post an according patch later today.
>>
>
> Actually, I couldn't get the 5.2 guest to boot with -no-kvm-irqchip: it
> hangs and needs some help by running 'info registers'.
Oh, yes, someone borked something here. That must have happened just
recently I think. And it must be a userspace bug as some older kvm that
happened to hang around here (-74) works fine against latest kernel. No
time to investigate further right now, sorry.
Jan
--
Siemens AG, Corporate Technology, CT SE 2 ES-OS
Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2008-11-25 14:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 15:52 [PATCH] KVM: VMX: Fix race between pending IRQ and NMI Jan Kiszka
2008-11-16 12:29 ` Avi Kivity
2008-11-16 14:58 ` Jan Kiszka
2008-11-16 15:15 ` Avi Kivity
2008-11-16 15:39 ` Jan Kiszka
2008-11-19 17:38 ` Avi Kivity
2008-11-19 21:28 ` Avi Kivity
2008-11-20 13:29 ` Jan Kiszka
2008-11-20 13:59 ` Avi Kivity
2008-11-21 10:04 ` Jan Kiszka
2008-11-21 11:14 ` Avi Kivity
2008-11-22 12:25 ` Avi Kivity
2008-11-24 9:55 ` Jan Kiszka
2008-11-25 14:45 ` Avi Kivity
2008-11-25 14:55 ` Jan Kiszka [this message]
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=492C11DB.3060800@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=avi@redhat.com \
--cc=jiajun.xu@intel.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