Skip to contentSkip to conversation

i8259: don't abort when trying to use level sensitive irqs

PATCH Hervé Poussineau 2 participants 4 messages May 3, 2014 – May 5, 2014 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Ping.

Quoted 23 lines · Hervé Poussineau

This is a guest-triggerable error, as seen when using Xenix 2.3.4. Replace hw_error by LOG_UNIMPL, so that guests have at least a chance to continue.

---
  hw/intc/i8259.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
hw/intc/i8259.c +2 -1
index c6f248b..a069d04 100644
@@ -265,7 +265,8 @@ static void pic_ioport_write(void *opaque, hwaddr addr64,
              s->init4 = val & 1;
              s->single_mode = val & 2;
              if (val & 0x08) {
-                hw_error("level sensitive irq not supported");
+                qemu_log_mask(LOG_UNIMP,
+                              "i8259: level sensitive irq not supported\n");
              }
          } else if (val & 0x08) {
              if (val & 0x04) {
#2 lore raw
Quoted 7 lines · Hervé Poussineau

Ping.

Quoted 4 lines · Hervé Poussineau

This is a guest-triggerable error, as seen when using Xenix 2.3.4. Replace hw_error by LOG_UNIMPL, so that guests have at least a chance to continue.

Is it just "a chance" or does Xenix actually work well with this applied?

Quoted 19 lines
Quoted 19 lines
---
 hw/intc/i8259.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/intc/i8259.c +2 -1
index c6f248b..a069d04 100644
@@ -265,7 +265,8 @@ static void pic_ioport_write(void *opaque, hwaddr addr64,
             s->init4 = val & 1;
             s->single_mode = val & 2;
             if (val & 0x08) {
-                hw_error("level sensitive irq not supported");
+                qemu_log_mask(LOG_UNIMP,
+                              "i8259: level sensitive irq not supported\n");
             }
         } else if (val & 0x08) {
             if (val & 0x04) {
#3 lore raw
Quoted 11 lines · Michael S. Tsirkin
Quoted 7 lines · Hervé Poussineau

Ping.

Quoted 4 lines · Hervé Poussineau

This is a guest-triggerable error, as seen when using Xenix 2.3.4. Replace hw_error by LOG_UNIMPL, so that guests have at least a chance to continue.

Is it just "a chance" or does Xenix actually work well with this applied?

Yes,
With this patch, I can install and use Xenix 2.3.4a without any problem.
I can also start installation of Xenix 2.3.4q, but it fails due to not finding an hard disk.

Regards,

Hervé

Quoted 22 lines
Quoted 21 lines
Quoted 21 lines

---
  hw/intc/i8259.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
hw/intc/i8259.c +2 -1
index c6f248b..a069d04 100644
@@ -265,7 +265,8 @@ static void pic_ioport_write(void *opaque, hwaddr addr64,
              s->init4 = val & 1;
              s->single_mode = val & 2;
              if (val & 0x08) {
-                hw_error("level sensitive irq not supported");
+                qemu_log_mask(LOG_UNIMP,
+                              "i8259: level sensitive irq not supported\n");
              }
          } else if (val & 0x08) {
              if (val & 0x04) {
#4 lore raw
Quoted 13 lines · Hervé Poussineau
Quoted 11 lines · Michael S. Tsirkin
Quoted 7 lines · Hervé Poussineau

Ping.

Quoted 4 lines · Hervé Poussineau

This is a guest-triggerable error, as seen when using Xenix 2.3.4. Replace hw_error by LOG_UNIMPL, so that guests have at least a chance to continue.

Is it just "a chance" or does Xenix actually work well with this applied?

Quoted 8 lines

Yes,
With this patch, I can install and use Xenix 2.3.4a without any problem. I can also start installation of Xenix 2.3.4q, but it fails due to not finding an hard disk.

Regards,

Hervé

Thanks!
I'll pick this patch up when I'm back online.

Quoted 23 lines
Quoted 22 lines
Quoted 21 lines
Quoted 21 lines

---
 hw/intc/i8259.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/intc/i8259.c +2 -1
index c6f248b..a069d04 100644
@@ -265,7 +265,8 @@ static void pic_ioport_write(void *opaque, hwaddr addr64,
             s->init4 = val & 1;
             s->single_mode = val & 2;
             if (val & 0x08) {
-                hw_error("level sensitive irq not supported");
+                qemu_log_mask(LOG_UNIMP,
+                              "i8259: level sensitive irq not supported\n");
             }
         } else if (val & 0x08) {
             if (val & 0x04) {