From patchwork Tue Feb 1 14:51:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 81321 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by ozlabs.org (Postfix) with ESMTP id 70C79B70EB for ; Wed, 2 Feb 2011 01:58:01 +1100 (EST) Received: from localhost ([127.0.0.1]:38404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkHb0-0001VI-GD for incoming@patchwork.ozlabs.org; Tue, 01 Feb 2011 09:52:42 -0500 Received: from [140.186.70.92] (port=58095 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkHZw-0001Tu-MD for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:51:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkHZv-0003ea-KE for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:51:36 -0500 Received: from cantor2.suse.de ([195.135.220.15]:50694 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkHZv-0003dt-DR for qemu-devel@nongnu.org; Tue, 01 Feb 2011 09:51:35 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 77E218A95F; Tue, 1 Feb 2011 15:51:33 +0100 (CET) From: Alexander Graf To: qemu-devel Developers Date: Tue, 1 Feb 2011 15:51:32 +0100 Message-Id: <1296571892-12702-8-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1296571892-12702-1-git-send-email-agraf@suse.de> References: <1296571892-12702-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Kevin Wolf , Joerg Roedel , Sebastian Herbszt Subject: [Qemu-devel] [PATCH 7/7] ahci: work around bug with level interrupts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When using level based interrupts, the interrupt is treated the same as an edge triggered one: leaving the line up does not retrigger the interrupt. In fact, when not lowering the line, we won't ever get a new interrupt inside the guest. So let's always retrigger an interrupt as soon as the OS ack'ed something on the device. This way we're sure the guest doesn't starve on interrupts until someone fixes the actual interrupt path. Signed-off-by: Alexander Graf --- hw/ide/ahci.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 98bdf70..bce7fba 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -152,11 +152,10 @@ static void ahci_check_irq(AHCIState *s) } } + ahci_irq_lower(s, NULL); if (s->control_regs.irqstatus && (s->control_regs.ghc & HOST_CTL_IRQ_EN)) { ahci_irq_raise(s, NULL); - } else { - ahci_irq_lower(s, NULL); } }