From 500be5dd367abf23997e7355e0b331eda72a1d67 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Tue, 13 Mar 2012 13:44:35 +0100 Subject: [PATCH 2/5] Fix cpu/pci hotplug to generate level triggered interrupt. RH-Author: Igor Mammedov Message-id: <1331646277-28469-3-git-send-email-imammedo@redhat.com> Patchwork-id: 38484 O-Subject: [RHEL6.3 qemu-kvm PATCH 2/4] Fix cpu/pci hotplug to generate level triggered interrupt. Bugzilla: 562886 RH-Acked-by: Gleb Natapov RH-Acked-by: Alex Williamson RH-Acked-by: Andrew Jones Bugzilla: 562886 Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=4146795 Backport from qemu-kvm: e71f08bb4a3 SCI is level triggered. cpu/pci hotplug should behave appropriately. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity Signed-off-by: Igor Mammedov --- hw/acpi.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Signed-off-by: Michal Novotny --- hw/acpi.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index e09c26b..447f111 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -133,7 +133,9 @@ static void pm_update_sci(PIIX4PMState *s) pmsts = get_pmsts(s); sci_level = (((pmsts & s->pmen) & - (RTC_EN | PWRBTN_EN | GBL_EN | TMROF_EN)) != 0); + (RTC_EN | PWRBTN_EN | GBL_EN | TMROF_EN)) != 0) || + (((s->gpe.sts & s->gpe.en) & PIIX4_CPU_HOTPLUG_STATUS) != 0); + qemu_set_irq(s->irq, sci_level); /* schedule a timer interruption if needed */ if ((s->pmen & TMROF_EN) && !(pmsts & TMROF_EN)) { @@ -932,10 +934,8 @@ void qemu_system_cpu_hot_add(int cpu, int state) enable_processor(&pm_state->gpe, cpu); else disable_processor(&pm_state->gpe, cpu); - if (pm_state->gpe.en & 4) { - qemu_set_irq(pm_state->irq, 1); - qemu_set_irq(pm_state->irq, 0); - } + + pm_update_sci(pm_state); } #endif -- 1.7.7.6