[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/15] hw/s390x/pv: Restrict Protected Virtualization to sysemu
From: |
Thomas Huth |
Subject: |
[PULL 05/15] hw/s390x/pv: Restrict Protected Virtualization to sysemu |
Date: |
Fri, 6 Jan 2023 09:28:43 +0100 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Protected Virtualization is irrelevant in user emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221217152454.96388-4-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/cpu_features.c | 4 ++++
target/s390x/cpu_models.c | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
index 5528acd082..2e4e11d264 100644
--- a/target/s390x/cpu_features.c
+++ b/target/s390x/cpu_features.c
@@ -14,7 +14,9 @@
#include "qemu/osdep.h"
#include "qemu/module.h"
#include "cpu_features.h"
+#ifndef CONFIG_USER_ONLY
#include "hw/s390x/pv.h"
+#endif
#define DEF_FEAT(_FEAT, _NAME, _TYPE, _BIT, _DESC) \
[S390_FEAT_##_FEAT] = { \
@@ -107,6 +109,7 @@ void s390_fill_feat_block(const S390FeatBitmap features,
S390FeatType type,
feat = find_next_bit(features, S390_FEAT_MAX, feat + 1);
}
+#ifndef CONFIG_USER_ONLY
if (!s390_is_pv()) {
return;
}
@@ -147,6 +150,7 @@ void s390_fill_feat_block(const S390FeatBitmap features,
S390FeatType type,
default:
return;
}
+#endif
}
void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type,
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index c3a4f80633..065ec6d66c 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -23,8 +23,8 @@
#include "qemu/qemu-print.h"
#ifndef CONFIG_USER_ONLY
#include "sysemu/sysemu.h"
-#endif
#include "hw/s390x/pv.h"
+#endif
#define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \
{ \
@@ -236,6 +236,7 @@ bool s390_has_feat(S390Feat feat)
return 0;
}
+#ifndef CONFIG_USER_ONLY
if (s390_is_pv()) {
switch (feat) {
case S390_FEAT_DIAG_318:
@@ -259,6 +260,7 @@ bool s390_has_feat(S390Feat feat)
break;
}
}
+#endif
return test_bit(feat, cpu->model->features);
}
--
2.31.1
- [PULL 00/15] First batch of s390x, qtests and misc fixes in 2023, Thomas Huth, 2023/01/06
- [PULL 01/15] qemu-iotests/stream-under-throttle: do not shutdown QEMU, Thomas Huth, 2023/01/06
- [PULL 04/15] exec/memory: Expose memory_region_access_valid(), Thomas Huth, 2023/01/06
- [PULL 05/15] hw/s390x/pv: Restrict Protected Virtualization to sysemu,
Thomas Huth <=
- [PULL 02/15] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts, Thomas Huth, 2023/01/06
- [PULL 06/15] target/s390x/tcg/misc_helper: Remove unused "memory.h" include, Thomas Huth, 2023/01/06
- [PULL 07/15] target/s390x/tcg/excp_helper: Restrict system headers to sysemu, Thomas Huth, 2023/01/06
- [PULL 09/15] tests/readconfig: spice doesn't support unix socket on windows yet, Thomas Huth, 2023/01/06
- [PULL 08/15] target/s390x: Restrict sysemu/reset.h to system emulation, Thomas Huth, 2023/01/06
- [PULL 03/15] MAINTAINERS: Add MIPS-related docs and configs to the MIPS architecture section, Thomas Huth, 2023/01/06
- [PULL 10/15] i386: Deprecate the -no-hpet QEMU command line option, Thomas Huth, 2023/01/06
- [PULL 14/15] error handling: Use RETRY_ON_EINTR() macro where applicable, Thomas Huth, 2023/01/06
- [PULL 12/15] Update scripts/meson-buildoptions.sh, Thomas Huth, 2023/01/06
- [PULL 11/15] docs/interop: Change the vnc-ledstate-Pseudo-encoding doc into .rst, Thomas Huth, 2023/01/06