diff mbox

[03/16] Revert "qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing"

Message ID 35f91d719f5ca7bbfa603f2c8be0ba9baf1b6120.1305288845.git.jan.kiszka@siemens.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka May 13, 2011, 12:13 p.m. UTC
This reverts commit fd6bfef3d49a62b36092f131690de3e34f84662d.

It is a nop, and it always was a nop:

    irq0override = !kvm_irqchip || kvm_has_gsi_routing

But this code is only executed when gsi routing is available.

Conflicts:

	qemu-kvm-x86.c

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 qemu-kvm-x86.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Avi Kivity May 16, 2011, 10:24 a.m. UTC | #1
On 05/13/2011 03:13 PM, Jan Kiszka wrote:
> This reverts commit fd6bfef3d49a62b36092f131690de3e34f84662d.
>
> It is a nop, and it always was a nop:
>
>      irq0override = !kvm_irqchip || kvm_has_gsi_routing
>
> But this code is only executed when gsi routing is available.

That means that if kvm_has_gsi_routing, then irq0override = true, and 
this code is executed?
Avi Kivity May 16, 2011, 10:33 a.m. UTC | #2
On 05/16/2011 01:24 PM, Avi Kivity wrote:
> On 05/13/2011 03:13 PM, Jan Kiszka wrote:
>> This reverts commit fd6bfef3d49a62b36092f131690de3e34f84662d.
>>
>> It is a nop, and it always was a nop:
>>
>>      irq0override = !kvm_irqchip || kvm_has_gsi_routing
>>
>> But this code is only executed when gsi routing is available.
>
> That means that if kvm_has_gsi_routing, then irq0override = true, and 
> this code is executed?
>

Ah, sorry, you did constant propagation here.  Patch is fine.
diff mbox

Patch

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 6c3a0a9..c039e16 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -317,9 +317,9 @@  int kvm_arch_init_irq_routing(void)
             }
         }
         for (i = 0; i < 24; ++i) {
-            if (i == 0 && irq0override) {
+            if (i == 0) {
                 r = kvm_add_irq_route(i, KVM_IRQCHIP_IOAPIC, 2);
-            } else if (i != 2 || !irq0override) {
+            } else if (i != 2) {
                 r = kvm_add_irq_route(i, KVM_IRQCHIP_IOAPIC, i);
             }
             if (r < 0) {