public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Glauber Costa <glommer@gmail.com>
Cc: avi@redhat.com, glommer@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] various fixes for CPU/PCI hotplug
Date: Tue, 3 Feb 2009 22:27:58 +0200	[thread overview]
Message-ID: <20090203202758.GD29674@redhat.com> (raw)
In-Reply-To: <5d6222a80902031058y545c6676v17ff99747fa0423e@mail.gmail.com>

On Tue, Feb 03, 2009 at 04:58:31PM -0200, Glauber Costa wrote:
> >
> >  void qemu_system_device_hot_add(int pcibus, int slot, int state)
> >  {
> > -    qemu_set_irq(pm_state->irq, 1);
> >     pci0_status.up = 0;
> >     pci0_status.down = 0;
> >     if (state)
> >         enable_device(&pci0_status, &gpe, slot);
> >     else
> >         disable_device(&pci0_status, &gpe, slot);
> > -    qemu_set_irq(pm_state->irq, 0);
> > +
> > +    if (gpe.en & 2) {
> > +        qemu_set_irq(pm_state->irq, 1);
> > +        qemu_set_irq(pm_state->irq, 0);
> > +    }
> >  }
> 
> Are you sure this works? The trigger is now happening after all the
> events take place. It might well work depending on how qemu exposes
> this, but I have some spare memories of having problems with this in
> the past.
> 
>From my limited testing it works and I don't see why it shoudn't. What
do you think can go wrong? Actually triggering an interrupt before
programming status looks suspicious to me.

--
			Gleb.

      parent reply	other threads:[~2009-02-03 20:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 14:01 [PATCH] various fixes for CPU/PCI hotplug Gleb Natapov
2009-02-03 14:46 ` dima
2009-02-03 15:13   ` Gleb Natapov
2009-02-03 16:43 ` Marcelo Tosatti
2009-02-03 16:47   ` Gleb Natapov
2009-02-03 18:58 ` Glauber Costa
2009-02-03 19:11   ` Marcelo Tosatti
2009-02-03 20:27   ` Gleb Natapov [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=20090203202758.GD29674@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=glommer@gmail.com \
    --cc=glommer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox