From: Anthony PERARD <anthony.perard@citrix.com>
To: Vikram Garhwal <vikram.garhwal@amd.com>
Cc: qemu-devel@nongnu.org, sstabellini@kernel.org,
Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Subject: Re: [QEMU][PATCH v4 1/2] xen_arm: Create virtio-mmio devices during initialization
Date: Thu, 5 Oct 2023 11:40:57 +0100 [thread overview]
Message-ID: <9f3aad26-0233-4987-9fb0-cfcf8d424ef4@perard> (raw)
In-Reply-To: <20230830043518.21584-2-vikram.garhwal@amd.com>
Hi Vikram,
This patch prevent QEMU from been build with Xen 4.15. See comments.
Also, why didn't you CC all the maintainers of
include/hw/xen/xen_native.h?
On Tue, Aug 29, 2023 at 09:35:17PM -0700, Vikram Garhwal wrote:
> diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
> index 4dce905fde..a4b1aa9e5d 100644
> --- a/include/hw/xen/xen_native.h
> +++ b/include/hw/xen/xen_native.h
> @@ -523,4 +523,20 @@ static inline int xen_set_ioreq_server_state(domid_t dom,
> enable);
> }
>
> +#if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500
xendevicemodel_set_irq_level() was introduced in Xen 4.15, so this
should say '<' and not '<=', otherwise, we have:
include/hw/xen/xen_native.h:527:19: error: static declaration of ‘xendevicemodel_set_irq_level’ follows non-static declaration
> +static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod,
> + domid_t domid, uint32_t irq,
> + unsigned int level)
> +{
> + return 0;
Shouldn't this return something like -ENOSYS, instead of returning a
success?
> diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
> index 1d3e6d481a..7393b37355 100644
> --- a/hw/arm/xen_arm.c
> +++ b/hw/arm/xen_arm.c
> +
> +static void xen_set_irq(void *opaque, int irq, int level)
> +{
> + xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level);
So, you just ignore the return value here. Shouldn't there be some kind
of error check?
And is it OK to create a virtio-mmio device without an error, even when
we could find out that it never going to work (e.g. on Xen 4.14)?
Cheers,
--
Anthony PERARD
next prev parent reply other threads:[~2023-10-05 10:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 4:35 [QEMU][PATCH v4 0/2] Add Virtio support to Xenpvh machine for arm Vikram Garhwal
2023-08-30 4:35 ` [QEMU][PATCH v4 1/2] xen_arm: Create virtio-mmio devices during initialization Vikram Garhwal
2023-08-31 1:20 ` Stefano Stabellini
2023-10-05 10:40 ` Anthony PERARD [this message]
2023-10-11 19:22 ` Vikram Garhwal
2023-10-23 10:20 ` Anthony PERARD
2023-08-30 4:35 ` [QEMU][PATCH v4 2/2] xen_arm: Initialize RAM and add hi/low memory regions Vikram Garhwal
2023-08-31 1:21 ` Stefano Stabellini
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=9f3aad26-0233-4987-9fb0-cfcf8d424ef4@perard \
--to=anthony.perard@citrix.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=vikram.garhwal@amd.com \
/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).