[linux-linus test] 179499: regressions - trouble: fail/pass/starved

2023-03-07 Thread osstest service owner
flight 179499 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/179499/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-freebsd12-amd64 13 guest-start fail REGR. vs. 178042

Re: [PATCH 5/7] sgi-xp: simplify sysctl registration

2023-03-07 Thread Steve Wahl
On Thu, Mar 02, 2023 at 12:46:10PM -0800, Luis Chamberlain wrote: > Although this driver is a good use case for having a directory > that is not other directories and then subdirectories with more > entries, the usage of register_sysctl_table() can recurse and > increases complexity so to avoid

[xen-unstable-smoke test] 179504: tolerable trouble: pass/starved - PUSHED

2023-03-07 Thread osstest service owner
flight 179504 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/179504/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH v3 2/2] automation: introduce a dom0less test run on Xilinx hardware

2023-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2023, Michal Orzel wrote: > Hi Stefano, > > On 07/03/2023 00:33, Stefano Stabellini wrote: > > > > > > From: Stefano Stabellini > > > > The test prepares dom0 and domU binaries and boot artifacts, similarly > > to the existing QEMU test. (TBD: share preparation steps with the >

[xen-unstable-smoke test] 179502: tolerable trouble: pass/starved - PUSHED

2023-03-07 Thread osstest service owner
flight 179502 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/179502/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PULL 00/27] Enable PV backends with Xen/KVM emulation

