qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/5] hw/s390x/pv: Un-inline s390_pv_init()


From: Philippe Mathieu-Daudé
Subject: [PATCH 2/5] hw/s390x/pv: Un-inline s390_pv_init()
Date: Fri, 16 Dec 2022 23:04:08 +0100

There is no point in having s390_pv_init() inlined.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/s390x/pv.c         | 13 +++++++++++++
 include/hw/s390x/pv.h | 14 +-------------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c
index 8dfe92d8df..9c511369b2 100644
--- a/hw/s390x/pv.c
+++ b/hw/s390x/pv.c
@@ -26,6 +26,19 @@ static bool info_valid;
 static struct kvm_s390_pv_info_vm info_vm;
 static struct kvm_s390_pv_info_dump info_dump;
 
+int s390_pv_init(ConfidentialGuestSupport *cgs, Error **errp)
+{
+    if (!cgs) {
+        return 0;
+    }
+    if (kvm_enabled()) {
+        return s390_pv_kvm_init(cgs, errp);
+    }
+
+    error_setg(errp, "Protected Virtualization requires KVM");
+    return -1;
+}
+
 static int __s390_pv_cmd(uint32_t cmd, const char *cmdname, void *data)
 {
     struct kvm_pv_cmd pv_cmd = {
diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h
index 9360aa1091..5bca5bcaf1 100644
--- a/include/hw/s390x/pv.h
+++ b/include/hw/s390x/pv.h
@@ -12,7 +12,6 @@
 #ifndef HW_S390_PV_H
 #define HW_S390_PV_H
 
-#include "qapi/error.h"
 #include "sysemu/kvm.h"
 
 #ifdef CONFIG_KVM
@@ -78,17 +77,6 @@ static inline int kvm_s390_dump_completion_data(void *buff) 
{ return 0; }
 #endif /* CONFIG_KVM */
 
 int s390_pv_kvm_init(ConfidentialGuestSupport *cgs, Error **errp);
-static inline int s390_pv_init(ConfidentialGuestSupport *cgs, Error **errp)
-{
-    if (!cgs) {
-        return 0;
-    }
-    if (kvm_enabled()) {
-        return s390_pv_kvm_init(cgs, errp);
-    }
-
-    error_setg(errp, "Protected Virtualization requires KVM");
-    return -1;
-}
+int s390_pv_init(ConfidentialGuestSupport *cgs, Error **errp);
 
 #endif /* HW_S390_PV_H */
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]