kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Jan Kiszka <jan.kiszka@web.de>, kvm@vger.kernel.org
Subject: Re: nmi is broken?
Date: Thu, 28 Apr 2011 12:59:09 +0300	[thread overview]
Message-ID: <4DB93A6D.3010703@redhat.com> (raw)
In-Reply-To: <871v0njhab.fsf@devron.myhome.or.jp>

On 04/28/2011 04:28 AM, OGAWA Hirofumi wrote:
> Avi Kivity<avi@redhat.com>  writes:
>
> >  On 04/24/2011 03:24 PM, Jan Kiszka wrote:
> >>  >
> >>  >   This would cause IRQs to be delivered even if the PIT is masked, no?
> >>
> >>  I checked the patch and our code again: NMI watchdog masking is managed
> >>  via arch.vapics_in_nmi_mode and by re-checking the per-APIC mask
> >>  situation in kvm_apic_local_deliver when delivering the NMI.
> >>
> >>  So the patch looks correct - NMIs aren't acked like timer IRQs, the
> >>  current logic is definitely wrong.
> >
> >  Can you elaborate?  Why aren't NMIs acked (if delivered via the PIC)?
> >  Is the PIC programmed into auto-EOI mode or something?
>
> This seems to be complex stuff depending on hardware configurations. I'm
> not fully understanding though, current state of it is,
>
> Yes, PIC is in AEOI mode if linux is using IO-APIC. Um.., kvm says
> irq == 0 is mp_INT mode in MADT, not mp_ExtINT.

That is correct, kvm doesn't connect the master 8259 output to the 
IOAPIC.  Instead the 8259 is connected to LINT0 (which is configured for 
ExtInt when the IOAPIC is disabled, or for NMI which the NMI watchdog is 
enabled).

However, now I can't see how it would work. auto EOI works on the INTA 
cycle, which would only occur if LINT0 is configured for ExtInt.  If it 
is configured for NMI, I don't think it would issue the INTA cycle.  So 
the NMI watchdog not working is actually correct for our hardware 
configuration!

But I may be misunderstanding something here.

> So I guess system does
> automatically INTA cycle (and AEOI because of PIC config), or not
> connected via 8259A? (like in mpspec figure 5-2.)
>
> To checking it, I've tested in check_timer() of linux on the physical
> machine (irq==0 and mp_INT). The test is something like,
>
> 	if (pin1 != -1) {
> 		/*
> 		 * Ok, does IRQ0 through the IOAPIC work?
> 		 */
> 		unmask_IO_APIC_irq(0);
>                  disable_8259_irq(0);
> 		if (timer_irq_works()) {
>
> even if I called disable_8259_irq(0), timer was still working via
> IO-APIC.
>
> Would this explain why?

Sorry, I got lost - what does this explain?

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2011-04-28  9:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 19:21 nmi is broken? OGAWA Hirofumi
2011-04-23 22:50 ` OGAWA Hirofumi
2011-04-24  6:44   ` Avi Kivity
2011-04-24  9:17     ` OGAWA Hirofumi
2011-04-24  9:46       ` Jan Kiszka
2011-04-24 11:13         ` OGAWA Hirofumi
2011-04-24 11:15           ` OGAWA Hirofumi
2011-04-24 12:24     ` Jan Kiszka
2011-04-27  8:55       ` Avi Kivity
2011-04-27 12:09         ` Jan Kiszka
2011-04-28  1:28         ` OGAWA Hirofumi
2011-04-28  9:59           ` Avi Kivity [this message]
2011-04-28 13:44             ` OGAWA Hirofumi
2011-04-28 14:23               ` OGAWA Hirofumi
2011-05-01  1:45                 ` OGAWA Hirofumi
2011-05-02  8:46                   ` Avi Kivity
2011-05-02 14:30                     ` OGAWA Hirofumi
2011-05-03  9:36                       ` Avi Kivity
2011-05-03 10:07                         ` Avi Kivity
2011-05-03 13:25                           ` OGAWA Hirofumi
2011-05-03 13:35                             ` Avi Kivity
2011-05-03 16:57                               ` OGAWA Hirofumi
2011-05-03 17:09                                 ` Avi Kivity
2011-05-03 17:45                                   ` OGAWA Hirofumi
2011-05-04  8:27                                     ` Avi Kivity
2011-05-04 15:40                                       ` OGAWA Hirofumi
2011-05-04 16:15                                         ` Avi Kivity
2011-04-24 14:08     ` Jan Kiszka
2011-05-03  9:43       ` Avi Kivity
2011-05-03 10:37         ` Jan Kiszka
2011-05-03 13:31           ` Avi Kivity
2011-05-03 14:29             ` Jan Kiszka
2011-05-03 14:37               ` Avi Kivity
2011-05-03 15:01                 ` 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=4DB93A6D.3010703@redhat.com \
    --to=avi@redhat.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jan.kiszka@web.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).