From nobody Mon Apr 6 16:49:39 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1773852364; cv=none; d=zohomail.com; s=zohoarc; b=D/G1TTayB+g+wG0OXbP3HQRDiWctrddxVLH+qMSiYyJDpeqA3zok3ctVgdRRcOpELDKPR8DUuyxMuQeEAPATf7CmsVwRkjqGcFSo0od8WipVoIeXhk/i0U75CZzIzJVpDhzRZ4x94wrabRFla5Yr9PjO4Q4EWX+p4PsBJF0UO1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773852364; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MLQF0cGJStof3nDqoSS/VGYCR2qfVs2/I0b7oZR7/2w=; b=HOSexUhPc0ylecyxYnX6kTTj7rfLuzDiXck4EHcq+cMV5fQbATu7K2HKyS+3Q2XMK1A7AiFWhb+Mipa6t9xciDCCTP1N/oVVe+XwSi7mhx/Mui++CdNaRdn1ihKmmybuqyK7j1gGWrikvEOtPuVKmNwk7LSJDRoXvGP7NFE/8rA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773852364126215.6798672499873; Wed, 18 Mar 2026 09:46:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2u1u-0007PG-VT; Wed, 18 Mar 2026 12:45:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2tmU-0004RT-CO for qemu-devel@nongnu.org; Wed, 18 Mar 2026 12:30:02 -0400 Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w2tmS-000063-BC for qemu-devel@nongnu.org; Wed, 18 Mar 2026 12:30:01 -0400 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 16B745BECB; Wed, 18 Mar 2026 16:29:55 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 912D24273B; Wed, 18 Mar 2026 16:29:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id mOoPIALTumnJYwAAD6G6ig (envelope-from ); Wed, 18 Mar 2026 16:29:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773851395; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MLQF0cGJStof3nDqoSS/VGYCR2qfVs2/I0b7oZR7/2w=; b=Fc/dYUZF/69DEuHAyWGb8Z4rtQWRV26oKGti+wxNoXQ8Owy8TGAyA6S6YosCSv3n5QjE2h Pp4K6e2KbXcYQr0H/rt9SVmOdDLs1pzGM6EgJ10PMn7O4BTc3Xi7udnXNhOGVnx+dIAEa6 1sWUg2gmj1fIStIjZkTSwX3NPrKDdOY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773851395; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MLQF0cGJStof3nDqoSS/VGYCR2qfVs2/I0b7oZR7/2w=; b=fzgKsO3yxsEu93eTb7jwGilpBEzoMBvTEw/i+Nq/DfBvQeohrkS1J2hYFqZciyeIY76q+Y kjhcC4lyaS0QkOAQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773851395; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MLQF0cGJStof3nDqoSS/VGYCR2qfVs2/I0b7oZR7/2w=; b=Fc/dYUZF/69DEuHAyWGb8Z4rtQWRV26oKGti+wxNoXQ8Owy8TGAyA6S6YosCSv3n5QjE2h Pp4K6e2KbXcYQr0H/rt9SVmOdDLs1pzGM6EgJ10PMn7O4BTc3Xi7udnXNhOGVnx+dIAEa6 1sWUg2gmj1fIStIjZkTSwX3NPrKDdOY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773851395; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MLQF0cGJStof3nDqoSS/VGYCR2qfVs2/I0b7oZR7/2w=; b=fzgKsO3yxsEu93eTb7jwGilpBEzoMBvTEw/i+Nq/DfBvQeohrkS1J2hYFqZciyeIY76q+Y kjhcC4lyaS0QkOAQ== From: Pedro Falcato To: John Snow Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Pedro Falcato , qemu-stable@nongnu.org, Niklas Cassel Subject: [PATCH] ide: Set IDENTIFY word 93 to 0 on SATA drives Date: Wed, 18 Mar 2026 16:29:51 +0000 Message-ID: <20260318162951.1060969-1-pfalcato@suse.de> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_TLS_ALL(0.00)[] Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a07:de40:b251:101:10:150:64:2; envelope-from=pfalcato@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 18 Mar 2026 12:45:56 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1773852366718158500 Content-Type: text/plain; charset="utf-8" According to the ATA Command Set specification (and the SATA specification too), SATA drives are supposed to set word 93 (which for PATA holds hardware reset results) to 0. As such, clear it when ncq_queues > 0 (which is only t= rue for SATA drives). Doing so fixes a quirk in Linux where it thinks the AHCI QEMU drive is PATA over a SATA bridge, and thus limits maximum transfer sizes for individual I= Os with a: [ 1.632121] ata1.00: applying bridge limits While at it, bump the device's firmware revision for IDENTIFY. This makes it so Linux can avoid enabling a quirk for fixed QEMU releases. Link: https://lore.kernel.org/linux-ide/20260303183337.1013474-1-pfalcato@s= use.de/ Cc: qemu-stable@nongnu.org Suggsted-by: Niklas Cassel Signed-off-by: Pedro Falcato --- Note: I understand the version bump is vaguely controversial (particularly exposing the QEMU version in the string) but I don't have a much better idea. Logically, bumping it to 11.0 for stable releases doesn't make much sense. =20 hw/ide/core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index b45abf067b20..89f62f301e94 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -211,7 +211,15 @@ static void ide_identify(IDEState *s) put_le16(p + 87, (1 << 14) | 0); } put_le16(p + 88, 0x3f | (1 << 13)); /* udma5 set and supported */ - put_le16(p + 93, 1 | (1 << 14) | 0x2000); + if (s->ncq_queues) { + /* + * This is SATA, which is required by the spec to return 0 for this + * field. + */ + put_le16(p + 93, 0); + } else { + put_le16(p + 93, 1 | (1 << 14) | 0x2000); + } /* *(p + 100) :=3D nb_sectors -- see ide_identify_size */ /* *(p + 101) :=3D nb_sectors >> 16 -- see ide_identify_size */ /* *(p + 102) :=3D nb_sectors >> 32 -- see ide_identify_size */ @@ -2660,7 +2668,7 @@ int ide_init_drive(IDEState *s, IDEDevice *dev, IDEDr= iveKind kind, Error **errp) if (dev->version) { pstrcpy(s->version, sizeof(s->version), dev->version); } else { - pstrcpy(s->version, sizeof(s->version), qemu_hw_version()); + pstrcpy(s->version, sizeof(s->version), "11.0"); } =20 ide_reset(s); --=20 2.53.0