2023-03-07 Thread Philippe Mathieu-Daudé
On 7/3/23 23:34, David Woodhouse wrote: On Tue, 2023-03-07 at 21:20 +0100, Philippe Mathieu-Daudé wrote: This tag only appears in the cover letter, and is missing in each patch. It would have been acceptable if it were in the PR tag, but the tag (which for some reason isn't displayed in your

[qemu-mainline test] 179497: tolerable trouble: fail/pass/starved - PUSHED

2023-03-07 Thread osstest service owner
flight 179497 qemu-mainline real [real] flight 179500 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/179497/ http://logs.test-lab.xenproject.org/osstest/logs/179500/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH] build: add crypto/ to SUBDIRS

2023-03-07 Thread Stefano Stabellini
On Tue, 28 Feb 2023, Jan Beulich wrote: > On 28.02.2023 09:14, Michal Orzel wrote: > > On 27/02/2023 16:57, Jan Beulich wrote: > >> On 27.02.2023 16:46, Michal Orzel wrote: > >>> On 27/02/2023 16:00, Jan Beulich wrote: > On 27.02.2023 15:46, Michal Orzel wrote: > > On 27/02/2023 14:54,

Re: [PULL 00/27] Enable PV backends with Xen/KVM emulation

2023-03-07 Thread David Woodhouse
On Tue, 2023-03-07 at 21:20 +0100, Philippe Mathieu-Daudé wrote: > > This tag only appears in the cover letter, and is missing in each patch. > It would have been acceptable if it were in the PR tag, but > the tag (which for some reason isn't displayed in your cover letter) > is simply "PV back

Re: [PATCH v4 05/12] x86/xen: set MTRR state when running as Xen PV initial domain

2023-03-07 Thread Boris Ostrovsky
On 3/6/23 11:34 AM, Juergen Gross wrote: When running as Xen PV initial domain (aka dom0), MTRRs are disabled by the hypervisor, but the system should nevertheless use correct cache memory types. This has always kind of worked, as disabled MTRRs resulted in disabled PAT, too, so that the

RE: [PATCH v4 00/12] x86/mtrr: fix handling with PAT but without MTRR

2023-03-07 Thread Michael Kelley (LINUX)
From: Juergen Gross Sent: Monday, March 6, 2023 8:34 AM > > This series tries to fix the rather special case of PAT being available > without having MTRRs (either due to CONFIG_MTRR being not set, or > because the feature has been disabled e.g. by a hypervisor). > > The main use cases are Xen

Re: [PATCH v1 2/2] arch/arm: time: Add support for parsing interrupts by names

2023-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2023, Bertrand Marquis wrote: > > On 7 Mar 2023, at 11:09, Andrei Cherechesu (OSS) > > wrote: > > > > From: Andrei Cherechesu > > > > Added support for parsing the ARM generic timer interrupts DT > > node by the "interrupt-names" property, if it is available. > > > > If not

Re: [PATCH v2 2/2] automation: introduce a dom0less test run on Xilinx hardware

2023-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2023, Marek Marczykowski-Górecki wrote: > On Mon, Mar 06, 2023 at 03:02:51PM -0800, Stefano Stabellini wrote: > > On Mon, 6 Mar 2023, Andrew Cooper wrote: > > > On 03/03/2023 11:57 pm, Stefano Stabellini wrote: > > > > + only: > > > > +variables: > > > > + - $XILINX_JOBS ==

Re: [PULL 00/27] Enable PV backends with Xen/KVM emulation

2023-03-07 Thread Philippe Mathieu-Daudé
Hi David, On 7/3/23 19:26, David Woodhouse wrote: The following changes since commit 9832009d9dd2386664c15cc70f6e6bfe062be8bd: Merge tag 'pull-riscv-to-apply-20230306' of https://gitlab.com/palmer-dabbelt/qemu into staging (2023-03-07 12:53:00 +) are available in the Git repository

Re: [PATCH v1 2/2] arch/arm: time: Add support for parsing interrupts by names

2023-03-07 Thread Andrei Cherechesu
On 07/03/2023 17:38, Bertrand Marquis wrote: > Hi Andrei, > >> On 7 Mar 2023, at 11:09, Andrei Cherechesu (OSS) >> wrote: >> >> From: Andrei Cherechesu >> >> Added support for parsing the ARM generic timer interrupts DT >> node by the "interrupt-names" property, if it is available. >> >> If

[PULL 09/27] hw/xen: Add evtchn operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse The existing implementation calling into the real libxenevtchn moves to a new file hw/xen/xen-operations.c, and is called via a function table which in a subsequent commit will also be able to invoke the emulated event channel support. Signed-off-by: David Woodhouse

Re: [PATCH v2 00/27] Enable PV backends with Xen/KVM emulation

2023-03-07 Thread David Woodhouse
On Tue, 2023-03-07 at 17:57 +, Paul Durrant wrote: > I think the series is good to go now so time to send a PR. Done, thank you! smime.p7s Description: S/MIME cryptographic signature

[PULL 01/27] hw/xen: Add xenstore wire implementation and implementation stubs

2023-03-07 Thread David Woodhouse
From: David Woodhouse This implements the basic wire protocol for the XenStore commands, punting all the actual implementation to xs_impl_* functions which all just return errors for now. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/meson.build | 1 +

[PULL 08/27] hw/xen: Create initial XenStore nodes

2023-03-07 Thread David Woodhouse
From: Paul Durrant Signed-off-by: Paul Durrant Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c | 70 ++ 1 file changed, 70 insertions(+) diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c index

[PULL 12/27] hw/xen: Add foreignmem operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/char/xen_console.c| 8 +++--- hw/display/xenfb.c | 20 +++--- hw/xen/xen-operations.c | 45 include/hw/xen/xen_backend_ops.h | 26

[PULL 02/27] hw/xen: Add basic XenStore tree walk and write/read/directory support

2023-03-07 Thread David Woodhouse
From: David Woodhouse This is a fairly simple implementation of a copy-on-write tree. The node walk function starts off at the root, with 'inplace == true'. If it ever encounters a node with a refcount greater than one (including the root node), then that node is shared with other trees, and

[PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: Paul Durrant Signed-off-by: Paul Durrant Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- accel/xen/xen-all.c | 11 +- hw/char/xen_console.c | 2 +- hw/i386/kvm/xen_xenstore.c | 3 - hw/i386/kvm/xenstore_impl.h | 8 +-

[PULL 18/27] hw/xen: Avoid crash when backend watch fires too early

2023-03-07 Thread David Woodhouse
From: Paul Durrant The xen-block code ends up calling aio_poll() through blkconf_geometry(), which means we see watch events during the indirect call to xendev_class->realize() in xen_device_realize(). Unfortunately this call is made before populating the initial frontend and backend device

[PULL 06/27] hw/xen: Implement XenStore permissions

2023-03-07 Thread David Woodhouse
From: Paul Durrant Store perms as a GList of strings, check permissions. Signed-off-by: Paul Durrant Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c | 2 +- hw/i386/kvm/xenstore_impl.c | 259 +---

[PULL 15/27] hw/xen: Use XEN_PAGE_SIZE in PV backend drivers

2023-03-07 Thread David Woodhouse
From: David Woodhouse XC_PAGE_SIZE comes from the actual Xen libraries, while XEN_PAGE_SIZE is provided by QEMU itself in xen_backend_ops.h. For backends which may be built for emulation mode, use the latter. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant ---

[PULL 27/27] docs: Update Xen-on-KVM documentation for PV disk support

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- docs/system/i386/xen.rst | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/docs/system/i386/xen.rst b/docs/system/i386/xen.rst index a00523b492..f06765e88c

[PULL 20/27] hw/xen: Hook up emulated implementation for event channel operations

2023-03-07 Thread David Woodhouse
From: David Woodhouse We provided the backend-facing evtchn functions very early on as part of the core Xen platform support, since things like timers and xenstore need to use them. By what may or may not be an astonishing coincidence, those functions just *happen* all to have exactly the right

[PULL 26/27] MAINTAINERS: Add entry for Xen on KVM emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5340de0515..640deb2895 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -443,6 +443,15 @@ F:

[PULL 10/27] hw/xen: Add gnttab operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Move the existing code using libxengnttab to xen-operations.c and allow the operations to be redirected so that we can add emulation of grant table mapping for backend drivers. In emulation, mapping more than one grant ref to be virtually contiguous would be fairly

[PULL 25/27] i386/xen: Initialize Xen backends from pc_basic_device_init() for emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Now that all the work is done to enable the PV backends to work without actual Xen, instantiate the bus from pc_basic_device_init() for emulated mode. This allows us finally to launch an emulated Xen guest with PV disk. qemu-system-x86_64 -serial mon:stdio -M q35 -cpu

[PULL 04/27] hw/xen: Implement XenStore transactions

2023-03-07 Thread David Woodhouse
From: David Woodhouse Given that the whole thing supported copy on write from the beginning, transactions end up being fairly simple. On starting a transaction, just take a ref of the existing root; swap it back in on a successful commit. The main tree has a transaction ID too, and we keep a

[PULL 11/27] hw/xen: Pass grant ref to gnttab unmap operation

2023-03-07 Thread David Woodhouse
From: David Woodhouse The previous commit introduced redirectable gnttab operations fairly much like-for-like, with the exception of the extra arguments to the ->open() call which were always NULL/0 anyway. This *changes* the arguments to the ->unmap() operation to include the original ref#

[PULL 14/27] hw/xen: Move xenstore_store_pv_console_info to xen_console.c

2023-03-07 Thread David Woodhouse
From: David Woodhouse There's no need for this to be in the Xen accel code, and as we want to use the Xen console support with KVM-emulated Xen we'll want to have a platform-agnostic version of it. Make it use GString to build up the path while we're at it. Signed-off-by: David Woodhouse

[PULL 16/27] hw/xen: Rename xen_common.h to xen_native.h

2023-03-07 Thread David Woodhouse
From: David Woodhouse This header is now only for native Xen code, not PV backends that may be used in Xen emulation. Since the toolstack libraries may depend on the specific version of Xen headers that they pull in (and will set the __XEN_TOOLS__ macro to enable internal definitions that they

[PULL 21/27] hw/xen: Add emulated implementation of grant table operations

2023-03-07 Thread David Woodhouse
From: David Woodhouse This is limited to mapping a single grant at a time, because under Xen the pages are mapped *contiguously* into qemu's address space, and that's very hard to do when those pages actually come from anonymous mappings in qemu in the first place. Eventually perhaps we can

[PULL 24/27] hw/xen: Implement soft reset for emulated gnttab

2023-03-07 Thread David Woodhouse
From: David Woodhouse This is only part of it; we will also need to get the PV back end drivers to tear down their own mappings (or do it for them, but they kind of need to stop using the pointers too). Some more work on the actual PV back ends and xen-bus code is going to be needed to really

[PULL 23/27] hw/xen: Map guest XENSTORE_PFN grant in emulated Xenstore

2023-03-07 Thread David Woodhouse
From: David Woodhouse We don't actually access the guest's page through the grant, because this isn't real Xen, and we can just use the page we gave it in the first place. Map the grant anyway, mostly for cosmetic purposes so it *looks* like it's in use in the guest-visible grant table.

[PULL 07/27] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread David Woodhouse
From: David Woodhouse This implements the basic migration support in the back end, with unit tests that give additional confidence in the node-counting already in the tree. However, the existing PV back ends like xen-disk don't support migration yet. They will reset the ring and fail to

[PULL 19/27] hw/xen: Only advertise ring-page-order for xen-block if gnttab supports it

2023-03-07 Thread David Woodhouse
From: David Woodhouse Whem emulating Xen, multi-page grants are distinctly non-trivial and we have elected not to support them for the time being. Don't advertise them to the guest. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/block/xen-block.c | 11 --- 1 file

[PULL 00/27] Enable PV backends with Xen/KVM emulation

2023-03-07 Thread David Woodhouse
The following changes since commit 9832009d9dd2386664c15cc70f6e6bfe062be8bd: Merge tag 'pull-riscv-to-apply-20230306' of https://gitlab.com/palmer-dabbelt/qemu into staging (2023-03-07 12:53:00 +) are available in the Git repository at: git://git.infradead.org/users/dwmw2/qemu.git

[PULL 05/27] hw/xen: Watches on XenStore transactions

2023-03-07 Thread David Woodhouse
From: David Woodhouse Firing watches on the nodes that still exist is relatively easy; just walk the tree and look at the nodes with refcount of one. Firing watches on *deleted* nodes is more fun. We add 'modified_in_tx' and 'deleted_in_tx' flags to each node. Nodes with those flags cannot be

[PULL 17/27] hw/xen: Build PV backend drivers for CONFIG_XEN_BUS

2023-03-07 Thread David Woodhouse
From: David Woodhouse Now that we have the redirectable Xen backend operations we can build the PV backends even without the Xen libraries. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/9pfs/meson.build| 2 +- hw/block/dataplane/meson.build | 2 +-

[PULL 03/27] hw/xen: Implement XenStore watches

2023-03-07 Thread David Woodhouse
From: David Woodhouse Starts out fairly simple: a hash table of watches based on the path. Except there can be multiple watches on the same path, so the watch ends up being a simple linked list, and the head of that list is in the hash table. Which makes removal a bit of a PITA but it's not so

[PULL 22/27] hw/xen: Add emulated implementation of XenStore operations

2023-03-07 Thread David Woodhouse
From: David Woodhouse Now that we have an internal implementation of XenStore, we can populate the xenstore_backend_ops to allow PV backends to talk to it. Watches can't be processed with immediate callbacks because that would call back into XenBus code recursively. Defer them to a QEMUBH to be

[libvirt test] 179462: tolerable trouble: pass/starved - PUSHED

2023-03-07 Thread osstest service owner
flight 179462 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/179462/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt-xsm 15 migrate-support-checkfail never pass test-amd64-i386-libvirt-xsm 15

Re: [PATCH v2 00/27] Enable PV backends with Xen/KVM emulation

2023-03-07 Thread Paul Durrant
On 07/03/2023 17:17, David Woodhouse wrote: Following on from the basic platform support which has already been merged, here's phase 2 which wires up the XenBus and PV back ends. It starts with a basic single-tenant internal implementation of a XenStore, with a copy-on-write tree, watches,

Re: [PATCH v2 25/27] i386/xen: Initialize Xen backends from pc_basic_device_init() for emulation

2023-03-07 Thread Paul Durrant
On 07/03/2023 17:17, David Woodhouse wrote: From: David Woodhouse Now that all the work is done to enable the PV backends to work without actual Xen, instantiate the bus from pc_basic_device_init() for emulated mode. This allows us finally to launch an emulated Xen guest with PV disk.

[ovmf test] 179498: all pass - PUSHED

2023-03-07 Thread osstest service owner
flight 179498 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/179498/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 75fb0cfc82376906243386514be0e4067d702117 baseline version: ovmf

Re: [PATCH v1 0/2] Fix ARM Generic Timer interrupt parsing

2023-03-07 Thread Andrei Cherechesu
On 07/03/2023 17:27, Bertrand Marquis wrote: > Hi Andrei, > > When submitting patches, please use the add_maintainer.pl script so that > maintainers of the code > modified are added in CC. Hi Bertrand, Thank you for reviewing the patches. I apologize for not adding the maintainers in CC. I

[PATCH v2 05/27] hw/xen: Watches on XenStore transactions

2023-03-07 Thread David Woodhouse
From: David Woodhouse Firing watches on the nodes that still exist is relatively easy; just walk the tree and look at the nodes with refcount of one. Firing watches on *deleted* nodes is more fun. We add 'modified_in_tx' and 'deleted_in_tx' flags to each node. Nodes with those flags cannot be

[PATCH v2 16/27] hw/xen: Rename xen_common.h to xen_native.h

2023-03-07 Thread David Woodhouse
From: David Woodhouse This header is now only for native Xen code, not PV backends that may be used in Xen emulation. Since the toolstack libraries may depend on the specific version of Xen headers that they pull in (and will set the __XEN_TOOLS__ macro to enable internal definitions that they

[PATCH v2 22/27] hw/xen: Add emulated implementation of XenStore operations

2023-03-07 Thread David Woodhouse
From: David Woodhouse Now that we have an internal implementation of XenStore, we can populate the xenstore_backend_ops to allow PV backends to talk to it. Watches can't be processed with immediate callbacks because that would call back into XenBus code recursively. Defer them to a QEMUBH to be

[PATCH v2 10/27] hw/xen: Add gnttab operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Move the existing code using libxengnttab to xen-operations.c and allow the operations to be redirected so that we can add emulation of grant table mapping for backend drivers. In emulation, mapping more than one grant ref to be virtually contiguous would be fairly

[PATCH v2 11/27] hw/xen: Pass grant ref to gnttab unmap operation

2023-03-07 Thread David Woodhouse
From: David Woodhouse The previous commit introduced redirectable gnttab operations fairly much like-for-like, with the exception of the extra arguments to the ->open() call which were always NULL/0 anyway. This *changes* the arguments to the ->unmap() operation to include the original ref#

[PATCH v2 07/27] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread David Woodhouse
From: David Woodhouse This implements the basic migration support in the back end, with unit tests that give additional confidence in the node-counting already in the tree. However, the existing PV back ends like xen-disk don't support migration yet. They will reset the ring and fail to

[PATCH v2 04/27] hw/xen: Implement XenStore transactions

2023-03-07 Thread David Woodhouse
From: David Woodhouse Given that the whole thing supported copy on write from the beginning, transactions end up being fairly simple. On starting a transaction, just take a ref of the existing root; swap it back in on a successful commit. The main tree has a transaction ID too, and we keep a

[PATCH v2 15/27] hw/xen: Use XEN_PAGE_SIZE in PV backend drivers

2023-03-07 Thread David Woodhouse
From: David Woodhouse XC_PAGE_SIZE comes from the actual Xen libraries, while XEN_PAGE_SIZE is provided by QEMU itself in xen_backend_ops.h. For backends which may be built for emulation mode, use the latter. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant ---

[PATCH v2 09/27] hw/xen: Add evtchn operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse The existing implementation calling into the real libxenevtchn moves to a new file hw/xen/xen-operations.c, and is called via a function table which in a subsequent commit will also be able to invoke the emulated event channel support. Signed-off-by: David Woodhouse

[PATCH v2 20/27] hw/xen: Hook up emulated implementation for event channel operations

2023-03-07 Thread David Woodhouse
From: David Woodhouse We provided the backend-facing evtchn functions very early on as part of the core Xen platform support, since things like timers and xenstore need to use them. By what may or may not be an astonishing coincidence, those functions just *happen* all to have exactly the right

[PATCH v2 23/27] hw/xen: Map guest XENSTORE_PFN grant in emulated Xenstore

2023-03-07 Thread David Woodhouse
From: David Woodhouse We don't actually access the guest's page through the grant, because this isn't real Xen, and we can just use the page we gave it in the first place. Map the grant anyway, mostly for cosmetic purposes so it *looks* like it's in use in the guest-visible grant table.

[PATCH v2 06/27] hw/xen: Implement XenStore permissions

2023-03-07 Thread David Woodhouse
From: Paul Durrant Store perms as a GList of strings, check permissions. Signed-off-by: Paul Durrant Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c | 2 +- hw/i386/kvm/xenstore_impl.c | 259 +---

[PATCH v2 26/27] MAINTAINERS: Add entry for Xen on KVM emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5340de0515..640deb2895 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -443,6 +443,15 @@ F:

[PATCH v2 21/27] hw/xen: Add emulated implementation of grant table operations

2023-03-07 Thread David Woodhouse
From: David Woodhouse This is limited to mapping a single grant at a time, because under Xen the pages are mapped *contiguously* into qemu's address space, and that's very hard to do when those pages actually come from anonymous mappings in qemu in the first place. Eventually perhaps we can

[PATCH v2 12/27] hw/xen: Add foreignmem operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/char/xen_console.c| 8 +++--- hw/display/xenfb.c | 20 +++--- hw/xen/xen-operations.c | 45 include/hw/xen/xen_backend_ops.h | 26

[PATCH v2 27/27] docs: Update Xen-on-KVM documentation for PV disk support

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- docs/system/i386/xen.rst | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/docs/system/i386/xen.rst b/docs/system/i386/xen.rst index a00523b492..f06765e88c

[PATCH v2 17/27] hw/xen: Build PV backend drivers for CONFIG_XEN_BUS

2023-03-07 Thread David Woodhouse
From: David Woodhouse Now that we have the redirectable Xen backend operations we can build the PV backends even without the Xen libraries. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/9pfs/meson.build| 2 +- hw/block/dataplane/meson.build | 2 +-

[PATCH v2 02/27] hw/xen: Add basic XenStore tree walk and write/read/directory support

2023-03-07 Thread David Woodhouse
From: David Woodhouse This is a fairly simple implementation of a copy-on-write tree. The node walk function starts off at the root, with 'inplace == true'. If it ever encounters a node with a refcount greater than one (including the root node), then that node is shared with other trees, and

[PATCH v2 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-03-07 Thread David Woodhouse
From: Paul Durrant Signed-off-by: Paul Durrant Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- accel/xen/xen-all.c | 11 +- hw/char/xen_console.c | 2 +- hw/i386/kvm/xen_xenstore.c | 3 - hw/i386/kvm/xenstore_impl.h | 8 +-

[PATCH v2 00/27] Enable PV backends with Xen/KVM emulation

2023-03-07 Thread David Woodhouse
Following on from the basic platform support which has already been merged, here's phase 2 which wires up the XenBus and PV back ends. It starts with a basic single-tenant internal implementation of a XenStore, with a copy-on-write tree, watches, transactions, quotas. Then we introduce

[PATCH v2 08/27] hw/xen: Create initial XenStore nodes

2023-03-07 Thread David Woodhouse
From: Paul Durrant Signed-off-by: Paul Durrant Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c | 70 ++ 1 file changed, 70 insertions(+) diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c index

[PATCH v2 03/27] hw/xen: Implement XenStore watches

2023-03-07 Thread David Woodhouse
From: David Woodhouse Starts out fairly simple: a hash table of watches based on the path. Except there can be multiple watches on the same path, so the watch ends up being a simple linked list, and the head of that list is in the hash table. Which makes removal a bit of a PITA but it's not so

[PATCH v2 14/27] hw/xen: Move xenstore_store_pv_console_info to xen_console.c

2023-03-07 Thread David Woodhouse
From: David Woodhouse There's no need for this to be in the Xen accel code, and as we want to use the Xen console support with KVM-emulated Xen we'll want to have a platform-agnostic version of it. Make it use GString to build up the path while we're at it. Signed-off-by: David Woodhouse

[PATCH v2 24/27] hw/xen: Implement soft reset for emulated gnttab

2023-03-07 Thread David Woodhouse
From: David Woodhouse This is only part of it; we will also need to get the PV back end drivers to tear down their own mappings (or do it for them, but they kind of need to stop using the pointers too). Some more work on the actual PV back ends and xen-bus code is going to be needed to really

[PATCH v2 01/27] hw/xen: Add xenstore wire implementation and implementation stubs

2023-03-07 Thread David Woodhouse
From: David Woodhouse This implements the basic wire protocol for the XenStore commands, punting all the actual implementation to xs_impl_* functions which all just return errors for now. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/meson.build | 1 +

[PATCH v2 18/27] hw/xen: Avoid crash when backend watch fires too early

2023-03-07 Thread David Woodhouse
From: Paul Durrant The xen-block code ends up calling aio_poll() through blkconf_geometry(), which means we see watch events during the indirect call to xendev_class->realize() in xen_device_realize(). Unfortunately this call is made before populating the initial frontend and backend device

[PATCH v2 25/27] i386/xen: Initialize Xen backends from pc_basic_device_init() for emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Now that all the work is done to enable the PV backends to work without actual Xen, instantiate the bus from pc_basic_device_init() for emulated mode. This allows us finally to launch an emulated Xen guest with PV disk. qemu-system-x86_64 -serial mon:stdio -M q35 -cpu

[PATCH v2 19/27] hw/xen: Only advertise ring-page-order for xen-block if gnttab supports it

2023-03-07 Thread David Woodhouse
From: David Woodhouse Whem emulating Xen, multi-page grants are distinctly non-trivial and we have elected not to support them for the time being. Don't advertise them to the guest. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/block/xen-block.c | 11 --- 1 file

Re: [RFC PATCH v1 07/25] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread Paul Durrant
On 07/03/2023 16:59, Paul Durrant wrote: On 07/03/2023 16:52, David Woodhouse wrote: On Tue, 2023-03-07 at 16:39 +, Paul Durrant wrote: On 07/03/2023 16:33, David Woodhouse wrote: On Thu, 2023-03-02 at 15:34 +, David Woodhouse wrote: From: David Woodhouse In fact I think we want to

Re: [RFC PATCH v1 07/25] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread Paul Durrant
On 07/03/2023 16:52, David Woodhouse wrote: On Tue, 2023-03-07 at 16:39 +, Paul Durrant wrote: On 07/03/2023 16:33, David Woodhouse wrote: On Thu, 2023-03-02 at 15:34 +, David Woodhouse wrote: From: David Woodhouse In fact I think we want to only serialize the contents of the

Re: [RFC PATCH v2 1/2] xen/memory : Add a stats_table resource type

2023-03-07 Thread Jan Beulich
On 07.03.2023 15:44, Matias Ezequiel Vara Larsen wrote: > On Thu, Feb 23, 2023 at 01:42:08PM +0100, Jan Beulich wrote: >> On 23.02.2023 13:16, Matias Ezequiel Vara Larsen wrote: >>> On Fri, Feb 17, 2023 at 03:10:53PM +0100, Jan Beulich wrote: On 17.02.2023 10:29, Matias Ezequiel Vara Larsen

Re: [RFC PATCH v1 07/25] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread David Woodhouse
On Tue, 2023-03-07 at 16:39 +, Paul Durrant wrote: > On 07/03/2023 16:33, David Woodhouse wrote: > > On Thu, 2023-03-02 at 15:34 +, David Woodhouse wrote: > > > From: David Woodhouse > > > > > > In fact I think we want to only serialize the contents of the domain's > > > path in

Re: [RFC PATCH v1 07/25] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread Paul Durrant
On 07/03/2023 16:39, Paul Durrant wrote: On 07/03/2023 16:33, David Woodhouse wrote: On Thu, 2023-03-02 at 15:34 +, David Woodhouse wrote: From: David Woodhouse In fact I think we want to only serialize the contents of the domain's path in /local/domain/${domid} and leave the rest to be

Re: [RFC PATCH v1 07/25] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread Paul Durrant
On 07/03/2023 16:33, David Woodhouse wrote: On Thu, 2023-03-02 at 15:34 +, David Woodhouse wrote: From: David Woodhouse In fact I think we want to only serialize the contents of the domain's path in /local/domain/${domid} and leave the rest to be recreated? Will defer to Paul for that.

Re: [RFC PATCH v1 07/25] hw/xen: Implement core serialize/deserialize methods for xenstore_impl

2023-03-07 Thread David Woodhouse
On Thu, 2023-03-02 at 15:34 +, David Woodhouse wrote: > From: David Woodhouse > > In fact I think we want to only serialize the contents of the domain's > path in /local/domain/${domid} and leave the rest to be recreated? Will > defer to Paul for that. > > Signed-off-by: David Woodhouse

Re: [RFC PATCH v1 27/25] docs: Update Xen-on-KVM documentation for PV disk support

2023-03-07 Thread Paul Durrant
On 07/03/2023 16:22, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- docs/system/i386/xen.rst | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) Reviewed-by: Paul Durrant

Re: [RFC PATCH v1 26/25] MAINTAINERS: Add entry for Xen on KVM emulation

2023-03-07 Thread Paul Durrant
On 07/03/2023 16:21, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) Reviewed-by: Paul Durrant

Re: [RFC PATCH v1 25/25] i386/xen: Initialize Xen backends from pc_basic_device_init() for emulation

2023-03-07 Thread Paul Durrant
On 02/03/2023 15:34, David Woodhouse wrote: From: David Woodhouse Now that all the work is done to enable the PV backends to work without actual Xen, instantiate the bus from pc_basic_device_init() for emulated mode. This allows us finally to launch an emulated Xen guest with PV disk.

Re: [RFC PATCH v1 24/25] hw/xen: Implement soft reset for emulated gnttab

2023-03-07 Thread Paul Durrant
On 02/03/2023 15:34, David Woodhouse wrote: From: David Woodhouse This is only part of it; we will also need to get the PV back end drivers to tear down their own mappings (or do it for them, but they kind of need to stop using the pointers too). Some more work on the actual PV back ends and

Re: [PATCH V2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-07 Thread Stefan Hajnoczi
On Tue, Mar 07, 2023 at 11:13:36AM +0530, Viresh Kumar wrote: > On 06-03-23, 10:34, Stefan Hajnoczi wrote: > > On Mon, Mar 06, 2023 at 04:40:24PM +0530, Viresh Kumar wrote: > > > +Xen mmap description > > > + > > > + > > > ++---+---+ > > > +| flags | domid | > > >

Re: [RFC PATCH v1 23/25] hw/xen: Map guest XENSTORE_PFN grant in emulated Xenstore

2023-03-07 Thread Paul Durrant
On 02/03/2023 15:34, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- hw/i386/kvm/xen_xenstore.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c index 028f80499e..f9b7387024 100644

[RFC PATCH v1 27/25] docs: Update Xen-on-KVM documentation for PV disk support

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- docs/system/i386/xen.rst | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/docs/system/i386/xen.rst b/docs/system/i386/xen.rst index a00523b492..f06765e88c 100644 ---

[RFC PATCH v1 26/25] MAINTAINERS: Add entry for Xen on KVM emulation

2023-03-07 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index da29661b37..76b705e467 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -443,6 +443,15 @@ F: target/i386/kvm/ F: target/i386/sev* F:

Re: [RFC PATCH v1 22/25] hw/xen: Add emulated implementation of XenStore operations

2023-03-07 Thread Paul Durrant
On 02/03/2023 15:34, David Woodhouse wrote: From: David Woodhouse Now that we have an internal implementation of XenStore, we can populate the xenstore_backend_ops to allow PV backends to talk to it. Watches can't be processed with immediate callbacks because that would call back into XenBus

Re: [RFC PATCH v1 21/25] hw/xen: Add emulated implementation of grant table operations

2023-03-07 Thread David Woodhouse
On Tue, 2023-03-07 at 16:07 +, Paul Durrant wrote: > On 02/03/2023 15:34, David Woodhouse wrote: > > From: David Woodhouse > > > > This is limited to mapping a single grant at a time, because under Xen the > > pages are mapped *contiguously* into qemu's address space, and that's very > >

Re: [RFC PATCH v1 21/25] hw/xen: Add emulated implementation of grant table operations

2023-03-07 Thread Paul Durrant
On 02/03/2023 15:34, David Woodhouse wrote: From: David Woodhouse This is limited to mapping a single grant at a time, because under Xen the pages are mapped *contiguously* into qemu's address space, and that's very hard to do when those pages actually come from anonymous mappings in qemu in

Re: [PATCH 2/2] xen: update CONFIG_DEBUG_INFO help text

2023-03-07 Thread Juergen Gross
On 07.03.23 16:14, Jan Beulich wrote: On 07.03.2023 16:02, Juergen Gross wrote: On 07.03.23 15:34, Jan Beulich wrote: On 07.03.2023 15:23, Juergen Gross wrote: On 07.03.23 15:18, Jan Beulich wrote: On 07.03.2023 15:04, Juergen Gross wrote: On 07.03.23 11:41, Jan Beulich wrote: On

[PATCH v6 4/4] xen/x86: switch x86 to use generic implemetation of bug.h

2023-03-07 Thread Oleksii Kurochko
The following changes were made: * Make GENERIC_BUG_FRAME mandatory for X86 * Update asm/bug.h using generic implementation in * Update do_invalid_op using generic do_bug_frame() * Define BUG_DEBUGGER_TRAP_FATAL to debugger_trap_fatal(X86_EXC_GP,regs) * type of eip variable was changed to 'void

[PATCH v6 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME

2023-03-07 Thread Oleksii Kurochko
A large part of the content of the bug.h is repeated among all architectures, so it was decided to create a new config CONFIG_GENERIC_BUG_FRAME. The version of from x86 was taken as the base version. The patch introduces the following stuff: * common bug.h header * generic implementation of

[PATCH v6 3/4] xen/arm: switch ARM to use generic implementation of bug.h

2023-03-07 Thread Oleksii Kurochko
The following changes were made: * make GENERIC_BUG_FRAME mandatory for ARM * As do_bug_frame() returns -EINVAL in case something goes wrong otherwise id of bug frame. Thereby 'if' cases where do_bug_frame() was updated to check if the returned value is less than 0 * Switch ARM's

[PATCH v6 2/4] xen: change to

2023-03-07 Thread Oleksii Kurochko
The idea of the patch is to change all to and keep Xen compilable with adding only minimal amount of changes: 1. It was added "#include " to ARM's "" as it uses uint_{16,32}t in 'struct bug_frame'. 2. It was added '#define BUG_FRAME_STRUCT' which means that ARM hasn't been switched to

  1   2   >