Both s390_cpu_list() and s390_set_qemu_cpu_model() are
defined in cpu_models.c, move their declarations in the
related "cpu_models.h" header. Use full path to header
in s390-virtio-ccw.c file.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/s390x/cpu.h | 4 ----
target/s390x/cpu_models.h | 3 +++
hw/s390x/s390-virtio-ccw.c | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 5b7992deda6..8dd1936e3e2 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -900,11 +900,7 @@ static inline uint8_t s390_cpu_get_state(S390CPU *cpu)
}
-/* cpu_models.c */
-void s390_cpu_list(void);
#define cpu_list s390_cpu_list
-void s390_set_qemu_cpu_model(uint16_t type, uint8_t gen, uint8_t ec_ga,
- const S390FeatInit feat_init);
/* helper.c */
diff --git a/target/s390x/cpu_models.h b/target/s390x/cpu_models.h
index 71d4bc2dd4a..f701bc0b532 100644
--- a/target/s390x/cpu_models.h
+++ b/target/s390x/cpu_models.h
@@ -113,6 +113,9 @@ static inline uint64_t s390_cpuid_from_cpu_model(const S390CPUModel *model)
}
S390CPUDef const *s390_find_cpu_def(uint16_t type, uint8_t gen, uint8_t ec_ga,
S390FeatBitmap features);
+void s390_set_qemu_cpu_model(uint16_t type, uint8_t gen, uint8_t ec_ga,
+ const S390FeatInit feat_init);
+void s390_cpu_list(void);
bool kvm_s390_cpu_models_supported(void);
bool kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp);
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 75b32182eb0..4f11c75b625 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -35,7 +35,7 @@
#include "hw/s390x/css-bridge.h"
#include "hw/s390x/ap-bridge.h"
#include "migration/register.h"
-#include "cpu_models.h"
+#include "target/s390x/cpu_models.h"
#include "hw/nmi.h"
#include "hw/qdev-properties.h"
#include "hw/s390x/tod.h"
--
2.47.1
On Mon, 2025-03-24 at 19:58 +0100, Philippe Mathieu-Daudé wrote: > Both s390_cpu_list() and s390_set_qemu_cpu_model() are > defined in cpu_models.c, move their declarations in the > related "cpu_models.h" header. Use full path to header > in s390-virtio-ccw.c file. > > Suggested-by: Thomas Huth <thuth@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > target/s390x/cpu.h | 4 ---- > target/s390x/cpu_models.h | 3 +++ > hw/s390x/s390-virtio-ccw.c | 2 +- > 3 files changed, 4 insertions(+), 5 deletions(-) (resending with reply-all) Reviewed-by: Eric Farman <farman@linux.ibm.com>
On Mon, Mar 24, 2025 at 07:58:35PM +0100, Philippe Mathieu-Daudé wrote: > Date: Mon, 24 Mar 2025 19:58:35 +0100 > From: Philippe Mathieu-Daudé <philmd@linaro.org> > Subject: [PATCH v3 5/7] target/s390x: Declare > s390_set_qemu_cpu_model/cpu_list in cpu_models.h > X-Mailer: git-send-email 2.47.1 > > Both s390_cpu_list() and s390_set_qemu_cpu_model() are > defined in cpu_models.c, move their declarations in the > related "cpu_models.h" header. Use full path to header > in s390-virtio-ccw.c file. > > Suggested-by: Thomas Huth <thuth@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > target/s390x/cpu.h | 4 ---- > target/s390x/cpu_models.h | 3 +++ > hw/s390x/s390-virtio-ccw.c | 2 +- > 3 files changed, 4 insertions(+), 5 deletions(-) Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
On 24/03/2025 19.58, Philippe Mathieu-Daudé wrote: > Both s390_cpu_list() and s390_set_qemu_cpu_model() are > defined in cpu_models.c, move their declarations in the > related "cpu_models.h" header. Use full path to header > in s390-virtio-ccw.c file. > > Suggested-by: Thomas Huth <thuth@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > target/s390x/cpu.h | 4 ---- > target/s390x/cpu_models.h | 3 +++ > hw/s390x/s390-virtio-ccw.c | 2 +- > 3 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h > index 5b7992deda6..8dd1936e3e2 100644 > --- a/target/s390x/cpu.h > +++ b/target/s390x/cpu.h > @@ -900,11 +900,7 @@ static inline uint8_t s390_cpu_get_state(S390CPU *cpu) > } > > > -/* cpu_models.c */ > -void s390_cpu_list(void); > #define cpu_list s390_cpu_list > -void s390_set_qemu_cpu_model(uint16_t type, uint8_t gen, uint8_t ec_ga, > - const S390FeatInit feat_init); > > > /* helper.c */ > diff --git a/target/s390x/cpu_models.h b/target/s390x/cpu_models.h > index 71d4bc2dd4a..f701bc0b532 100644 > --- a/target/s390x/cpu_models.h > +++ b/target/s390x/cpu_models.h > @@ -113,6 +113,9 @@ static inline uint64_t s390_cpuid_from_cpu_model(const S390CPUModel *model) > } > S390CPUDef const *s390_find_cpu_def(uint16_t type, uint8_t gen, uint8_t ec_ga, > S390FeatBitmap features); > +void s390_set_qemu_cpu_model(uint16_t type, uint8_t gen, uint8_t ec_ga, > + const S390FeatInit feat_init); > +void s390_cpu_list(void); > > bool kvm_s390_cpu_models_supported(void); > bool kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp); > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index 75b32182eb0..4f11c75b625 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -35,7 +35,7 @@ > #include "hw/s390x/css-bridge.h" > #include "hw/s390x/ap-bridge.h" > #include "migration/register.h" > -#include "cpu_models.h" > +#include "target/s390x/cpu_models.h" > #include "hw/nmi.h" > #include "hw/qdev-properties.h" > #include "hw/s390x/tod.h" Reviewed-by: Thomas Huth <thuth@redhat.com>
© 2016 - 2025 Red Hat, Inc.