Fix: SCI isn't sent on cpu hotplug
PATCH 1/1 Fix: SCI isn't sent on cpu hotplug
Change introduced by e71f08bb4a
"Fix cpu/pci hotplug to generate level triggered interrupt."
was lost somewhre along the way. And as result SCI is not sent in case of cpu hotplug event.
Restoring hunk 1 of e71f08bb4a fixes issue.
--- hw/acpi_piix4.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
hw/acpi_piix4.c +2 -1
@@ -94,7 +94,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[0 ] & s->gpe.en[0 ]) &PIIX4_PCI_HOTPLUG_STATUS ) !=0 ); + (((s->gpe.sts[0 ] & s->gpe.en[0 ]) & + (PIIX4_CPU_HOTPLUG_STATUS |PIIX4_PCI_HOTPLUG_STATUS )) !=0 );qemu_set_irq (s->irq, sci_level);/* schedule a timer interruption if needed */
Signature · 1 line
1.7.7.5
Quoted 6 lines · Igor Mammedov
Change introduced by
e71f08bb4a
"Fix cpu/pci hotplug to generate level triggered interrupt."
was lost somewhre along the way. And as result SCI is not sent in case of cpu hotplug event.
Restoring hunk 1 ofe71f08bb4afixes issue.
Hmm, I sent similar patch [1] last time someone complained about cpu hotplug here. Which remind me that in that thread more problem were found in cpu hotplug. IIRC Jan collected all the patches. Jan, what happened to them?
[1] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/76399
Quoted 21 lines
Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi_piix4.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)hw/acpi_piix4.c +2
-1@@ -94,7 +94,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[0 ] & s->gpe.en[0 ]) &PIIX4_PCI_HOTPLUG_STATUS ) !=0 ); + (((s->gpe.sts[0 ] & s->gpe.en[0 ]) & + (PIIX4_CPU_HOTPLUG_STATUS |PIIX4_PCI_HOTPLUG_STATUS )) !=0 );qemu_set_irq (s->irq, sci_level);/* schedule a timer interruption if needed */ Signature · 1 line
1.7.7.5
--
Gleb.
Quoted 11 lines · Gleb Natapov
Quoted 6 lines · Igor Mammedov
Change introduced by
e71f08bb4a
"Fix cpu/pci hotplug to generate level triggered interrupt."
was lost somewhre along the way. And as result SCI is not sent in case of cpu hotplug event.
Restoring hunk 1 ofe71f08bb4afixes issue.Hmm, I sent similar patch [1] last time someone complained about cpu hotplug here. Which remind me that in that thread more problem were found in cpu hotplug. IIRC Jan collected all the patches. Jan, what happened to them?
My patches should have been superseded by the work of Ping Fan on the ICC bus.
Jan
Quoted 27 lines
[1] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/76399
Quoted 21 lines
Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi_piix4.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)hw/acpi_piix4.c +2
-1@@ -94,7 +94,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[0 ] & s->gpe.en[0 ]) &PIIX4_PCI_HOTPLUG_STATUS ) !=0 ); + (((s->gpe.sts[0 ] & s->gpe.en[0 ]) & + (PIIX4_CPU_HOTPLUG_STATUS |PIIX4_PCI_HOTPLUG_STATUS )) !=0 );qemu_set_irq (s->irq, sci_level);/* schedule a timer interruption if needed */ Signature · 1 line
1.7.7.5--
Gleb.
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · Gleb Natapov
Quoted 6 lines · Igor Mammedov
Change introduced by
e71f08bb4a
"Fix cpu/pci hotplug to generate level triggered interrupt."
was lost somewhre along the way. And as result SCI is not sent in case of cpu hotplug event.
Restoring hunk 1 ofe71f08bb4afixes issue.
Quoted 8 lines
Quoted 4 lines
Hmm, I sent similar patch [1] last time someone complained about cpu hotplug here. Which remind me that in that thread more problem were found in cpu hotplug. IIRC Jan collected all the patches. Jan, what happened to them?
My patches should have been superseded by the work of Ping Fan on the ICC bus.
Didn't they fix some problems with bringing new cpu online, not just making cpu hotplugable in qdev? May be I misremember. BTW do you know what happened with ICC bus patches?
Quoted 22 lines
Jan
Quoted 20 lines
[1] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/76399
Quoted 17 lines
Signed-off-by Igor Mammedov <[email protected]>--- hw/acpi_piix4.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)hw/acpi_piix4.c +2
-1@@ -94,7 +94,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[0 ] & s->gpe.en[0 ]) &PIIX4_PCI_HOTPLUG_STATUS ) !=0 ); + (((s->gpe.sts[0 ] & s->gpe.en[0 ]) & + (PIIX4_CPU_HOTPLUG_STATUS |PIIX4_PCI_HOTPLUG_STATUS )) !=0 );
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
hw/acpi_piix4.c +0
-0qemu_set_irq (s->irq, sci_level);/* schedule a timer interruption if needed */ Signature · 1 line
1.7.7.5--
Gleb.Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
--
Gleb.
Quoted 14 lines · Gleb Natapov
Quoted 13 lines · Jan Kiszka
Quoted 11 lines · Gleb Natapov
Quoted 6 lines · Igor Mammedov
Change introduced by
e71f08bb4a
"Fix cpu/pci hotplug to generate level triggered interrupt."
was lost somewhre along the way. And as result SCI is not sent in case of cpu hotplug event.
Restoring hunk 1 ofe71f08bb4afixes issue.Hmm, I sent similar patch [1] last time someone complained about cpu hotplug here. Which remind me that in that thread more problem were found in cpu hotplug. IIRC Jan collected all the patches. Jan, what happened to them?
Quoted 5 lines
Quoted 3 lines
My patches should have been superseded by the work of Ping Fan on the ICC bus.
Didn't they fix some problems with bringing new cpu online, not just making cpu hotplugable in qdev? May be I misremember.
Let me check... Hmm, yes, there were also some bits required to bring up the new VCPU thread properly and sync its initial state to the kernel. That was not part of Ping Fan's ICC patches, also not of the VCPU life cycle patches.
Quoted 2 lines
BTW do you know
what happened with ICC bus patches?
Were forgotten to merge? And/or they lacked some acked-by or reviewed-by. :-/
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 15 lines · Jan Kiszka
Quoted 14 lines · Gleb Natapov
Quoted 13 lines · Jan Kiszka
Quoted 11 lines · Gleb Natapov
Quoted 6 lines · Igor Mammedov
Change introduced by
e71f08bb4a
"Fix cpu/pci hotplug to generate level triggered interrupt."
was lost somewhre along the way. And as result SCI is not sent in case of cpu hotplug event.
Restoring hunk 1 ofe71f08bb4afixes issue.Hmm, I sent similar patch [1] last time someone complained about cpu hotplug here. Which remind me that in that thread more problem were found in cpu hotplug. IIRC Jan collected all the patches. Jan, what happened to them?
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
My patches should have been superseded by the work of Ping Fan on the ICC bus.
Didn't they fix some problems with bringing new cpu online, not just making cpu hotplugable in qdev? May be I misremember.
Let me check... Hmm, yes, there were also some bits required to bring up the new VCPU thread properly and sync its initial state to the kernel.
CPU bring-up seems to be broken now, guest sees a new cpu but I can't online it inside guest with error: "CPUx: Not responding". But it works with old qemu-kvm [3925c857a574].
Jan could you point me to this patches?
Quoted 2 lines
That was not part of Ping Fan's ICC patches, also not of the VCPU life cycle patches.
I'm trying to re-base cpu-hotplug to qemu.git, and with ICC patches it's working like the current qemu-kvm head. But without above mentioned fixes it seams to be useless.
Quoted 9 lines
Quoted 3 lines
BTW do you know
what happened with ICC bus patches?Were forgotten to merge? And/or they lacked some acked-by or reviewed-by. :-/
Jan
Signature · 2 lines
Thanks, Igor
Quoted 22 lines · Igor Mammedov
Quoted 21 lines · Jan Kiszka
Quoted 19 lines · Gleb Natapov
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · Gleb Natapov
Quoted 6 lines · Igor Mammedov
Change introduced by
e71f08bb4a
"Fix cpu/pci hotplug to generate level triggered interrupt."
was lost somewhre along the way. And as result SCI is not sent in case of cpu hotplug event.
Restoring hunk 1 ofe71f08bb4afixes issue.Quoted 8 lines
Quoted 4 lines
Hmm, I sent similar patch [1] last time someone complained about cpu hotplug here. Which remind me that in that thread more problem were found in cpu hotplug. IIRC Jan collected all the patches. Jan, what happened to them?
My patches should have been superseded by the work of Ping Fan on the ICC bus.
Didn't they fix some problems with bringing new cpu online, not just making cpu hotplugable in qdev? May be I misremember.
Quoted 7 lines
Quoted 2 lines
Let me check... Hmm, yes, there were also some bits required to bring up the new VCPU thread properly and sync its initial state to the kernel.
CPU bring-up seems to be broken now, guest sees a new cpu but I can't online it inside guest with error: "CPUx: Not responding". But it works with old qemu-kvm [
3925c857a574].
Jan could you point me to this patches?
See
http://git.kiszka.org/?p=qemu-kvm.git;a=commitdiff;h=be8f21c6b54eac82f7add7ee9d4ecf9cb8ebb320
Its dependencies have been merged by now. The key is that you need to synchronize VCPU initialization with the other QEMU threads (so that no semi-initialized VCPU is visible at any time) and that you perform a cpu_synchronize_post_init on that VCPU. The hotplug hack is replaced by the ICC approach.
Quoted 7 lines
Quoted 3 lines
That was not part of Ping Fan's ICC patches, also not of the VCPU life cycle patches.
I'm trying to re-base cpu-hotplug to qemu.git, and with ICC patches it's working like the current qemu-kvm head. But without above mentioned fixes it seams to be useless.
Make sure to work against qemu first. Getting things rolling with qemu-kvm is usually trivial. Working the other way around may create new forks again.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux