From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
qemu-devel@nongnu.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Anthony Perard <anthony.perard@citrix.com>,
Paul Durrant <paul@xen.org>,
"open list:X86 Xen CPUs" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 1/2] hw/xen: detect when running inside stubdomain
Date: Mon, 26 Feb 2024 09:23:17 +0100 [thread overview]
Message-ID: <601bae2e-4e42-4e88-aa97-e94bb4696ab8@linaro.org> (raw)
In-Reply-To: <20240219181627.282097-1-marmarek@invisiblethingslab.com>
On 19/2/24 19:16, Marek Marczykowski-Górecki wrote:
> Introduce global xen_is_stubdomain variable when qemu is running inside
> a stubdomain instead of dom0. This will be relevant for subsequent
> patches, as few things like accessing PCI config space need to be done
> differently.
>
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> ---
> hw/xen/xen-legacy-backend.c | 15 +++++++++++++++
> include/hw/xen/xen.h | 1 +
> system/globals.c | 1 +
> 3 files changed, 17 insertions(+)
> +static bool xen_check_stubdomain(void)
> +{
> + char *dm_path = g_strdup_printf("/local/domain/%d/image", xen_domid);
> + uint32_t dm_domid;
> + bool is_stubdom = false;
> +
> + if (!xenstore_read_int(dm_path, "device-model-domid", &dm_domid))
BTW missing braces for QEMU coding style: {
> + is_stubdom = dm_domid != 0;
}
> +
> + g_free(dm_path);
> + return is_stubdom;
> +}
prev parent reply other threads:[~2024-02-26 8:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 18:16 [PATCH 1/2] hw/xen: detect when running inside stubdomain Marek Marczykowski-Górecki
2024-02-19 18:16 ` [PATCH 2/2] xen: fix stubdom PCI addr Marek Marczykowski-Górecki
2024-02-19 22:23 ` Marek Marczykowski-Górecki
2024-02-24 22:38 ` Jason Andryuk
2024-02-20 6:50 ` [PATCH 1/2] hw/xen: detect when running inside stubdomain Philippe Mathieu-Daudé
2024-02-25 22:09 ` Jason Andryuk
2024-02-25 22:05 ` Jason Andryuk
2024-02-26 8:23 ` Philippe Mathieu-Daudé [this message]
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=601bae2e-4e42-4e88-aa97-e94bb4696ab8@linaro.org \
--to=philmd@linaro.org \
--cc=anthony.perard@citrix.com \
--cc=marmarek@invisiblethingslab.com \
--cc=paul@xen.org \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--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 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.