- hw/arm/virt:Keep Guest L1 cache type consistent with KVM - cvm : Add support for TEE-based national encryption acceleration. - Add virtCCA Coda annotation Adjust the position of the security device - target/i386: sev: Add support for reuse ASID for different CSV guests - target/i386: sev: Fix incompatibility between SEV and CSV on the GET_ID API - hw/cxl: Ensure there is enough data for the header in cmd_ccls_set_lsa() - hw/pci: Add parenthesis to PCI_BUILD_BDF macro - hw/audio/hda: free timer on exit - meson.build: Remove ncurses workaround for OpenBSD - ui/console-vc: Silence warning about sprintf() on OpenBSD - ui: remove break after g_assert_not_reached() - s390x/sclp: Simplify get_sclp_device() - hw/vfio/hct: qemu startup terminate once error happened in hct - hw/vfio/hct: fix ccp_index error caused by uninitialized buf - hw/vfio/hct: update support ccp count to 48. - hw/vfio: add device hct based on vfio. Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit 702a9cc4e262a50f7aa6f7c9549fbc13d4cd0770)
49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
From 358b772c1289c1bf42dfe8c62b04b8a28d60ebf1 Mon Sep 17 00:00:00 2001
|
|
From: Zhang Jiao <zhangjiao2_yewu@cmss.chinamobile.com>
|
|
Date: Mon, 21 Oct 2024 14:28:13 +0800
|
|
Subject: [PATCH] s390x/sclp: Simplify get_sclp_device()
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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.
|
|
|
|
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: Zhang Jiao <zhangjiao2_yewu@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 893e71a41b..69bf04e23a 100644
|
|
--- a/hw/s390x/sclp.c
|
|
+++ b/hw/s390x/sclp.c
|
|
@@ -21,13 +21,14 @@
|
|
#include "hw/s390x/s390-pci-bus.h"
|
|
#include "hw/s390x/ipl.h"
|
|
#include "hw/s390x/cpu-topology.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.41.0.windows.1
|
|
|