From: Gleb Natapov <gleb@redhat.com>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH v2 3/3] Fix cpu/pci hotplug to generate level triggered interrupt.
Date: Sun, 24 Oct 2010 16:32:04 +0200 [thread overview]
Message-ID: <1287930724-25369-3-git-send-email-gleb@redhat.com> (raw)
In-Reply-To: <1287930724-25369-1-git-send-email-gleb@redhat.com>
SCI is level triggered. cpu/pci hotplug should behave appropriately.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
hw/acpi_piix4.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index dfabc75..de3bb88 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -111,7 +111,8 @@ static void pm_update_sci(PIIX4PMState *s)
ACPI_BITMASK_POWER_BUTTON_ENABLE |
ACPI_BITMASK_GLOBAL_LOCK_ENABLE |
ACPI_BITMASK_TIMER_ENABLE)) != 0) ||
- (((s->gpe.sts & s->gpe.en) & PIIX4_PCI_HOTPLUG_STATUS) != 0);
+ (((s->gpe.sts & s->gpe.en) &
+ (PIIX4_CPU_HOTPLUG_STATUS | PIIX4_PCI_HOTPLUG_STATUS)) != 0);
qemu_set_irq(s->irq, sci_level);
/* schedule a timer interruption if needed */
@@ -610,12 +611,11 @@ static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev, int state);
static void piix4_acpi_system_hot_add_init(PCIBus *bus, PIIX4PMState *s)
{
- struct gpe_regs *gpe = &s->gpe;
struct pci_status *pci0_status = &s->pci0_status;
int i = 0, cpus = smp_cpus;
while (cpus > 0) {
- gpe->cpus_sts[i++] = (cpus < 8) ? (1 << cpus) - 1 : 0xff;
+ s->gpe.cpus_sts[i++] = (cpus < 8) ? (1 << cpus) - 1 : 0xff;
cpus -= 8;
}
@@ -665,10 +665,8 @@ void qemu_system_cpu_hot_add(int cpu, int state)
enable_processor(&s->gpe, cpu);
else
disable_processor(&s->gpe, cpu);
- if (s->gpe.en & 4) {
- qemu_set_irq(s->irq, 1);
- qemu_set_irq(s->irq, 0);
- }
+
+ pm_update_sci(s);
}
#endif
--
1.7.1
next prev parent reply other threads:[~2010-10-24 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-24 14:32 [PATCH v2 1/3] Fix cpu hotplug ioport function registration Gleb Natapov
2010-10-24 14:32 ` [PATCH v2 2/3] Use defines instead of numbers for cpu hotplug Gleb Natapov
2010-10-24 14:32 ` Gleb Natapov [this message]
2010-10-24 14:48 ` [PATCH v2 3/3] Fix cpu/pci hotplug to generate level triggered interrupt 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=1287930724-25369-3-git-send-email-gleb@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--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