From patchwork Wed Dec 17 15:40:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 5507491 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 129B49F1D4 for ; Wed, 17 Dec 2014 15:40:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D52820A24 for ; Wed, 17 Dec 2014 15:40:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56DB520A25 for ; Wed, 17 Dec 2014 15:40:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751155AbaLQPku (ORCPT ); Wed, 17 Dec 2014 10:40:50 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:50540 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751076AbaLQPks (ORCPT ); Wed, 17 Dec 2014 10:40:48 -0500 Received: from e106785-lin.cambridge.arm.com ([10.1.203.45]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id sBHFebws003928; Wed, 17 Dec 2014 15:40:38 GMT From: Andre Przywara To: will.deacon@arm.com, penberg@kernel.org Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH v3 4/5] kvmtool: ARM: advertise 8250 IRQs as level-triggered Date: Wed, 17 Dec 2014 15:40:47 +0000 Message-Id: <1418830848-1463-5-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1418830848-1463-1-git-send-email-andre.przywara@arm.com> References: <1418830848-1463-1-git-send-email-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both the 16550/8250 UART emulation in kvmtool as well as all the drivers and DTBs for real hardware use level triggered interrutpts. But the device tree currently describes them as being edge triggered, which can lead to hangs in guests. Use the new IRQ type parameter to properly describe the interrupts. This goes along the lines of a similar QEMU patch: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=0be969a2d974971628fc4ed95834d22ecf0fd497 Signed-off-by: Andre Przywara --- tools/kvm/hw/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/hw/serial.c b/tools/kvm/hw/serial.c index 05b8fcc..270e6182 100644 --- a/tools/kvm/hw/serial.c +++ b/tools/kvm/hw/serial.c @@ -386,7 +386,7 @@ void serial8250_generate_fdt_node(struct ioport *ioport, void *fdt, _FDT(fdt_begin_node(fdt, dev_name)); _FDT(fdt_property_string(fdt, "compatible", "ns16550a")); _FDT(fdt_property(fdt, "reg", reg_prop, sizeof(reg_prop))); - generate_irq_prop(fdt, dev->irq, IRQ_TYPE_EDGE_RISING); + generate_irq_prop(fdt, dev->irq, IRQ_TYPE_LEVEL_HIGH); _FDT(fdt_property_cell(fdt, "clock-frequency", 1843200)); _FDT(fdt_end_node(fdt)); }