Re: [PATCH] fix qemu build with xen-4.18.0

2023-12-12 Thread Volodymyr Babchuk
Hi Stefan, Stefan Hajnoczi writes: > On Tue, 12 Dec 2023 at 10:36, Volodymyr Babchuk > wrote: >> >> Hi Anthony >> >> Anthony PERARD writes: >> >> > On Fri, Dec 08, 2023 at 02:49:27PM -0800, Stefano Stabellini wrote: >> >> On Fri, 8 D

Re: [PATCH] fix qemu build with xen-4.18.0

2023-12-12 Thread Volodymyr Babchuk
Hi Anthony Anthony PERARD writes: > On Fri, Dec 08, 2023 at 02:49:27PM -0800, Stefano Stabellini wrote: >> On Fri, 8 Dec 2023, Daniel P. Berrangé wrote: >> > On Thu, Dec 07, 2023 at 11:12:48PM +, Michael Young wrote: >> > > Builds of qemu-8.2.0rc2 with xen-4.18.0 are currently failing >> > >

[PATCH v4 2/6] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-12-01 Thread Volodymyr Babchuk
weren't created by Xen toolstack. If they were created by toolstack, then it is toolstack's job to do proper clean-up. Suggested-by: Paul Durrant Suggested-by: David Woodhouse Co-Authored-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk Reviewed-by: David Woodhouse

[PATCH v4 6/6] xen_arm: Add virtual PCIe host bridge support

2023-12-01 Thread Volodymyr Babchuk
igned-off-by: Volodymyr Babchuk --- Changes in v3: - Use QOM properties instead of reading from XenStore - Remove unneeded includes - Move pcie_* fields into "struct cfg" Changes in v2: - Renamed virtio_pci_host to pcie_host entries in XenStore, because there is nothing specifi

[PATCH v4 5/6] xen_arm: set mc->max_cpus to GUEST_MAX_VCPUS

2023-12-01 Thread Volodymyr Babchuk
Signed-off-by: Volodymyr Babchuk Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/xen_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index a5631529d0..b9c3ae14b6 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -231,7 +231,7 @

[RFC PATCH v4 4/6] xen: add option to disable legacy backends

2023-12-01 Thread Volodymyr Babchuk
chive/html/qemu-devel/2023-11/msg05022.html Signed-off-by: Volodymyr Babchuk --- I am not sure if I made correct changes to build system, so this patch is tagged as RFC. Changes in v3: - New patch in v3 --- hw/9pfs/meson.build | 4 +++- hw/display/meson.build| 4 +++

