[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directo
|
From: |
Stefano Stabellini |
|
Subject: |
Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory |
|
Date: |
Wed, 22 Nov 2023 14:29:13 -0800 (PST) |
|
User-agent: |
Alpine 2.22 (DEB 394 2020-01-19) |
On Wed, 22 Nov 2023, Paul Durrant wrote:
> On 21/11/2023 22:10, Volodymyr Babchuk wrote:
> > From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> >
> > Instead of forcing the owner to domid 0, use XS_PRESERVE_OWNER to
> > inherit the owner of the directory.
>
> Ah... so that's why the previous patch is there.
>
> This is not the right way to fix it. The QEMU Xen support is *assuming* that
> QEMU is either running in, or emulating, dom0. In the emulation case this is
> probably fine, but the 'real Xen' case it should be using the correct domid
> for node creation. I guess this could either be supplied on the command line
> or discerned by reading the local domain 'domid' node.
yes, it should be passed as command line option to QEMU
> > Note that for other than Dom0 domain (non toolstack domain) the
> > "driver_domain" property should be set in domain config file for the
> > toolstack to create required directories in advance.
> >
> > Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> > Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
> > ---
> > hw/xen/xen_pvdev.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c
> > index c5ad71e8dc..42bdd4f6c8 100644
> > --- a/hw/xen/xen_pvdev.c
> > +++ b/hw/xen/xen_pvdev.c
> > @@ -60,7 +60,8 @@ void xen_config_cleanup(void)
> > int xenstore_mkdir(char *path, int p)
> > {
> > - if (!qemu_xen_xs_create(xenstore, 0, 0, xen_domid, p, path)) {
> > + if (!qemu_xen_xs_create(xenstore, 0, XS_PRESERVE_OWNER,
> > + xen_domid, p, path)) {
> > xen_pv_printf(NULL, 0, "xs_mkdir %s: failed\n", path);
> > return -1;
> > }
>
[PATCH v2 5/6] xen_arm: Set mc->max_cpus to GUEST_MAX_VCPUS in xen_arm_init(), Volodymyr Babchuk, 2023/11/21
[PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Volodymyr Babchuk, 2023/11/21
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Paul Durrant, 2023/11/22
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory,
Stefano Stabellini <=
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, David Woodhouse, 2023/11/22
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Stefano Stabellini, 2023/11/22
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, David Woodhouse, 2023/11/22
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Stefano Stabellini, 2023/11/22
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Volodymyr Babchuk, 2023/11/22
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Volodymyr Babchuk, 2023/11/22
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Paul Durrant, 2023/11/23
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, David Woodhouse, 2023/11/23
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, Volodymyr Babchuk, 2023/11/23
- Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory, David Woodhouse, 2023/11/23