[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] hw/s390x/pv: Simplify s390_is_pv() for user emulation
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 3/5] hw/s390x/pv: Simplify s390_is_pv() for user emulation |
Date: |
Sat, 17 Dec 2022 12:42:28 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 |
On 16/12/22 23:04, Philippe Mathieu-Daudé wrote:
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; }
This change is because I'm trying to get ride of:
../target/s390x/cpu_features.c: In function ‘s390_fill_feat_block’:
../target/s390x/cpu_features.c:112:10: error: implicit declaration of
function ‘s390_is_pv’ [-Werror=implicit-function-declaration]
112 | if (!s390_is_pv()) {
| ^~~~~~~~~~
../target/s390x/cpu_features.c:112:10: error: nested extern declaration
of ‘s390_is_pv’ [-Werror=nested-externs]
../target/s390x/cpu_models.c: In function ‘s390_has_feat’:
../target/s390x/cpu_models.c:239:9: error: implicit declaration of
function ‘s390_is_pv’ [-Werror=implicit-function-declaration]
239 | if (s390_is_pv()) {
| ^~~~~~~~~~
../target/s390x/cpu_models.c:239:9: error: nested extern declaration of
‘s390_is_pv’ [-Werror=nested-externs]
without including <sysemu/kvm.h> in common code. Common code shouldn't
include hw/ header...
I'll respin guarding more code against CONFIG_USER_ONLY.
- [PATCH 0/5] target/s390x: Header cleanups around "cpu.h", Philippe Mathieu-Daudé, 2022/12/16
- [PATCH 1/5] exec/memory: Expose memory_region_access_valid(), Philippe Mathieu-Daudé, 2022/12/16
- [PATCH 2/5] hw/s390x/pv: Un-inline s390_pv_init(), Philippe Mathieu-Daudé, 2022/12/16
- [PATCH 3/5] hw/s390x/pv: Simplify s390_is_pv() for user emulation, Philippe Mathieu-Daudé, 2022/12/16
- Re: [PATCH 3/5] hw/s390x/pv: Simplify s390_is_pv() for user emulation,
Philippe Mathieu-Daudé <=
- [PATCH 5/5] target/s390x/tcg/excp_helper: Restrict system headers to sysemu, Philippe Mathieu-Daudé, 2022/12/16
- [PATCH 4/5] target/s390x/tcg/misc_helper: Remove unused "memory.h" include, Philippe Mathieu-Daudé, 2022/12/16