From patchwork Tue Sep 14 13:51:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Kohl X-Patchwork-Id: 179262 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8EEAUK6001579 for ; Tue, 14 Sep 2010 14:10:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752030Ab0INOK1 (ORCPT ); Tue, 14 Sep 2010 10:10:27 -0400 Received: from demumfd002.nsn-inter.net ([93.183.12.31]:14801 "EHLO demumfd002.nsn-inter.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523Ab0INOK1 (ORCPT ); Tue, 14 Sep 2010 10:10:27 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 14 Sep 2010 14:10:31 +0000 (UTC) X-Greylist: delayed 1111 seconds by postgrey-1.27 at vger.kernel.org; Tue, 14 Sep 2010 10:10:26 EDT Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd002.nsn-inter.net (8.12.11.20060308/8.12.11) with ESMTP id o8EDpqcW029824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 Sep 2010 15:51:52 +0200 Received: from localhost6.localdomain6 ([10.148.23.89]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id o8EDppo8024863; Tue, 14 Sep 2010 15:51:51 +0200 From: Bernhard Kohl To: kvm@vger.kernel.org Cc: Bernhard Kohl Subject: [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing Date: Tue, 14 Sep 2010 15:51:40 +0200 Message-Id: <1284472300-4211-1-git-send-email-bernhard.kohl@nsn.com> X-Mailer: git-send-email 1.7.2.2 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index fd974b3..e35c234 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1388,9 +1388,9 @@ int kvm_arch_init_irq_routing(void) } } for (i = 0; i < 24; ++i) { - if (i == 0) { + if (i == 0 && irq0override) { r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2); - } else if (i != 2) { + } else if (i != 2 || !irq0override) { r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i); } if (r < 0) {