All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: qemu-devel@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] Generate PCI hotplug interrupt only if corespondent EN bit is set.
Date: Mon, 16 Feb 2009 12:42:57 -0300	[thread overview]
Message-ID: <20090216154257.GB5837@amt.cnet> (raw)
In-Reply-To: <20090212081036.29410.74172.stgit@dhcp-1-237.tlv.redhat.com>


ACK

On Thu, Feb 12, 2009 at 10:10:36AM +0200, Gleb Natapov wrote:
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> ---
> 
>  hw/acpi.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/acpi.c b/hw/acpi.c
> index 5eac1ad..2375f20 100644
> --- a/hw/acpi.c
> +++ b/hw/acpi.c
> @@ -724,27 +724,27 @@ void qemu_system_hot_add_init(void)
>  static void enable_device(struct pci_status *p, struct gpe_regs *g, int slot)
>  {
>      g->sts |= 2;
> -    g->en |= 2;
>      p->up |= (1 << slot);
>  }
>  
>  static void disable_device(struct pci_status *p, struct gpe_regs *g, int slot)
>  {
>      g->sts |= 2;
> -    g->en |= 2;
>      p->down |= (1 << slot);
>  }
>  
>  void qemu_system_device_hot_add(int bus, 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);
> +    }
>  }
>  
>  struct acpi_table_header
> 
> 

      parent reply	other threads:[~2009-02-16 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12  8:10 [Qemu-devel] [PATCH] Generate PCI hotplug interrupt only if corespondent EN bit is set Gleb Natapov
2009-02-16 15:36 ` Anthony Liguori
2009-02-16 15:42 ` Marcelo Tosatti [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=20090216154257.GB5837@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.