Commit 1afc7da7db for qemu.org
commit 1afc7da7dbc3f4c3b8cf310ff30a08f6f02587c8
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: Fri Feb 13 14:50:45 2026 +0100
hw/scsi/disk: Prefer target_s390x() over qemu_arch_available()
qemu_arch_available() is used to check if a broadly available
feature should be exposed to a particular set of target
architectures. Here we only want to check something that is
specific to s390x: the target_s390x() helper is more adapted.
Besides, it will allow to reduce qemu_arch_available() scope.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20260213175032.32121-4-philmd@linaro.org>
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 2f400f5b77..a520185535 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -27,13 +27,13 @@
#include "qemu/module.h"
#include "qemu/hw-version.h"
#include "qemu/memalign.h"
+#include "qemu/target-info.h"
#include "hw/scsi/scsi.h"
#include "migration/misc.h"
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
#include "hw/scsi/emulation.h"
#include "scsi/constants.h"
-#include "system/arch_init.h"
#include "system/block-backend.h"
#include "system/blockdev.h"
#include "hw/block/block.h"
@@ -3180,7 +3180,7 @@ static void scsi_property_add_specifics(DeviceClass *dc)
ObjectClass *oc = OBJECT_CLASS(dc);
/* The loadparm property is only supported on s390x */
- if (qemu_arch_available(QEMU_ARCH_S390X)) {
+ if (target_s390x()) {
object_class_property_add_str(oc, "loadparm",
scsi_property_get_loadparm,
scsi_property_set_loadparm);