From: Gleb Natapov <gleb@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, Avi Kivity <avi@redhat.com>,
kvm@vger.kernel.org, Michael Tokarev <mjt@tls.msk.ru>,
Guillem Jover <guillem@debian.org>
Subject: Re: [regression] KVM: hangs and "irq timeout" booting HURD unless -no-kvm-irqchip passed
Date: Tue, 8 Feb 2011 16:41:43 +0200 [thread overview]
Message-ID: <20110208144143.GM14984@redhat.com> (raw)
In-Reply-To: <20110208142253.GA8243@amt.cnet>
On Tue, Feb 08, 2011 at 12:22:53PM -0200, Marcelo Tosatti wrote:
> On Tue, Feb 08, 2011 at 02:00:37PM +0200, Gleb Natapov wrote:
> > On Mon, Feb 07, 2011 at 07:40:55PM -0600, Jonathan Nieder wrote:
> > > Gleb Natapov wrote:
> > >
> > > > Is this patch helps?
> > > >
> > > > diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
> > > > index 3cece05..62b1dde 100644
> > > > --- a/arch/x86/kvm/i8259.c
> > > > +++ b/arch/x86/kvm/i8259.c
> > > > @@ -549,6 +549,9 @@ static void pic_irq_request(struct kvm *kvm, int level)
> > > > struct kvm_pic *s = pic_irqchip(kvm);
> > > > int irq = pic_get_irq(&s->pics[0]);
> > > >
> > > > + if (s->output && !level)
> > > > + s->pics[0].isr_ack = 0xff;
> > > > +
> > >
> > > Yes, it does (tested on top of kvm/master). Thanks!
> > Thanks for testing. Can you test this one too please:
> >
> > diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
> > index 3cece05..5528484 100644
> > --- a/arch/x86/kvm/i8259.c
> > +++ b/arch/x86/kvm/i8259.c
> > @@ -62,9 +62,6 @@ static void pic_unlock(struct kvm_pic *s)
> > }
> >
> > if (!found)
> > - found = s->kvm->bsp_vcpu;
> > -
> > - if (!found)
> > return;
> >
> > kvm_make_request(KVM_REQ_EVENT, found);
>
> Gleb,
>
> I don't think the isr_ack logic is overly complex that it should be
Well we continue to find bugs in it.
> removed. For some cases it is still beneficial, see example case on
> commit e48258009d941, which is not handled by kick coalescing of
> kvm_vcpu_kick.
I think the code I've send will not exhibit the behaviour described by
this commit since in that case s->output will never become zero
(kvm_apic_accept_pic_intr() should return false).
>
> What is the problem with Hurd exactly?
The problem is not with Hurd, but with our pic emulation. PIT sends
interrupt while it is unmasked in PIC, HURD never gets it (probably
interrupts are disabled by vcpu), HURD masks PIT interrupt, then it
unmasks it and never gets it since previous one was not acked yet and
isr_ack logic prevent vcpu from been kicked again (and since KVM_REQ_EVENT
is set as part of kick logic vcpu never checks interrupt availability
again).
--
Gleb.
next prev parent reply other threads:[~2011-02-08 14:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 12:35 [PATCH v5 0/5] Nonatomic interrupt injection Avi Kivity
2010-08-30 12:35 ` [PATCH v5 1/5] KVM: Check for pending events before attempting injection Avi Kivity
2011-02-07 6:00 ` [regression] KVM: hangs and "irq timeout" booting HURD unless -no-kvm-irqchip passed Jonathan Nieder
2011-02-07 12:39 ` Avi Kivity
2011-02-07 12:45 ` Gleb Natapov
2011-02-07 13:27 ` Gleb Natapov
2011-02-08 1:40 ` Jonathan Nieder
2011-02-08 7:40 ` Michael Tokarev
2011-02-08 12:00 ` Gleb Natapov
2011-02-08 14:22 ` Marcelo Tosatti
2011-02-08 14:41 ` Gleb Natapov [this message]
2011-02-08 14:43 ` Avi Kivity
2011-02-08 14:47 ` Gleb Natapov
2011-02-08 14:57 ` Avi Kivity
2011-02-08 17:44 ` Marcelo Tosatti
2011-02-08 20:40 ` Jonathan Nieder
2010-08-30 12:35 ` [PATCH v5 2/5] KVM: VMX: Split up vmx_complete_interrupts() Avi Kivity
2010-08-30 12:35 ` [PATCH v5 3/5] KVM: VMX: Move real-mode interrupt injection fixup to vmx_complete_interrupts() Avi Kivity
2010-08-30 12:35 ` [PATCH v5 4/5] KVM: VMX: Parameterize vmx_complete_interrupts() for both exit and entry Avi Kivity
2010-08-30 12:35 ` [PATCH v5 5/5] KVM: Non-atomic interrupt injection 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=20110208144143.GM14984@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=guillem@debian.org \
--cc=jrnieder@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--cc=mtosatti@redhat.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;
as well as URLs for NNTP newsgroup(s).