[PATCH v4 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-12-01 Thread Volodymyr Babchuk
From: David Woodhouse This allows a XenDevice implementation to know whether it was created by QEMU, or merely discovered in XenStore after the toolstack created it. This will allow us to create frontend/backend nodes only when we should, rather than unconditionally attempting to overwrite them f

[PATCH v4 3/6] xen: decouple generic xen code from legacy backends codebase

2023-12-01 Thread Volodymyr Babchuk
all, what should be done in the future anyways. But right now this patch moves us one step close to have QEMU build without legacy Xen backends. Signed-off-by: Volodymyr Babchuk --- In v4: - New in v4, previous was part of "xen: add option to disable legacy backends" - Do not

[PATCH v4 0/6] xen-arm: add support for virtio-pci

2023-12-01 Thread Volodymyr Babchuk
yshchenko (2): xen_arm: set mc->max_cpus to GUEST_MAX_VCPUS xen_arm: Add virtual PCIe host bridge support Volodymyr Babchuk (3): xen: backends: don't overwrite XenStore nodes created by toolstack xen: decouple generic xen code from legacy backends codebase xen: add option to disable

Re: [EXTERNAL] [PATCH v3 2/5] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-11-27 Thread Volodymyr Babchuk
Hi David, Thank you for the review David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Fri, 2023-11-24 at 23:24 +, Volodymyr Babchuk wrote: >> Xen PV devices in QEMU can be created in two ways: either by QEMU >> itself, if they were passed via command line, o

Re: [RFC PATCH v3 3/5] xen: add option to disable legacy backends

2023-11-27 Thread Volodymyr Babchuk
Hi David, "Woodhouse, David" writes: > [[S/MIME Signed Part:Undecided]] > On Fri, 2023-11-24 at 23:24 +, 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 Q

[RFC PATCH v3 3/5] xen: add option to disable legacy backends

2023-11-24 Thread Volodymyr Babchuk
kends of course. [1] https://lists.gnu.org/archive/html/qemu-devel/2023-11/msg05022.html Signed-off-by: Volodymyr Babchuk --- I am not sure if I made correct changes to the build system, thus this patch is tagged as RFC. Changes in v3: - New patch in v3 --- accel/xen/xen-all.c | 13 ++

[PATCH v3 1/5] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-11-24 Thread Volodymyr Babchuk
From: David Woodhouse This allows a XenDevice implementation to know whether it was created by QEMU, or merely discovered in XenStore after the toolstack created it. This will allow us to create frontend/backend nodes only when we should, rather than unconditionally attempting to overwrite them f

[PATCH v3 2/5] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-11-24 Thread Volodymyr Babchuk
weren't created by Xen toolstack. If they were created by toolstack, then it is toolstack's job to do proper clean-up. Suggested-by: Paul Durrant Suggested-by: David Woodhouse Co-Authored-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk --- Changes in v3: - Rephrased

[PATCH v3 4/5] xen_arm: set mc->max_cpus to GUEST_MAX_VCPUS

2023-11-24 Thread Volodymyr Babchuk
Signed-off-by: Volodymyr Babchuk Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/xen_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index a5631529d0..b9c3ae14b6 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -231,7 +231,7 @

[PATCH v3 0/5] xen-arm: add support for virtio-pci

2023-11-24 Thread Volodymyr Babchuk
xen_arm: set mc->max_cpus to GUEST_MAX_VCPUS xen_arm: Add virtual PCIe host bridge support Volodymyr Babchuk (2): xen: backends: don't overwrite XenStore nodes created by toolstack xen: add option to disable legacy backends accel/xen/xen-all.c | 13 +- hw/9pfs/meson.bui

[PATCH v3 5/5] xen_arm: Add virtual PCIe host bridge support

2023-11-24 Thread Volodymyr Babchuk
igned-off-by: Volodymyr Babchuk --- Changes in v3: - Use QOM properties instead of reading from XenStore - Remove unneeded includes - Move pcie_* fields into "struct cfg" Changes in v2: - Renamed virtio_pci_host to pcie_host entries in XenStore, because there is nothing specifi

Re: [PATCH v2 6/6] xen_arm: Add virtual PCIe host bridge support

2023-11-24 Thread Volodymyr Babchuk
Hi Igor, Thank you for the review, Igor Mammedov writes: > On Tue, 21 Nov 2023 22:10:28 + > Volodymyr Babchuk wrote: > >> From: Oleksandr Tyshchenko >> >> The bridge is needed for virtio-pci support, as QEMU can emulate the >> whole bridge with any v

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > On 23 November 2023 12:17:57 GMT, Volodymyr Babchuk > wrote: >> >>Hi David, >> >>David Woodhouse writes: >>> Which PV backends do you care about? We already have net, block and console >>> converted. >

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > On 23 November 2023 11:54:01 GMT, Volodymyr Babchuk > wrote: >> >>Hi Paul, >> >>Paul Durrant writes: >> >>> On 23/11/2023 00:07, Volodymyr Babchuk wrote: >>>> Hi, >>>> Volodymyr Ba

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread Volodymyr Babchuk
Hi Paul, Paul Durrant writes: > On 23/11/2023 00:07, Volodymyr Babchuk wrote: >> Hi, >> Volodymyr Babchuk writes: >> >>> Hi Stefano, >>> >>> Stefano Stabellini writes: >>> >>>> On Wed, 22 Nov 2023, David Woodhouse wro

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Thu, 2023-11-23 at 09:28 +, Paul Durrant wrote: >> On 23/11/2023 00:07, Volodymyr Babchuk wrote: >> > >> > Hi, >> > >> > Volodymyr Babchuk writes: >> &

Re: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner

2023-11-22 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Tue, 2023-11-21 at 22:10 +, Volodymyr Babchuk wrote: >> >> --- a/hw/xen/xen-operations.c >> +++ b/hw/xen/xen-operations.c >> @@ -300,6 +300,18 @@ static bool libxenstore_creat

Re: [PATCH v2 6/6] xen_arm: Add virtual PCIe host bridge support

2023-11-22 Thread Volodymyr Babchuk
Hi Vikram, Vikram Garhwal writes: > Hi Volodymyr, > Thank you sharing this patch. I have few comments below > On Wed, Nov 22, 2023 at 02:39:46PM -0800, Stefano Stabellini wrote: >> +Vikram >> >> On Tue, 21 Nov 2023, Volodymyr Babchuk wrote: >> > From:

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-22 Thread Volodymyr Babchuk
Hi, Volodymyr Babchuk writes: > Hi Stefano, > > Stefano Stabellini writes: > >> On Wed, 22 Nov 2023, David Woodhouse wrote: >>> On Wed, 2023-11-22 at 15:09 -0800, Stefano Stabellini wrote: >>> > On Wed, 22 Nov 2023, David Woodhouse wrote: >>>

Re: [PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-11-22 Thread Volodymyr Babchuk
Hi David, "Woodhouse, David" writes: > On Wed, 2023-11-22 at 17:05 +, Paul Durrant wrote: >> On 21/11/2023 22:10, Volodymyr Babchuk wrote: >> > From: David Woodhouse >> > >> > This allows a XenDevice implementation to know whether it was

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-22 Thread Volodymyr Babchuk
wrote: >> > > > On Wed, 22 Nov 2023, Paul Durrant wrote: >> > > > > On 21/11/2023 22:10, Volodymyr Babchuk wrote: >> > > > > > From: Oleksandr Tyshchenko >> > > > > > >> > > > > > Instead of forcing t

Re: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner

2023-11-22 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Tue, 2023-11-21 at 22:10 +, Volodymyr Babchuk wrote: >> >> --- a/hw/xen/xen-operations.c >> +++ b/hw/xen/xen-operations.c >> @@ -300,6 +300,18 @@ static bool libxenstore_creat

Re: [PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-11-22 Thread Volodymyr Babchuk
Paul Durrant writes: > On 21/11/2023 22:10, Volodymyr Babchuk wrote: >> From: David Woodhouse >> This allows a XenDevice implementation to know whether it was >> created >> by QEMU, or merely discovered in XenStore after the toolstack created >> it. This

Re: [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device...

2023-11-22 Thread Volodymyr Babchuk
Hi Paul, Paul Durrant writes: > On 21/11/2023 22:10, Volodymyr Babchuk wrote: >> was created by QEMU >> Xen PV devices in QEMU can be created in two ways: either by QEMU >> itself, if they were passed via command line, or by Xen toolstack. In >> the latter case,

Re: [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device...

2023-11-22 Thread Volodymyr Babchuk
Hi Philippe, Philippe Mathieu-Daudé writes: > Hi Volodymyr, > > On 21/11/23 23:10, Volodymyr Babchuk wrote: >> was created by QEMU > > Please do not split lines between subject and content. Rewrite the > full line. Preferably restrict the subject to 72 chars. I tr

[PATCH v2 6/6] xen_arm: Add virtual PCIe host bridge support

2023-11-21 Thread Volodymyr Babchuk
which run in different domains and serve virtio-pci devices for the same guest should use different host bridge resources for Xen to distinguish. The rule for the guest device-tree generation is one PCI host bridge per backend domain. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volo

[PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-11-21 Thread Volodymyr Babchuk
From: David Woodhouse This allows a XenDevice implementation to know whether it was created by QEMU, or merely discovered in XenStore after the toolstack created it. This will allow us to create frontend/backend nodes only when we should, rather than unconditionally attempting to overwrite them f

[PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-21 Thread Volodymyr Babchuk
e required directories in advance. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk --- 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 ++

[PATCH v2 5/6] xen_arm: Set mc->max_cpus to GUEST_MAX_VCPUS in xen_arm_init()

2023-11-21 Thread Volodymyr Babchuk
if the involved domain has more than one vCPU assigned. Set the number of current supported guest vCPUs here (128) which is defined in public header arch-arm.h. And the toolstack should then pass max_vcpus using "-smp" arg. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volo

[PATCH v2 0/6] xen-arm: add support for virtio-pci

2023-11-21 Thread Volodymyr Babchuk
he XenDevice before realizing it Oleksandr Tyshchenko (3): xen_pvdev: Do not assume Dom0 when creating a directory xen_arm: Set mc->max_cpus to GUEST_MAX_VCPUS in xen_arm_init() xen_arm: Add virtual PCIe host bridge support Volodymyr Babchuk (2): xen: backends: touch some XenStor

[PATCH v2 3/6] xen: xenstore: add possibility to preserve owner

2023-11-21 Thread Volodymyr Babchuk
will make specific implementation to get original owner of an entry and pass it back to set_permissions() call. Please note, that XenStore inherits permissions, so even if entry is newly created by, it already has the owner set to match owner of entry at previous level. Signed-off-by: Volodym

[PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device...

2023-11-21 Thread Volodymyr Babchuk
XenStore entries during device teardown only if they weren't created by Xen toolstack. If they were created by toolstack, then it is toolstack's job to do proper clean-up. Suggested-by: Paul Durrant Suggested-by: David Woodhouse Co-Authored-by: Oleksandr Tyshchenko Signed-off-by:

Re: [PATCH v1 4/7] xen_pvdev: Do not assume Dom0 when creating a directrory

2023-11-14 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Fri, 2023-11-10 at 20:42 +, Volodymyr Babchuk wrote: >> From: Oleksandr Tyshchenko >> >> Instead of forcing the owner to domid 0, use XS_PRESERVE_OWNER to save >> the previous owner of

Re: [PATCH v1 1/7] xen-block: Do not write frontend nodes

2023-11-14 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > On 11 November 2023 16:51:22 GMT-05:00, Andrew Cooper > wrote: >>On 11/11/2023 8:18 pm, David Woodhouse wrote: >>> On 11 November 2023 08:43:40 GMT-05:00, Andrew Cooper >>> wrote: Furthermore, the control domain doesn't always have the domid of 0. >

Re: [PATCH v1 3/7] xen: xenstore: add possibility to preserve owner

2023-11-13 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Sat, 2023-11-11 at 11:01 +, David Woodhouse wrote: >> >> > --- a/hw/xen/xen-operations.c >> > +++ b/hw/xen/xen-operations.c >> > @@ -300,6 +300,18 @@ static bool libxenstore_create(struct qemu_xs_handle >> > *h, xs_

Re: [PATCH v1 3/7] xen: xenstore: add possibility to preserve owner

2023-11-13 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Fri, 2023-11-10 at 20:42 +, Volodymyr Babchuk wrote: >> Add option to preserve owner when creating an entry in Xen Store. This >> may be needed in cases when Qemu is working as device model in a

Re: [PATCH v1 7/7] xen_arm: Add basic virtio-pci support

2023-11-13 Thread Volodymyr Babchuk
Hi David, David Woodhouse writes: > [[S/MIME Signed Part:Undecided]] > On Fri, 2023-11-10 at 20:42 +, Volodymyr Babchuk wrote: >> From: Oleksandr Tyshchenko >> >> This patch adds basic virtio-pci support for xen_arm machine. > > Why only xen_arm? Couldn

[PATCH v1 0/7] xen-arm: add support for virtio-pci

2023-11-10 Thread Volodymyr Babchuk
US in xen_arm_init() xen_arm: Add basic virtio-pci support Volodymyr Babchuk (1): xen: xenstore: add possibility to preserve owner hw/arm/xen_arm.c | 188 ++- hw/block/xen-block.c | 11 +- hw/i386/kvm/xen_xenstore.c | 18 +++

[PATCH v1 1/7] xen-block: Do not write frontend nodes

2023-11-10 Thread Volodymyr Babchuk
, this is not really needed, probably it is just a leftover and all xen_device_frontend_printf() instances should go away completely. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk --- hw/block/xen-block.c | 11 +++ hw/xen/xen-bus.c | 2 +- 2 files changed, 8

[PATCH v1 2/7] xen-bus: Do not destroy frontend/backend directories

2023-11-10 Thread Volodymyr Babchuk
here, this is not really needed, probably it is just a leftover and all xs_node_destroy() instances should go away completely. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk --- hw/xen/xen-bus.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a

[PATCH v1 3/7] xen: xenstore: add possibility to preserve owner

2023-11-10 Thread Volodymyr Babchuk
will make specific implementation to get original owner of an entry and pass it back to set_permissions() call. Signed-off-by: Volodymyr Babchuk --- hw/i386/kvm/xen_xenstore.c | 18 ++ hw/xen/xen-operations.c | 12 include/hw/xen/xen_backend_ops.h | 2 +

[PATCH v1 4/7] xen_pvdev: Do not assume Dom0 when creating a directrory

2023-11-10 Thread Volodymyr Babchuk
to create required directories in advance. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk --- 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_pvd

[PATCH v1 6/7] xen_arm: Set mc->max_cpus to GUEST_MAX_VCPUS in xen_arm_init()

2023-11-10 Thread Volodymyr Babchuk
if the involved domain has more than one vCPU assigned. Set the number of current supported guest vCPUs here (128) which is defined in public header arch-arm.h. And the toolstack should then pass max_vcpus using "-smp" arg. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volo

[PATCH v1 5/7] xen-bus: Set offline if backend's state is XenbusStateClosed

2023-11-10 Thread Volodymyr Babchuk
e. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk --- hw/xen/xen-bus.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c index 75474d4b43..6e7ec3af64 100644 --- a/hw/xen/xen-bus.c +++ b/hw/xen/xen-bus.c @@ -519,6 +519,10 @@ s

[PATCH v1 7/7] xen_arm: Add basic virtio-pci support

2023-11-10 Thread Volodymyr Babchuk
same guest should use different host bridge resources for Xen to distinguish. The rule for the guest device-tree generation is one PCI host bridge per backend domain. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk --- hw/arm/xen_arm.c