From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,
"Richard Henderson" <richard.henderson@linaro.org>,
xen-devel@lists.xenproject.org, qemu-arm@nongnu.org,
"Anthony PERARD" <anthony@xenproject.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Paul Durrant" <paul@xen.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Juergen Gross" <jgross@suse.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
"David Woodhouse" <dwmw2@infradead.org>,
"Vikram Garhwal" <vikram.garhwal@bytedance.com>,
"Thomas Huth" <thuth@redhat.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>
Subject: Re: [PATCH 4/8] hw/xen/xen-pvh: Reduce included headers
Date: Tue, 18 Feb 2025 10:53:44 -0600 [thread overview]
Message-ID: <CAJy5ezqZcT5gSGhy1tmXK_j439j2YRbc68sThQEWPoJ0qT6Z2Q@mail.gmail.com> (raw)
In-Reply-To: <20250218162618.46167-5-philmd@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]
On Tue, Feb 18, 2025 at 10:26 AM Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:
> Have "hw/xen/xen-pvh-common.h" include the bare minimal set
> of headers. Adapt sources to avoid errors when refactoring
> unrelated headers such:
>
> hw/i386/xen/xen-pvh.c: In function ‘xen_pvh_machine_class_init’:
> hw/i386/xen/xen-pvh.c:84:28: error: ‘TARGET_DEFAULT_CPU_TYPE’
> undeclared (first use in this function)
> 84 | mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
> | ^~~~~~~~~~~~~~~~~~~~~~~
> hw/xen/xen-pvh-common.c: In function ‘xen_pvh_init’:
> hw/xen/xen-pvh-common.c:217:43: error: ‘MiB’ undeclared (first use in
> this function)
> 217 | if (s->cfg.pci_ecam.size != 256 * MiB) {
> | ^~~
> hw/xen/xen-hvm-common.c:18:6: error: no previous prototype for
> ‘xen_mr_is_memory’ [-Werror=missing-prototypes]
> 18 | bool xen_mr_is_memory(MemoryRegion *mr)
> | ^~~~~~~~~~~~~~~~
>
>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/hw/xen/xen-pvh-common.h | 8 ++++----
> hw/i386/xen/xen-pvh.c | 1 +
> hw/xen/xen-pvh-common.c | 6 ++----
> 3 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/include/hw/xen/xen-pvh-common.h
> b/include/hw/xen/xen-pvh-common.h
> index 5cdd23c2f4d..17c5a58a5a4 100644
> --- a/include/hw/xen/xen-pvh-common.h
> +++ b/include/hw/xen/xen-pvh-common.h
> @@ -9,11 +9,11 @@
> #ifndef XEN_PVH_COMMON_H__
> #define XEN_PVH_COMMON_H__
>
> -#include <assert.h>
> -#include "hw/sysbus.h"
> -#include "hw/hw.h"
> -#include "hw/xen/xen-hvm-common.h"
> +#include "exec/memory.h"
> +#include "qom/object.h"
> +#include "hw/boards.h"
> #include "hw/pci-host/gpex.h"
> +#include "hw/xen/xen-hvm-common.h"
>
> #define TYPE_XEN_PVH_MACHINE MACHINE_TYPE_NAME("xen-pvh-base")
> OBJECT_DECLARE_TYPE(XenPVHMachineState, XenPVHMachineClass,
> diff --git a/hw/i386/xen/xen-pvh.c b/hw/i386/xen/xen-pvh.c
> index 33c10279763..f6356f2a7ed 100644
> --- a/hw/i386/xen/xen-pvh.c
> +++ b/hw/i386/xen/xen-pvh.c
> @@ -14,6 +14,7 @@
> #include "hw/xen/arch_hvm.h"
> #include <xen/hvm/hvm_info_table.h>
> #include "hw/xen/xen-pvh-common.h"
> +#include "target/i386/cpu.h"
>
> #define TYPE_XEN_PVH_X86 MACHINE_TYPE_NAME("xenpvh")
> OBJECT_DECLARE_SIMPLE_TYPE(XenPVHx86State, XEN_PVH_X86)
> diff --git a/hw/xen/xen-pvh-common.c b/hw/xen/xen-pvh-common.c
> index 9c21fa858d3..19876ad7e8d 100644
> --- a/hw/xen/xen-pvh-common.c
> +++ b/hw/xen/xen-pvh-common.c
> @@ -7,15 +7,13 @@
> */
>
> #include "qemu/osdep.h"
> -#include "qemu/error-report.h"
> -#include "qapi/error.h"
> +#include "qemu/units.h"
> #include "qapi/visitor.h"
> #include "hw/boards.h"
> #include "hw/irq.h"
> -#include "hw/sysbus.h"
> -#include "system/system.h"
> #include "system/tpm.h"
> #include "system/tpm_backend.h"
> +#include "system/runstate.h"
> #include "hw/xen/xen-pvh-common.h"
> #include "trace.h"
>
> --
> 2.47.1
>
>
[-- Attachment #2: Type: text/html, Size: 4334 bytes --]
next prev parent reply other threads:[~2025-02-18 16:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 16:26 [PATCH 0/8] xen: Build fixes and dust removal Philippe Mathieu-Daudé
2025-02-18 16:26 ` [PATCH 1/8] accel/Kconfig: Link XenPVH with GPEX PCIe bridge Philippe Mathieu-Daudé
2025-02-18 16:35 ` Edgar E. Iglesias
2025-02-18 16:26 ` [PATCH 2/8] hw/arm: Do not expose the virt machine on Xen-only binary Philippe Mathieu-Daudé
2025-02-18 16:52 ` Edgar E. Iglesias
2025-02-18 16:26 ` [PATCH 3/8] hw/arm/xen-pvh: Do not allow specifying any CPU type Philippe Mathieu-Daudé
2025-02-18 16:26 ` [PATCH 4/8] hw/xen/xen-pvh: Reduce included headers Philippe Mathieu-Daudé
2025-02-18 16:53 ` Edgar E. Iglesias [this message]
2025-02-18 16:26 ` [PATCH 5/8] hw/xen/xen-hvm: " Philippe Mathieu-Daudé
2025-02-28 15:46 ` Anthony PERARD
2025-02-18 16:26 ` [PATCH 6/8] hw/xen/xen-bus: " Philippe Mathieu-Daudé
2025-02-28 15:56 ` Anthony PERARD
2025-02-18 16:26 ` [PATCH 7/8] hw/xen/xen-legacy-backend: Remove unused 'net/net.h' header Philippe Mathieu-Daudé
2025-02-28 15:58 ` Anthony PERARD
2025-02-18 16:26 ` [PATCH 8/8] meson: Remove support for Xen on 32-bit ARM hosts Philippe Mathieu-Daudé
2025-02-28 16:27 ` Anthony PERARD
2025-03-03 11:11 ` [PATCH 0/8] xen: Build fixes and dust removal Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJy5ezqZcT5gSGhy1tmXK_j439j2YRbc68sThQEWPoJ0qT6Z2Q@mail.gmail.com \
--to=edgar.iglesias@gmail.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony@xenproject.org \
--cc=berrange@redhat.com \
--cc=dwmw2@infradead.org \
--cc=eduardo@habkost.net \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sstabellini@kernel.org \
--cc=thuth@redhat.com \
--cc=vikram.garhwal@bytedance.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).