Message ID | 20231113152114.47916-9-philmd@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | hw/xen: Have most of Xen files become target-agnostic | expand |
On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: > "hw/xen/xen.h" contains declarations for Xen hardware. There is > no point including it when Xen is not available. ... if even when Xen *is* available, AFAICT. Can you just remove the inclusion of hw/xen/xen.h entirely? I think that still builds, at least for x86. > When Xen is not > available, we have enough with declarations of "sysemu/xen.h". ... and system/xen-mapcache.h > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
On 13/11/23 21:03, David Woodhouse wrote: > On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: >> "hw/xen/xen.h" contains declarations for Xen hardware. There is >> no point including it when Xen is not available. > > ... if even when Xen *is* available, AFAICT. Can you just remove the > inclusion of hw/xen/xen.h entirely? I think that still builds, at least > for x86. Yep, also on aarch64, thanks! >> When Xen is not >> available, we have enough with declarations of "sysemu/xen.h". > > ... and system/xen-mapcache.h > >> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> >
diff --git a/system/physmem.c b/system/physmem.c index fc2b0fee01..fa667437da 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -35,9 +35,9 @@ #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "hw/boards.h" -#include "hw/xen/xen.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" +#include "sysemu/xen.h" #include "sysemu/qtest.h" #include "qemu/timer.h" #include "qemu/config-file.h" @@ -51,6 +51,9 @@ #include "sysemu/hostmem.h" #include "sysemu/hw_accel.h" #include "sysemu/xen-mapcache.h" +#ifdef CONFIG_XEN +#include "hw/xen/xen.h" +#endif #include "trace/trace-root.h" #ifdef CONFIG_FALLOCATE_PUNCH_HOLE
"hw/xen/xen.h" contains declarations for Xen hardware. There is no point including it when Xen is not available. When Xen is not available, we have enough with declarations of "sysemu/xen.h". Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- system/physmem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)