diff options
author | Alberto Faria <afaria@redhat.com> | 2025-05-02 13:11:15 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2025-05-21 18:52:17 +0200 |
commit | 5562e214e82ae4bcb0b642cc52b304bdc78a58c3 (patch) | |
tree | 0f1bb816623bb25cecd1f45c0aedd3950119057e | |
parent | e460991883d7209d52d0fdb534d9cd8cce0f9cce (diff) | |
download | qemu-5562e214e82ae4bcb0b642cc52b304bdc78a58c3.zip qemu-5562e214e82ae4bcb0b642cc52b304bdc78a58c3.tar.gz qemu-5562e214e82ae4bcb0b642cc52b304bdc78a58c3.tar.bz2 |
scsi-disk: Advertise FUA support by default
Allow the guest to submit FUA requests directly, instead of forcing it
to emulate them using a regular flush.
Signed-off-by: Alberto Faria <afaria@redhat.com>
Message-ID: <20250502121115.3613717-3-afaria@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | hw/core/machine.c | 4 | ||||
-rw-r--r-- | hw/scsi/scsi-disk.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index b8ae155..c3f3a50 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -37,7 +37,9 @@ #include "hw/virtio/virtio-iommu.h" #include "audio/audio.h" -GlobalProperty hw_compat_10_0[] = {}; +GlobalProperty hw_compat_10_0[] = { + { "scsi-hd", "dpofua", "off" }, +}; const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0); GlobalProperty hw_compat_9_2[] = { diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 738d8df..b4782c6 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -3192,7 +3192,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), DEFINE_PROP_UINT64("wwn", SCSIDiskState, qdev.wwn, 0), DEFINE_PROP_UINT64("port_wwn", SCSIDiskState, qdev.port_wwn, 0), DEFINE_PROP_UINT16("port_index", SCSIDiskState, port_index, 0), |