public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Glauber Costa <glommer@gmail.com>
Cc: Gleb Natapov <gleb@redhat.com>,
	avi@redhat.com, glommer@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] various fixes for CPU/PCI hotplug
Date: Tue, 3 Feb 2009 17:11:16 -0200	[thread overview]
Message-ID: <20090203191116.GA13210@amt.cnet> (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.

The ACPI code will read the up/down status after the IRQ is triggered
(and nothing will change it, in the meantime). What is your concern?

The OS is responsible for programming the GPE enable bit.


  reply	other threads:[~2009-02-03 19:11 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 [this message]
2009-02-03 20:27   ` Gleb Natapov

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=20090203191116.GA13210@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=gleb@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