* [PATCH] hw/s390x: Include missing 'cpu.h' header
@ 2024-03-22 16:28 Philippe Mathieu-Daudé
2024-03-25 11:01 ` Thomas Huth
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-03-22 16:28 UTC (permalink / raw)
To: qemu-devel
Cc: Ilya Leoshkevich, Thomas Huth, qemu-s390x, Richard Henderson,
Eric Farman, Christian Borntraeger, Halil Pasic,
David Hildenbrand, Philippe Mathieu-Daudé
"cpu.h" is implicitly included. Include it explicitly to
avoid the following error when refactoring headers:
hw/s390x/s390-stattrib.c:86:40: error: use of undeclared identifier 'TARGET_PAGE_SIZE'
len = sac->peek_stattr(sas, addr / TARGET_PAGE_SIZE, buflen, vals);
^
hw/s390x/s390-stattrib.c:94:58: error: use of undeclared identifier 'TARGET_PAGE_MASK'
addr / TARGET_PAGE_SIZE, len, addr & ~TARGET_PAGE_MASK);
^
hw/s390x/s390-stattrib.c:224:40: error: use of undeclared identifier 'TARGET_PAGE_BITS'
qemu_put_be64(f, (start_gfn << TARGET_PAGE_BITS) | STATTR_FLAG_MORE);
^
In file included from hw/s390x/s390-virtio-ccw.c:17:
hw/s390x/s390-virtio-hcall.h:22:27: error: unknown type name 'CPUS390XState'
int s390_virtio_hypercall(CPUS390XState *env);
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/s390x/s390-virtio-hcall.h | 2 ++
hw/s390x/s390-stattrib.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/hw/s390x/s390-virtio-hcall.h b/hw/s390x/s390-virtio-hcall.h
index 9800c4b351..3ae6d6ae3a 100644
--- a/hw/s390x/s390-virtio-hcall.h
+++ b/hw/s390x/s390-virtio-hcall.h
@@ -13,6 +13,7 @@
#define HW_S390_VIRTIO_HCALL_H
#include "standard-headers/asm-s390/virtio-ccw.h"
+#include "cpu.h"
/* The only thing that we need from the old kvm_virtio.h file */
#define KVM_S390_VIRTIO_NOTIFY 0
@@ -20,4 +21,5 @@
typedef int (*s390_virtio_fn)(const uint64_t *args);
void s390_register_virtio_hypercall(uint64_t code, s390_virtio_fn fn);
int s390_virtio_hypercall(CPUS390XState *env);
+
#endif /* HW_S390_VIRTIO_HCALL_H */
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
index c483b62a9b..aaf48ac73f 100644
--- a/hw/s390x/s390-stattrib.c
+++ b/hw/s390x/s390-stattrib.c
@@ -19,6 +19,7 @@
#include "exec/ram_addr.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
+#include "cpu.h"
/* 512KiB cover 2GB of guest memory */
#define CMMA_BLOCK_SIZE (512 * KiB)
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/s390x: Include missing 'cpu.h' header
2024-03-22 16:28 [PATCH] hw/s390x: Include missing 'cpu.h' header Philippe Mathieu-Daudé
@ 2024-03-25 11:01 ` Thomas Huth
2024-03-25 18:23 ` Eric Farman
2024-04-16 13:25 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2024-03-25 11:01 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Ilya Leoshkevich, qemu-s390x, Richard Henderson, Eric Farman,
Christian Borntraeger, Halil Pasic, David Hildenbrand
On 22/03/2024 17.28, Philippe Mathieu-Daudé wrote:
> "cpu.h" is implicitly included. Include it explicitly to
> avoid the following error when refactoring headers:
>
> hw/s390x/s390-stattrib.c:86:40: error: use of undeclared identifier 'TARGET_PAGE_SIZE'
> len = sac->peek_stattr(sas, addr / TARGET_PAGE_SIZE, buflen, vals);
> ^
> hw/s390x/s390-stattrib.c:94:58: error: use of undeclared identifier 'TARGET_PAGE_MASK'
> addr / TARGET_PAGE_SIZE, len, addr & ~TARGET_PAGE_MASK);
> ^
> hw/s390x/s390-stattrib.c:224:40: error: use of undeclared identifier 'TARGET_PAGE_BITS'
> qemu_put_be64(f, (start_gfn << TARGET_PAGE_BITS) | STATTR_FLAG_MORE);
> ^
> In file included from hw/s390x/s390-virtio-ccw.c:17:
> hw/s390x/s390-virtio-hcall.h:22:27: error: unknown type name 'CPUS390XState'
> int s390_virtio_hypercall(CPUS390XState *env);
> ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/s390x/s390-virtio-hcall.h | 2 ++
> hw/s390x/s390-stattrib.c | 1 +
> 2 files changed, 3 insertions(+)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/s390x: Include missing 'cpu.h' header
2024-03-22 16:28 [PATCH] hw/s390x: Include missing 'cpu.h' header Philippe Mathieu-Daudé
2024-03-25 11:01 ` Thomas Huth
@ 2024-03-25 18:23 ` Eric Farman
2024-04-16 13:25 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Eric Farman @ 2024-03-25 18:23 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Ilya Leoshkevich, Thomas Huth, qemu-s390x, Richard Henderson,
Christian Borntraeger, Halil Pasic, David Hildenbrand
On Fri, 2024-03-22 at 17:28 +0100, Philippe Mathieu-Daudé wrote:
> "cpu.h" is implicitly included. Include it explicitly to
> avoid the following error when refactoring headers:
>
> hw/s390x/s390-stattrib.c:86:40: error: use of undeclared identifier
> 'TARGET_PAGE_SIZE'
> len = sac->peek_stattr(sas, addr / TARGET_PAGE_SIZE, buflen,
> vals);
> ^
> hw/s390x/s390-stattrib.c:94:58: error: use of undeclared identifier
> 'TARGET_PAGE_MASK'
> addr / TARGET_PAGE_SIZE, len, addr &
> ~TARGET_PAGE_MASK);
> ^
> hw/s390x/s390-stattrib.c:224:40: error: use of undeclared
> identifier 'TARGET_PAGE_BITS'
> qemu_put_be64(f, (start_gfn << TARGET_PAGE_BITS) |
> STATTR_FLAG_MORE);
> ^
> In file included from hw/s390x/s390-virtio-ccw.c:17:
> hw/s390x/s390-virtio-hcall.h:22:27: error: unknown type name
> 'CPUS390XState'
> int s390_virtio_hypercall(CPUS390XState *env);
> ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/s390x/s390-virtio-hcall.h | 2 ++
> hw/s390x/s390-stattrib.c | 1 +
> 2 files changed, 3 insertions(+)
These aren't the only implicit users of cpu.h in hw/s390x/ but if this
solves one problem, then that's good.
Acked-by: Eric Farman <farman@linux.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/s390x: Include missing 'cpu.h' header
2024-03-22 16:28 [PATCH] hw/s390x: Include missing 'cpu.h' header Philippe Mathieu-Daudé
2024-03-25 11:01 ` Thomas Huth
2024-03-25 18:23 ` Eric Farman
@ 2024-04-16 13:25 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-16 13:25 UTC (permalink / raw)
To: qemu-devel
Cc: Ilya Leoshkevich, Thomas Huth, qemu-s390x, Richard Henderson,
Eric Farman, Christian Borntraeger, Halil Pasic,
David Hildenbrand
On 22/3/24 17:28, Philippe Mathieu-Daudé wrote:
> "cpu.h" is implicitly included. Include it explicitly to
> avoid the following error when refactoring headers:
>
> hw/s390x/s390-stattrib.c:86:40: error: use of undeclared identifier 'TARGET_PAGE_SIZE'
> len = sac->peek_stattr(sas, addr / TARGET_PAGE_SIZE, buflen, vals);
> ^
> hw/s390x/s390-stattrib.c:94:58: error: use of undeclared identifier 'TARGET_PAGE_MASK'
> addr / TARGET_PAGE_SIZE, len, addr & ~TARGET_PAGE_MASK);
> ^
> hw/s390x/s390-stattrib.c:224:40: error: use of undeclared identifier 'TARGET_PAGE_BITS'
> qemu_put_be64(f, (start_gfn << TARGET_PAGE_BITS) | STATTR_FLAG_MORE);
> ^
> In file included from hw/s390x/s390-virtio-ccw.c:17:
> hw/s390x/s390-virtio-hcall.h:22:27: error: unknown type name 'CPUS390XState'
> int s390_virtio_hypercall(CPUS390XState *env);
> ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/s390x/s390-virtio-hcall.h | 2 ++
> hw/s390x/s390-stattrib.c | 1 +
> 2 files changed, 3 insertions(+)
Patch queued via hw-misc, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-16 13:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 16:28 [PATCH] hw/s390x: Include missing 'cpu.h' header Philippe Mathieu-Daudé
2024-03-25 11:01 ` Thomas Huth
2024-03-25 18:23 ` Eric Farman
2024-04-16 13:25 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.