qemu/s390x-sclp-Simplify-get_sclp_device.patch
Jiabo Feng 90057151bb QEMU update to version 6.2.0-92:
- s390x/sclp: Simplify get_sclp_device()
- target/ppc: Remove msr_pr macro
- docs/system/target-arm: Re-alphabetize board list
- migration: Extend query-migrate to provide dirty page limit info
- migration: Implement dirty-limit convergence algo
- migration: Put the detection logic before auto-converge checking
- migration: Refactor auto-converge capability logic
- migration: Introduce dirty-limit capability
- qapi/migration: Introduce vcpu-dirty-limit parameters
- qapi/migration: Introduce x-vcpu-dirty-limit-period parameter
- Change the value of no_ged from true to false
- Allow UNIX socket option for VNC websocket
- tpm_emulator: Avoid double initialization during
- chardev/char-socket: Update AF_UNIX for Windows
- KVM: dirty ring: add missing memory barrier
- i386: reset KVM nested state upon CPU reset
- esp: Handle CMD_BUSRESET by resetting the SCSI bus
- dbus-vmstate: Restrict error checks to registered proxies in dbus_get_proxies
- vfio/pci: Add Ascend310b scend910b support
- target/i386: Export RFDS bit to guests
- target/i386: Add new CPU model SierraForest
- target/i386: Introduce Icelake-Server-v7 to enable TSX
- hw/virtio: handle un-configured shutdown in virtio-pci
- target/s390x: display deprecation status in '-cpu  help'
- target/i386: display deprecation status in '-cpu  help'
- pc-bios/s390-ccw: Fix booting with logical block size < physical block size

Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
2024-06-13 14:32:49 +08:00

47 lines
1.5 KiB
Diff

From d25446c995e2c562d62d832bc8da58d13b731974 Mon Sep 17 00:00:00 2001
From: dinglimin <dinglimin@cmss.chinamobile.com>
Date: Mon, 10 Jun 2024 20:00:42 +0800
Subject: [PATCH] s390x/sclp: Simplify get_sclp_device() cheery-pick from
3d9836e46dbe1e46c39fe76a62d3085a71ddbf7a get_sclp_device() scans the whole
machine to find a TYPE_SCLP object. Now that the SCLPDevice instance is
available under the machine state, use it to simplify the lookup. While at
it, remove the inline to let the compiler decide on how to optimize.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Message-ID: <20240502131533.377719-4-clg@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: dinglimin <dinglimin@cmss.chinamobile.com>
---
hw/s390x/sclp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 89c30a8a91..24e29e8cda 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -20,13 +20,14 @@
#include "hw/s390x/event-facility.h"
#include "hw/s390x/s390-pci-bus.h"
#include "hw/s390x/ipl.h"
+#include "hw/s390x/s390-virtio-ccw.h"
-static inline SCLPDevice *get_sclp_device(void)
+static SCLPDevice *get_sclp_device(void)
{
static SCLPDevice *sclp;
if (!sclp) {
- sclp = SCLP(object_resolve_path_type("", TYPE_SCLP, NULL));
+ sclp = S390_CCW_MACHINE(qdev_get_machine())->sclp;
}
return sclp;
}
--
2.27.0