aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGautam Gala <ggala@linux.ibm.com>2025-04-23 10:09:14 +0200
committerThomas Huth <thuth@redhat.com>2025-04-30 09:48:57 +0200
commite27cbd17dd5d46f92e2e9610e4ed12b525c548be (patch)
treea959df67507a440560293c1c36c550be5974f042
parent2e6a9f03ba1e8145cf71eced2b97611cfa754898 (diff)
downloadqemu-e27cbd17dd5d46f92e2e9610e4ed12b525c548be.zip
qemu-e27cbd17dd5d46f92e2e9610e4ed12b525c548be.tar.gz
qemu-e27cbd17dd5d46f92e2e9610e4ed12b525c548be.tar.bz2
target/s390x: Introduce function when exiting PV
Replace an existing macro (s390_pv_cmd_exit) that looks like a function with an actual function. The function will be used when exiting PV instead of the macro. Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Gautam Gala <ggala@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250423080915.1048123-3-ggala@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--target/s390x/kvm/pv.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/target/s390x/kvm/pv.c b/target/s390x/kvm/pv.c
index 1947a3d..30b64f7 100644
--- a/target/s390x/kvm/pv.c
+++ b/target/s390x/kvm/pv.c
@@ -59,14 +59,12 @@ static int __s390_pv_cmd(uint32_t cmd, const char *cmdname, void *data,
*/
#define s390_pv_cmd(cmd, data) __s390_pv_cmd(cmd, #cmd, data, NULL)
#define s390_pv_cmd_pvrc(cmd, data, pvrc) __s390_pv_cmd(cmd, #cmd, data, pvrc)
-#define s390_pv_cmd_exit(cmd, data) \
-{ \
- int rc; \
- \
- rc = __s390_pv_cmd(cmd, #cmd, data, NULL); \
- if (rc) { \
- exit(1); \
- } \
+
+static void s390_pv_cmd_exit(uint32_t cmd, void *data)
+{
+ if (s390_pv_cmd(cmd, data)) {
+ exit(1);
+ }
}
int s390_pv_query_info(void)