qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v2
@ 2009-04-14 14:16 Beth Kon
  2009-04-17 21:20 ` Anthony Liguori
  2009-04-19 21:49 ` [Qemu-devel] " Sebastian Herbszt
  0 siblings, 2 replies; 4+ messages in thread
From: Beth Kon @ 2009-04-14 14:16 UTC (permalink / raw)
  To: qemu-devel, bochs-developers

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

Replicate ACPI irq0->inti2 override in mp table for non-acpi case.

v1 -> v2 adds comment suggested by Ryan.

Signed-off-by: Beth Kon <eak@us.ibm.com>

[-- Attachment #2: non_acpi_irqrouting.patch --]
[-- Type: text/x-diff, Size: 1182 bytes --]

diff --git a/bios/BIOS-bochs-latest b/bios/BIOS-bochs-latest
index ebec71b..82d7792 100644
Binary files a/bios/BIOS-bochs-latest and b/bios/BIOS-bochs-latest differ
diff --git a/bios/rombios32.c b/bios/rombios32.c
index 7be4216..dc7b5f3 100644
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -1168,6 +1168,12 @@ static void mptable_init(void)
 
     /* irqs */
     for(i = 0; i < 16; i++) {
+#ifdef BX_QEMU
+        /* One entry per ioapic input. Input 2 is covered by 
+           irq0->inti2 override (i == 0). irq 2 is unused */
+        if (i == 2)
+            continue;
+#endif        
         putb(&q, 3); /* entry type = I/O interrupt */
         putb(&q, 0); /* interrupt type = vectored interrupt */
         putb(&q, 0); /* flags: po=0, el=0 */
@@ -1175,7 +1181,11 @@ static void mptable_init(void)
         putb(&q, 0); /* source bus ID = ISA */
         putb(&q, i); /* source bus IRQ */
         putb(&q, ioapic_id); /* dest I/O APIC ID */
+#ifdef BX_QEMU
+        putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
+#else
         putb(&q, i); /* dest I/O APIC interrupt in */
+#endif        
     }
     /* patch length */
     len = q - mp_config_table;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v2
  2009-04-14 14:16 [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v2 Beth Kon
@ 2009-04-17 21:20 ` Anthony Liguori
  2009-04-19 21:49 ` [Qemu-devel] " Sebastian Herbszt
  1 sibling, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2009-04-17 21:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: bochs-developers

Beth Kon wrote:
> Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
>
> v1 -> v2 adds comment suggested by Ryan.
>
> Signed-off-by: Beth Kon <eak@us.ibm.com>
Applied to trunk and stable.  Thanks

-- 
Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: [PATCH] Fix non-ACPI Timer Interrupt Routing - v2
  2009-04-14 14:16 [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v2 Beth Kon
  2009-04-17 21:20 ` Anthony Liguori
@ 2009-04-19 21:49 ` Sebastian Herbszt
  2009-04-20 17:57   ` Beth Kon
  1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Herbszt @ 2009-04-19 21:49 UTC (permalink / raw)
  To: qemu-devel, Beth Kon; +Cc: bochs-developers

Beth Kon wrote:
> Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
> 
> v1 -> v2 adds comment suggested by Ryan.
> 
> Signed-off-by: Beth Kon <eak@us.ibm.com>
>
> diff --git a/bios/BIOS-bochs-latest b/bios/BIOS-bochs-latest
> index ebec71b..82d7792 100644
> Binary files a/bios/BIOS-bochs-latest and b/bios/BIOS-bochs-latest differ
> diff --git a/bios/rombios32.c b/bios/rombios32.c
> index 7be4216..dc7b5f3 100644
> --- a/bios/rombios32.c
> +++ b/bios/rombios32.c
> @@ -1168,6 +1168,12 @@ static void mptable_init(void)
> 
>     /* irqs */
>     for(i = 0; i < 16; i++) {
> +#ifdef BX_QEMU
> +        /* One entry per ioapic input. Input 2 is covered by 
> +           irq0->inti2 override (i == 0). irq 2 is unused */

Isn't the input 0 or destination 2 covered by the override?
We connect irq0 (input) to intin2 (destination).

> +        if (i == 2)
> +            continue;

This changes the entry count. Currently it's

putle16(&q, smp_cpus + 18); /* entry count */

which is smp_cpus processor entries + (bus entry + i/o apic entry + 16 irq entries).
This changes the number of irq entries to 15.

> +#endif        
>         putb(&q, 3); /* entry type = I/O interrupt */
>         putb(&q, 0); /* interrupt type = vectored interrupt */
>         putb(&q, 0); /* flags: po=0, el=0 */
> @@ -1175,7 +1181,11 @@ static void mptable_init(void)
>         putb(&q, 0); /* source bus ID = ISA */
>         putb(&q, i); /* source bus IRQ */
>         putb(&q, ioapic_id); /* dest I/O APIC ID */
> +#ifdef BX_QEMU
> +        putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
> +#else
>         putb(&q, i); /* dest I/O APIC interrupt in */
> +#endif        
>     }
>     /* patch length */
>     len = q - mp_config_table;

- Sebastian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] Fix non-ACPI Timer Interrupt Routing - v2
  2009-04-19 21:49 ` [Qemu-devel] " Sebastian Herbszt
@ 2009-04-20 17:57   ` Beth Kon
  0 siblings, 0 replies; 4+ messages in thread
From: Beth Kon @ 2009-04-20 17:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: bochs-developers

Sebastian Herbszt wrote:
> Beth Kon wrote:
>> Replicate ACPI irq0->inti2 override in mp table for non-acpi case.
>>
>> v1 -> v2 adds comment suggested by Ryan.
>>
>> Signed-off-by: Beth Kon <eak@us.ibm.com>
>>
>> diff --git a/bios/BIOS-bochs-latest b/bios/BIOS-bochs-latest
>> index ebec71b..82d7792 100644
>> Binary files a/bios/BIOS-bochs-latest and b/bios/BIOS-bochs-latest 
>> differ
>> diff --git a/bios/rombios32.c b/bios/rombios32.c
>> index 7be4216..dc7b5f3 100644
>> --- a/bios/rombios32.c
>> +++ b/bios/rombios32.c
>> @@ -1168,6 +1168,12 @@ static void mptable_init(void)
>>
>>     /* irqs */
>>     for(i = 0; i < 16; i++) {
>> +#ifdef BX_QEMU
>> +        /* One entry per ioapic input. Input 2 is covered by 
>> +           irq0->inti2 override (i == 0). irq 2 is unused */
>
> Isn't the input 0 or destination 2 covered by the override?
> We connect irq0 (input) to intin2 (destination).
In the comment I was using the terminology in the MP Specification, 
section 4.3.4. "Destination" 2 is the input to IOAPIC pin 2.  If you 
find it very confusing I can clarify.
>
>> +        if (i == 2)
>> +            continue;
>
> This changes the entry count. Currently it's
>
> putle16(&q, smp_cpus + 18); /* entry count */
>
> which is smp_cpus processor entries + (bus entry + i/o apic entry + 16 
> irq entries).
> This changes the number of irq entries to 15.
Yes, this was an oversight. Thanks!
>> +#endif                putb(&q, 3); /* entry type = I/O interrupt */
>>         putb(&q, 0); /* interrupt type = vectored interrupt */
>>         putb(&q, 0); /* flags: po=0, el=0 */
>> @@ -1175,7 +1181,11 @@ static void mptable_init(void)
>>         putb(&q, 0); /* source bus ID = ISA */
>>         putb(&q, i); /* source bus IRQ */
>>         putb(&q, ioapic_id); /* dest I/O APIC ID */
>> +#ifdef BX_QEMU
>> +        putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */
>> +#else
>>         putb(&q, i); /* dest I/O APIC interrupt in */
>> +#endif            }
>>     /* patch length */
>>     len = q - mp_config_table;
>
> - Sebastian
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-20 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 14:16 [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v2 Beth Kon
2009-04-17 21:20 ` Anthony Liguori
2009-04-19 21:49 ` [Qemu-devel] " Sebastian Herbszt
2009-04-20 17:57   ` Beth Kon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).