From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pedro Falcato <pfalcato@suse.de>
Cc: John Snow <jsnow@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
qemu-stable@nongnu.org, Niklas Cassel <cassel@kernel.org>
Subject: Re: [PATCH] ide: Set IDENTIFY word 93 to 0 on SATA drives
Date: Thu, 19 Mar 2026 16:05:31 +0000 [thread overview]
Message-ID: <abweyyF6XIC4vvKV@redhat.com> (raw)
In-Reply-To: <fifhay3zi37f3gyngcgwhtlbhninwljokrqulwzeyxru6tizfn@eyl2uzcqqc3g>
On Wed, Mar 18, 2026 at 05:24:58PM +0000, Pedro Falcato wrote:
> On Wed, Mar 18, 2026 at 04:58:25PM +0000, Daniel P. Berrangé wrote:
> > On Wed, Mar 18, 2026 at 04:54:45PM +0000, Daniel P. Berrangé wrote:
> > > On Wed, Mar 18, 2026 at 04:29:51PM +0000, Pedro Falcato wrote:
> > > > 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 true
> > > > 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 IOs
> > > > 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@suse.de/
> > > > Cc: qemu-stable@nongnu.org
> > > > Suggsted-by: Niklas Cassel <cassel@kernel.org>
> > > > Signed-off-by: Pedro Falcato <pfalcato@suse.de>
> > > > ---
> > > > 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.
> > >
> > > Bumping the version string changes guest ABI, so such a change should
> > > normally be tied to a new machine type version, not unconditionally
> > > changed. That would also in turn make it unsuitable for QEMU stable
> > > release branches which don't take changes which affect machine type
> > > ABI.
> > >
>
> I don't understand (I don't usually hack on QEMU). What do you mean with
> guest ABI and machine type ABI?
QEMU can save/restore the state of a running VM to disk, or through
Live migration between hosts, transfer state across two QEMU's. If
those two processes are running different QEMU releases, we need to
ensure the guest visible virtual hardware doesn't change its behaviour.
Guest OS are liable to misbehave if hardware changes behaviour while the
OS is running.
In QEMU we have machine types "pc" ( "i440fx") and "q35" which encode
which have versions associated with them. These are intended to encode
settings which ensure QEMU exposes consistent guest hardware features.
IOW, the machine 'pc-i440fx-10.0.0' should operate the same regardless
of whether it is run from QEMU 10.0.0, or a later QEMU 10.1.0.
Behaviour changes would only be introduced ina newer 'pc-i440fx-10.1.0'
We generally refer to this overall situation as "fixed guest ABI" or
"fixed machine type ABI".
> > Having said that, possibly the functional fix itself might need to
> > be tied to the machine type too, given that it is triggering a
> > behavioural change in the emulation and guest driver ? If that's
>
> There is no behavioural change on QEMU's side. QEMU has always been
> able to perform IO up to the controller interface's limit. Yes, it does
> change Linux's behavior.
Yes, I meant, we would be changing what features QEMU exposes to the
guest, and that changes the guest behaviour
> > the case, then the version could be changed at the same time.
>
> I was skimming through https://www.qemu.org/docs/master/devel/migration/compatibility.html.
> So tying this to the machine type would mean (if I am not mistaken, but do
> correct me if I'm wrong) setting the device version (or an equivalent device
> property) in hw_compat_10_2 (in our case, since it's the last QEMU release).
> Is this correct?
Yes, something along those lines. We're about to make the QEMU 11.0.0
release, in a feew weeks and are in freeze now. We can take bug fix
patches in freeze, so 11.0 is still a possibility.
We might want a specific bool property 'x-sata-identify-fix' to control
enablement of the fix that is added to hw_compat, parallel to the
version change.
> My only other concern would be how to expose firmware versions in a proper way.
> From my reading, it is clear that QEMU does not want to expose versions to
> guests. Perhaps some versioning scheme like "2.6.<revision>" or maybe even
> "2.5+<revision>" could be maximally backwards compatible whilst not exposing
> too much to the guest.
IIUC, we didn't want the version in the hardware to unconditionally
change every time the QEMU version changed. So back in the 2.5 release
we fixed the version at 2.5, such that future changes would need an
explicit decision. I think it is likely Ok to change the version
number to 11
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-03-19 16:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 16:29 [PATCH] ide: Set IDENTIFY word 93 to 0 on SATA drives Pedro Falcato
2026-03-18 16:54 ` Daniel P. Berrangé
2026-03-18 16:58 ` Daniel P. Berrangé
2026-03-18 17:24 ` Pedro Falcato
2026-03-19 16:05 ` Daniel P. Berrangé [this message]
2026-03-18 20:13 ` BALATON Zoltan
2026-03-24 17:01 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abweyyF6XIC4vvKV@redhat.com \
--to=berrange@redhat.com \
--cc=cassel@kernel.org \
--cc=jsnow@redhat.com \
--cc=pfalcato@suse.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox