[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] hw/s390x/pv: Simplify s390_is_pv() for user emulation
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/5] hw/s390x/pv: Simplify s390_is_pv() for user emulation |
Date: |
Fri, 16 Dec 2022 23:04:09 +0100 |
Protected Virtualization is irrelevant in user emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/s390x/pv.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h
index 5bca5bcaf1..a4814ce303 100644
--- a/include/hw/s390x/pv.h
+++ b/include/hw/s390x/pv.h
@@ -12,6 +12,12 @@
#ifndef HW_S390_PV_H
#define HW_S390_PV_H
+#ifdef CONFIG_USER_ONLY
+
+static inline bool s390_is_pv(void) { return false; }
+
+#else /* !CONFIG_USER_ONLY */
+
#include "sysemu/kvm.h"
#ifdef CONFIG_KVM
@@ -79,4 +85,6 @@ static inline int kvm_s390_dump_completion_data(void *buff) {
return 0; }
int s390_pv_kvm_init(ConfidentialGuestSupport *cgs, Error **errp);
int s390_pv_init(ConfidentialGuestSupport *cgs, Error **errp);
+#endif /* CONFIG_USER_ONLY */
+
#endif /* HW_S390_PV_H */
--
2.38.1