qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Alberto Faria <afaria@redhat.com>,
	qemu-devel@nongnu.org, Fam Zheng <fam@euphon.net>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-block@nongnu.org
Subject: Re: [PATCH 1/2] scsi-disk: Advertise FUA support by default
Date: Thu, 6 Mar 2025 11:43:03 +0100	[thread overview]
Message-ID: <Z8l8N0JGULfuNrzH@redhat.com> (raw)
In-Reply-To: <Z8cnJB2KRxl9ULHC@redhat.com>

Am 04.03.2025 um 17:15 hat Daniel P. Berrangé geschrieben:
> On Tue, Mar 04, 2025 at 03:52:31PM +0000, Alberto Faria wrote:
> > FUA emulation code is already is place.
> > 
> > Signed-off-by: Alberto Faria <afaria@redhat.com>
> > ---
> >  hw/scsi/scsi-disk.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
> > index e7f738b484..8cf50845ab 100644
> > --- a/hw/scsi/scsi-disk.c
> > +++ b/hw/scsi/scsi-disk.c
> > @@ -3212,7 +3212,7 @@ static const Property scsi_hd_properties[] = {
> >      DEFINE_PROP_BIT("removable", SCSIDiskState, features,
> >                      SCSI_DISK_F_REMOVABLE, false),
> >      DEFINE_PROP_BIT("dpofua", SCSIDiskState, features,
> > -                    SCSI_DISK_F_DPOFUA, false),
> > +                    SCSI_DISK_F_DPOFUA, true),
> 
> Should this come with machine type compat to prevent us advertizing FUA
> to existing machine type versions ?

To give a little more background to Alberto: When upgrading QEMU, you
don't want the guest-visible machine to change. You already don't really
want hardware changes while the VM is down (Windows might require
reactivation etc.), but we support live migration between old and new
versions (often in both directions) as long as you use the same machine
type, and no guest expects that the hardware changes while it's running.

So we can only change guest-visible features in new machine types. What
you set here is fine for all new machine types, but you'll have to set
it back to false in hw_compat_9_2 in hw/core/machine.c so that all older
machine types still get the old default.

Kevin



  reply	other threads:[~2025-03-06 10:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 15:52 [PATCH 0/2] scsi-disk: Add FUA write support Alberto Faria
2025-03-04 15:52 ` [PATCH 1/2] scsi-disk: Advertise FUA support by default Alberto Faria
2025-03-04 16:15   ` Daniel P. Berrangé
2025-03-06 10:43     ` Kevin Wolf [this message]
2025-03-04 15:52 ` [PATCH 2/2] scsi-disk: Add native FUA support Alberto Faria
2025-03-06 10:33   ` Kevin Wolf
2025-03-25 12:48     ` Kevin Wolf
2025-03-25 15:54       ` Stefan Hajnoczi

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=Z8l8N0JGULfuNrzH@redhat.com \
    --to=kwolf@redhat.com \
    --cc=afaria@redhat.com \
    --cc=berrange@redhat.com \
    --cc=fam@euphon.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@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;
as well as URLs for NNTP newsgroup(s).