Skip to contentSkip to conversation

disable special ioapic inti0 routing

RFC PATCH In review Jan Kiszka 2 participants 5 messages Feb 6, 2009 – Feb 7, 2009

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

RFC PATCH 1/1 disable special ioapic inti0 routing

This patch comes from the kvm tree and fixes the timer IRQ routing for me which is broken from the POV of certain Linux guest kernels. As I'm not up-to-date with the development around that problematic hunk, I'm leaving it to someone more deeply involved to sign this off. But please commit some fix.

Thanks,
Jan

------->

From: Avi Kivity <[email protected]>

we don't support it yet (need bios support, and modifications to kernel irq routing).

---
 qemu/hw/apic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
qemu/hw/apic.c +2 -0
index df80444..f9ef995 100644
@@ -1055,12 +1055,14 @@ void ioapic_set_irq(void *opaque, int vector, int level)
 {
     IOAPICState *s = opaque;
 
+#if 0
     /* ISA IRQs map to GSI 1-1 except for IRQ0 which maps
      * to GSI 2.  GSI maps to ioapic 1-1.  This is not
      * the cleanest way of doing it but it should work. */
 
     if (vector == 0)
         vector = 2;
+#endif
 
     if (vector >= 0 && vector < IOAPIC_NUM_PINS) {
         uint32_t mask = 1 << vector;
#1 lore raw
Quoted 6 lines · Jan Kiszka

This patch comes from the kvm tree and fixes the timer IRQ routing for me which is broken from the POV of certain Linux guest kernels. As I'm not up-to-date with the development around that problematic hunk, I'm leaving it to someone more deeply involved to sign this off. But please commit some fix.

Are you using an old bios by chance? The reason this fixes KVM has nothing to do with QEMU FWIW so if this fixes something for you, it's just a coincidence.

Regards,

Anthony Liguroi

Quoted 37 lines

Thanks,
Jan

------->

From: Avi Kivity <[email protected]>

we don't support it yet (need bios support, and modifications to kernel irq routing).

---
 qemu/hw/apic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
qemu/hw/apic.c +2 -0
index df80444..f9ef995 100644
@@ -1055,12 +1055,14 @@ void ioapic_set_irq(void *opaque, int vector, int level)
 {
     IOAPICState *s = opaque;
 
+#if 0
     /* ISA IRQs map to GSI 1-1 except for IRQ0 which maps
      * to GSI 2.  GSI maps to ioapic 1-1.  This is not
      * the cleanest way of doing it but it should work. */
 
     if (vector == 0)
         vector = 2;
+#endif
 
     if (vector >= 0 && vector < IOAPIC_NUM_PINS) {
         uint32_t mask = 1 << vector;
author
#2 lore raw
Quoted 11 lines · Anthony Liguori
Quoted 6 lines · Jan Kiszka

This patch comes from the kvm tree and fixes the timer IRQ routing for me which is broken from the POV of certain Linux guest kernels. As I'm not up-to-date with the development around that problematic hunk, I'm leaving it to someone more deeply involved to sign this off. But please commit some fix.

Are you using an old bios by chance? The reason this fixes KVM has nothing to do with QEMU FWIW so if this fixes something for you, it's just a coincidence.

My first thought as well, but the binary bios from latest svn made no difference.

Jan

Quoted 47 lines

Regards,

Anthony Liguroi

Quoted 38 lines

Thanks,
Jan

------->

From: Avi Kivity <[email protected]>

we don't support it yet (need bios support, and modifications to kernel irq routing).

---
 qemu/hw/apic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
qemu/hw/apic.c +2 -0
index df80444..f9ef995 100644
@@ -1055,12 +1055,14 @@ void ioapic_set_irq(void *opaque, int vector,
 int level)
 {
     IOAPICState *s = opaque;
 
+#if 0
     /* ISA IRQs map to GSI 1-1 except for IRQ0 which maps
      * to GSI 2.  GSI maps to ioapic 1-1.  This is not
      * the cleanest way of doing it but it should work. */
 
     if (vector == 0)
         vector = 2;
+#endif
 
     if (vector >= 0 && vector < IOAPIC_NUM_PINS) {
         uint32_t mask = 1 << vector;
#3 lore raw
Quoted 11 lines · Jan Kiszka
Quoted 9 lines · Anthony Liguori
Quoted 7 lines · Jan Kiszka

This patch comes from the kvm tree and fixes the timer IRQ routing for me which is broken from the POV of certain Linux guest kernels. As I'm not up-to-date with the development around that problematic hunk, I'm leaving it to someone more deeply involved to sign this off. But please commit some fix.

Quoted 8 lines
Quoted 4 lines

Are you using an old bios by chance? The reason this fixes KVM has nothing to do with QEMU FWIW so if this fixes something for you, it's just a coincidence.

My first thought as well, but the binary bios from latest svn made no difference.

What linux guests broke?

Regards,

Anthony Liguori

Quoted 53 lines

Jan

Quoted 47 lines

Regards,

Anthony Liguroi

Quoted 39 lines

Thanks,
Jan

------->

From: Avi Kivity <[email protected]>

we don't support it yet (need bios support, and modifications to kernel irq routing).

---
 qemu/hw/apic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
qemu/hw/apic.c +2 -0
index df80444..f9ef995 100644
@@ -1055,12 +1055,14 @@ void ioapic_set_irq(void *opaque, int vector,
 int level)
 {
     IOAPICState *s = opaque;
 
+#if 0
     /* ISA IRQs map to GSI 1-1 except for IRQ0 which maps
      * to GSI 2.  GSI maps to ioapic 1-1.  This is not
      * the cleanest way of doing it but it should work. */
 
     if (vector == 0)
         vector = 2;
+#endif
 
     if (vector >= 0 && vector < IOAPIC_NUM_PINS) {
         uint32_t mask = 1 << vector;
author
#4 lore raw
Quoted 16 lines · Anthony Liguori
Quoted 15 lines · Jan Kiszka
Quoted 12 lines · Anthony Liguori
Quoted 6 lines · Jan Kiszka

This patch comes from the kvm tree and fixes the timer IRQ routing for me which is broken from the POV of certain Linux guest kernels. As I'm not up-to-date with the development around that problematic hunk, I'm leaving it to someone more deeply involved to sign this off. But please commit some fix.

Are you using an old bios by chance? The reason this fixes KVM has nothing to do with QEMU FWIW so if this fixes something for you, it's just a coincidence.

Quoted 5 lines
Quoted 3 lines

My first thought as well, but the binary bios from latest svn made no difference.

What linux guests broke?

An old 32-bit customized one. And it turned out that it had, for some reasons I don't recall anymore, ACPI disabled. So it missed the timer IRQ pin moving QEMU is doing. At the same time, some very similar kernel with ACPI enabled boots fine. Think I should delete the former from my test image...

Sorry for the noise,
Jan