From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48622606A31C for ; Mon, 30 Nov 2026 05:16:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=H593oqRV Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xXtjH-0007q4-C7; Mon, 30 Nov 2026 00:15:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xXtiC-0006yx-Iw; Mon, 30 Nov 2026 00:14:01 -0500 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xXti9-00021m-9w; Mon, 30 Nov 2026 00:14:00 -0500 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 5152B403DA; Mon, 30 Nov 2026 05:13:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D955E1F00898; Mon, 30 Nov 2026 05:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796015635; bh=rlpVmoWYN+d8UmVj73srY0qtNKPnHtmv3WEfpZuCvvg=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=H593oqRV5W+LA6DEH9XUu3cXzdt6BrQI0rLMex/eTqbxJFQZ/B2aoEJNTqZ4OeUQu oQRJ5jJcAAdZvmQ7sC8hJSilefFAfcy92cVpp7geBMRu21uNaiABdi47laCxHJuU5x jTRZIxgA5WsE4EbiJwEdeCQMlNP8hfZp4oUwHGAt9pTn+M9pad2Q2AuJlP4/w6UPEu TdWVqClu3PR4ca37GKsjsshddtgpFWs1x0Ypt4xFN7qkrHpRV80UZm/vxES9qVritW d+AGPiTwX9RX+zAMY8MP8xHG/7uv+NqWEpdU7Youwn/Uu+O9Ec2kB+fKPcH7/M6oRr cSfrMZ5RQTsyw== Message-ID: Date: Mon, 30 Nov 2026 14:13:52 +0900 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/13] hw/ide/ahci: stop processing commands after a fatal error To: Niklas Cassel , John Snow , "Denis V. Lunev" , Fabiano Rosas , Laurent Vivier , Paolo Bonzini Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org References: <20261127191250.3298004-1-cassel@kernel.org> <20261127191250.3298004-3-cassel@kernel.org> From: Damien Le Moal Content-Language: en-US Organization: Western Digital Research In-Reply-To: <20261127191250.3298004-3-cassel@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2600:3c0a:e001:78e:0:1991:8:25; envelope-from=dlemoal@kernel.org; helo=sea.source.kernel.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 11/28/26 04:12, Niklas Cassel wrote: > As per AHCI 1.3.1, 6.2.2, after a fatal error, the HBA should not > process any further commands until software clears PxCMD.ST. > > This was previously missing in the QEMU model, which emulates both > both the drive and the HBA. double "both". > > Previously, QEMU went on processing commands, and as a failed command > keeps its bit in PxCI, check_cmd() executed it again when the host issued > another command without restarting the port. > > Add a new state that halts the port after a fatal error. > Linux, SeaBIOS and libqos already restart the port using PxCMD.ST after > an error. > > Add a qtest that checks that a command issued after a failed WRITE DMA > EXT, without restarting the port, is not processed, and that the failed > write is not executed again. > > Fixes: 1a16ce64fda1 ("hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set") > Signed-off-by: Niklas Cassel Other than the nit above, looks OK to me. Reviewed-by: Damien Le Moal -- Damien Le Moal Western Digital Research