From: "Woodhouse, David" via <qemu-devel@nongnu.org>
To: "Volodymyr_Babchuk@epam.com" <Volodymyr_Babchuk@epam.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "eduardo@habkost.net" <eduardo@habkost.net>,
"sstabellini@kernel.org" <sstabellini@kernel.org>,
"marcel.apfelbaum@gmail.com" <marcel.apfelbaum@gmail.com>,
"groug@kaod.org" <groug@kaod.org>,
"qemu_oss@crudebyte.com" <qemu_oss@crudebyte.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"richard.henderson@linaro.org" <richard.henderson@linaro.org>,
"julien@xen.org" <julien@xen.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"paul@xen.org" <paul@xen.org>,
"anthony.perard@citrix.com" <anthony.perard@citrix.com>,
"kraxel@redhat.com" <kraxel@redhat.com>,
"marcandre.lureau@redhat.com" <marcandre.lureau@redhat.com>,
"berrange@redhat.com" <berrange@redhat.com>,
"philmd@linaro.org" <philmd@linaro.org>,
"thuth@redhat.com" <thuth@redhat.com>,
"mst@redhat.com" <mst@redhat.com>
Subject: Re: [RFC PATCH v3 3/5] xen: add option to disable legacy backends
Date: Mon, 27 Nov 2023 08:46:21 +0000 [thread overview]
Message-ID: <a876dd8d01570f76da06f009eb8ed96bc3e0fea6.camel@amazon.co.uk> (raw)
In-Reply-To: <20231124232400.943580-4-volodymyr_babchuk@epam.com>
[-- Attachment #1.1: Type: text/plain, Size: 2471 bytes --]
On Fri, 2023-11-24 at 23:24 +0000, Volodymyr Babchuk wrote:
> This patch makes legacy backends optional. As was discussed at [1]
> this is a solution to a problem when we can't run QEMU as a device
> model in a non-privileged domain. This is because legacy backends
> assume that they are always running in domain with ID = 0. Actually,
> this may prevent running QEMU in a privileged domain with ID not equal
> to zero.
>
> To be able to disable legacy backends we need to alter couple of
> source files that unintentionally depend on them. For example
> xen-all.c used xen_pv_printf to report errors, while not providing any
> additional like xendev pointer. Also, we need to move xenstore
> structure from xen-legacy-backend.c, because it is apparently used in
> xen-all.c.
>
> With this patch it is possible to provide
> "--disable-xen-legacy-backends" configure option to get QEMU binary
> that can run in a driver domain. With price of not be able to use
> legacy backends of course.
>
> [1]
> https://lists.gnu.org/archive/html/qemu-devel/2023-11/msg05022.html
>
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
>
> ---
>
> I am not sure if I made correct changes to the build system, thus this
> patch is tagged as RFC.
Hm, I was imagining a new CONFIG_LEGACY_XEN_BACKENDS option which would
look a lot like CONFIG_XEN_BUS (which would now be only for the new
XenBus code).
This looks weird to me:
> --- a/hw/display/meson.build
> +++ b/hw/display/meson.build
> @@ -14,7 +14,9 @@ system_ss.add(when: 'CONFIG_PL110', if_true:
> files('pl110.c'))
> system_ss.add(when: 'CONFIG_SII9022', if_true: files('sii9022.c'))
> system_ss.add(when: 'CONFIG_SSD0303', if_true: files('ssd0303.c'))
> system_ss.add(when: 'CONFIG_SSD0323', if_true: files('ssd0323.c'))
> -system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xenfb.c'))
> +if have_xen_legacy_backends
> + system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xenfb.c'))
> +endif
>
> system_ss.add(when: 'CONFIG_VGA_PCI', if_true: files('vga-pci.c'))
> system_ss.add(when: 'CONFIG_VGA_ISA', if_true: files('vga-isa.c'))
I'd prefer to see just:
-system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xenfb.c'))
+system_ss.add(when: 'CONFIG_XEN_LEGACY_BACKENDS', if_true: files('xenfb.c'))
Probably also better to split out the bits in accel/xen/xen-all.c and
hw/xen/xen-legacy-backend.c to a separate preparatory commit.
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5957 bytes --]
[-- Attachment #2.1: Type: text/plain, Size: 215 bytes --]
Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.
[-- Attachment #2.2: Type: text/html, Size: 228 bytes --]
next prev parent reply other threads:[~2023-11-27 8:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 23:24 [PATCH v3 0/5] xen-arm: add support for virtio-pci Volodymyr Babchuk
2023-11-24 23:24 ` [RFC PATCH v3 3/5] xen: add option to disable legacy backends Volodymyr Babchuk
2023-11-27 8:46 ` Woodhouse, David via [this message]
2023-11-27 9:15 ` Volodymyr Babchuk
2023-11-24 23:24 ` [PATCH v3 1/5] hw/xen: Set XenBackendInstance in the XenDevice before realizing it Volodymyr Babchuk
2023-11-24 23:24 ` [PATCH v3 2/5] xen: backends: don't overwrite XenStore nodes created by toolstack Volodymyr Babchuk
2023-11-27 8:35 ` [EXTERNAL] " David Woodhouse
2023-11-28 1:20 ` Volodymyr Babchuk
2023-11-28 14:11 ` David Woodhouse
2023-11-24 23:24 ` [PATCH v3 4/5] xen_arm: set mc->max_cpus to GUEST_MAX_VCPUS Volodymyr Babchuk
2023-11-24 23:24 ` [PATCH v3 5/5] xen_arm: Add virtual PCIe host bridge support Volodymyr Babchuk
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=a876dd8d01570f76da06f009eb8ed96bc3e0fea6.camel@amazon.co.uk \
--to=qemu-devel@nongnu.org \
--cc=Volodymyr_Babchuk@epam.com \
--cc=anthony.perard@citrix.com \
--cc=berrange@redhat.com \
--cc=dwmw@amazon.co.uk \
--cc=eduardo@habkost.net \
--cc=groug@kaod.org \
--cc=julien@xen.org \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu_oss@crudebyte.com \
--cc=richard.henderson@linaro.org \
--cc=sstabellini@kernel.org \
--cc=thuth@redhat.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).