Bug report: Qubes 4.2 RC4

2023-11-10 Thread adresseinconnue
Hello, I have filed a bug report [on GitHub](https://[email protected]) about my WiFi card. The report references a very detailed initial post on the Qubes forum about the situation, which you can [find here](https://[email protected]). Thank you for looking into this.

Re: [PATCH] Use hex for bitstream_size as expected by u-boot

2023-11-10 Thread Stefano Stabellini
On Fri, 10 Nov 2023, Julien Grall wrote: > On 10/11/2023 10:08, Julien Grall wrote: > > On 10/11/2023 10:01, Michal Orzel wrote: > > > Hi Julien, > > > > > > On 10/11/2023 10:27, Julien Grall wrote: > > > > > > > > > > > > Hi Stefano, > > > > > > > > On 10/11/2023 01:44, Stefano Stabellini wrot

Re: [RFC 1/4] x86/ioemul: address MISRA C:2012 Rule 9.3

2023-11-10 Thread Stefano Stabellini
On Mon, 6 Nov 2023, Nicola Vetrini wrote: > > > > There's also this functionally equivalent alternative, with or without > > > > the zeros, which > > > > doesn't incur in the risk of mistakenly attempting to initialize the > > > > same element twice, > > > > while also giving an explicit cue to the

Re: [PATCH for-4.18] docs: Delete kconfig docs to fix licensing violation

2023-11-10 Thread Henry Wang
Hi, > On Nov 11, 2023, at 07:44, Stefano Stabellini wrote: > > On Fri, 10 Nov 2023, Andrew Cooper wrote: >> On 09/11/2023 11:59 pm, Stefano Stabellini wrote: >>> On Thu, 9 Nov 2023, Jan Beulich wrote: On 08.11.2023 15:37, Andrew Cooper wrote: > These 3 Kconfig docs were imported from Li

[linux-linus test] 183730: regressions - FAIL

2023-11-10 Thread osstest service owner
flight 183730 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183730/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 6 kernel-build fail REGR. vs. 183728 Tests which did not

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-10 Thread Stefano Stabellini
On Fri, 10 Nov 2023, Nicola Vetrini wrote: > Hi everyone, > > I trimmed the thread a bit, to make this more readable. > > > > > > > IMHO, the only viable option would be to have a configuration to > > > > > > keep > > > > > > ASSERT in production build for scanning tools. > > > > > > > > > > But

Re: [PATCH for-4.18 3/3] docs/sphinx: Fix indexing

2023-11-10 Thread Stefano Stabellini
On Fri, 10 Nov 2023, Andrew Cooper wrote: > On 10/11/2023 12:07 am, Stefano Stabellini wrote: > > On Wed, 8 Nov 2023, Andrew Cooper wrote: > >> diff --git a/docs/index.rst b/docs/index.rst > >> index f3f779f89ce5..22fdde80590c 100644 > >> --- a/docs/index.rst > >> +++ b/docs/index.rst > >> @@ -53,1

Re: [PATCH for-4.18] docs: Delete kconfig docs to fix licensing violation

2023-11-10 Thread Stefano Stabellini
On Fri, 10 Nov 2023, Andrew Cooper wrote: > On 09/11/2023 11:59 pm, Stefano Stabellini wrote: > > On Thu, 9 Nov 2023, Jan Beulich wrote: > >> On 08.11.2023 15:37, Andrew Cooper wrote: > >>> These 3 Kconfig docs were imported from Linux erroneously. They are > >>> GPL-2.0-only in Linux, but have no

Re: [PATCH for-4.18] docs: Delete kconfig docs to fix licensing violation

2023-11-10 Thread Andrew Cooper
On 09/11/2023 11:59 pm, Stefano Stabellini wrote: > On Thu, 9 Nov 2023, Jan Beulich wrote: >> On 08.11.2023 15:37, Andrew Cooper wrote: >>> These 3 Kconfig docs were imported from Linux erroneously. They are >>> GPL-2.0-only in Linux, but have no SPDX tag and were placed in such a way to >>> be in

Re: [PATCH for-4.18 3/3] docs/sphinx: Fix indexing

2023-11-10 Thread Andrew Cooper
On 10/11/2023 12:07 am, Stefano Stabellini wrote: > On Wed, 8 Nov 2023, Andrew Cooper wrote: >> diff --git a/docs/index.rst b/docs/index.rst >> index f3f779f89ce5..22fdde80590c 100644 >> --- a/docs/index.rst >> +++ b/docs/index.rst >> @@ -53,17 +53,18 @@ kind of development environment. >> hype

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

2023-11-10 Thread Volodymyr Babchuk
From: Oleksandr Tyshchenko Instead of forcing the owner to domid 0, use XS_PRESERVE_OWNER to save the previous owner of the directory. 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

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

2023-11-10 Thread Volodymyr Babchuk
From: Oleksandr Tyshchenko This patch adds basic virtio-pci support for xen_arm machine. It provides a flexible way to configure virtio-pci resources with xenstore. We made this for several reasons: - We don't want to clash with vPCI devices, so we need information from Xen toolstack on which

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

2023-11-10 Thread Volodymyr Babchuk
From: Oleksandr Tyshchenko The PV backend running in other than Dom0 domain (non toolstack domain) is not allowed to write frontend nodes. The more, the backend does not need to do that at all, this is purely toolstack/xl devd business. I do not know for what reason the backend does that here, t

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

2023-11-10 Thread Volodymyr Babchuk
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 domain that is Domain-0, e.g. in driver domain. "owner" parameter for qemu_xen_xs_create() function can have special value XS_PRESERVE_OWNER, which will make spec

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

2023-11-10 Thread Volodymyr Babchuk
From: Oleksandr Tyshchenko The PV backend running in other than Dom0 domain (non toolstack domain) is not allowed to destroy frontend/backend directories. The more, it does not need to do that at all, this is purely toolstack/xl devd business. I do not know for what reason the backend does that

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

2023-11-10 Thread Volodymyr Babchuk
From: Oleksandr Tyshchenko Both state (XenbusStateClosed) and online (0) are expected by toolstack/xl devd to completely destroy the device. But "offline" is never being set by the backend resulting in timeout during domain destruction, garbage in Xestore and still running Qemu instance. Signed-

Re: [PATCH v2 24/29] tools/xenstored: split domain_init()

2023-11-10 Thread Julien Grall
Hi Juergen, On 10/11/2023 16:07, Juergen Gross wrote: Today domain_init() is called either just before calling dom0_init() in case no live update is being performed, or it is called after reading the global state from read_state_global(), as the event channel fd is needed. Split up domain_init(

Re: [PATCH v2 23/29] tools/xenstored: rework ring page (un)map functions

2023-11-10 Thread Julien Grall
Hi Juergen, On 10/11/2023 16:07, Juergen Gross wrote: When [un]mapping the ring page of a Xenstore client, different actions are required for "normal" guests and dom0. Today this distinction is made at call site. Move this distinction into [un]map_interface() instead, avoiding code duplication

Re: exynos-mixer 14450000.mixer: [drm:exynos_drm_register_dma] *ERROR* Device 14450000.mixer lacks support for IOMMU

2023-11-10 Thread Chuck Zmudzinski
Hi everyone, This reply is intended to clarify the latest test results and bring the clarifications and other relevant discussion to the xen-devel mailing list. On 11/1/2023 5:14 AM, Julien Grall wrote: > > > On 01/11/2023 08:45, Chuck Zmudzinski wrote: >> On 11/1/2023 4:27 AM, Julien Grall wro

Re: [PATCH v2 2/5] Mini-OS: get own domid

2023-11-10 Thread Julien Grall
Hi, On 10/11/2023 11:34, Juergen Gross wrote: Get the own domid via creation of a temporary event channel. There is no "official" way to read the own domid in PV guests, so use the event channel interface to get it: - allocate an unbound event channel specifying DOMID_SELF for the other end

Re: [PATCH v2 2/5] Mini-OS: get own domid

2023-11-10 Thread Julien Grall
Hi Jan, On 10/11/2023 12:44, Jan Beulich wrote: On 10.11.2023 13:23, Roger Pau Monné wrote: On Fri, Nov 10, 2023 at 12:34:32PM +0100, Juergen Gross wrote: Get the own domid via creation of a temporary event channel. There is no "official" way to read the own domid in PV guests, so use the even

Re: [PATCH v2 22/29] tools/xenstored: get own domid in stubdom case

2023-11-10 Thread Julien Grall
Hi Juergen, On 10/11/2023 16:07, Juergen Gross wrote: Obtain the own domid from the Xenstore special grant entry when running as stubdom. The commit message says we would use the grant entry but ... Signed-off-by: Juergen Gross --- V2: - replacement of V1 patch (ANdrew Cooper) --- tools/x

Re: [PATCH v2 21/29] tools/xenstored: add early_init() function

2023-11-10 Thread Julien Grall
Hi Juergen, On 10/11/2023 16:07, Juergen Gross wrote: Some xenstored initialization needs to be done in the daemon case only, so split it out into a new early_init() function being a stub in the stubdom case. It is not entirely clear to me how you decided the split. For example... Signed-of

Booting HVM domU through OVMF failed with assertion `rsdp_paddr != 0`

2023-11-10 Thread G.R.
Hi all, I'm trying out to boot domU through UEFI path but so far made very little progress. I'm currently on a self-built XEN 4.16.1 hypervisor version without the --enable-ovmf configuration. I attempted a dirty build to generate the ovmf.bin firmware. The build succeeds but chery-picking the fir

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-10 Thread Andrew Cooper
On 08/11/2023 1:45 pm, Nicola Vetrini wrote: > On 2023-11-08 14:37, Andrew Cooper wrote: >> On 03/11/2023 5:58 pm, Nicola Vetrini wrote: >>> Static analysis tools may detect a possible null >>> pointer dereference at line 760 (the memcpy call) >>> of xen/common/domain.c. This ASSERT helps them in >

Re: [XEN PATCH] automation/eclair: add a deviation for MISRA C:2012 Rule 8.6

2023-11-10 Thread Federico Serafini
On 10/11/23 13:41, Jan Beulich wrote: On 10.11.2023 12:23, Federico Serafini wrote: --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -214,6 +214,15 @@ definition is compiled-out or optimized-out by the compiler)" -config=MC3R1.R8

[PATCH v2 14/15] xen/asm-generic: introduce stub header numa.h

2023-11-10 Thread Oleksii Kurochko
is common through some archs so it is moved to asm-generic. Signed-off-by: Oleksii Kurochko --- Changes in V2: - update the commit message. - change u8 to uint8_t. - add ifnded CONFIG_NUMA. --- xen/include/asm-generic/numa.h | 40 ++ 1 fil

[PATCH v2 15/15] xen/asm-generic: introduce stub header softirq.h

2023-11-10 Thread Oleksii Kurochko
is common between Arm, PPC and RISC-V so it is moved to asm-generic. Signed-off-by: Oleksii Kurochko --- Changes in V2: - update the commit message. --- xen/include/asm-generic/softirq.h | 17 + 1 file changed, 17 insertions(+) create mode 100644 xen/include/asm-generic/sof

[PATCH v2 11/15] xen/asm-generic: introduce generic div64.h header

2023-11-10 Thread Oleksii Kurochko
All archs have the do_div implementation for BITS_PER_LONG == 64 so do_div64.h is moved to asm-generic. The patch introduces header stub necessry for full Xen build. Signed-off-by: Oleksii Kurochko --- Changes in V2: - rename base to divisor - add "#if BITS_PER_LONG == 64"

[PATCH v2 09/15] xen/asm-generic: introduce generic header smp.h

2023-11-10 Thread Oleksii Kurochko
is expcted to be generic between Arm, PPC and RISC-V there by it is moved to asm-generic. Right now it is common only by PPC and RISC-V but during work on support of the mentioned arhcs is expected to be the same. Signed-off-by: Oleksii Kurochko --- Changes in V2: - drop #ifded ASSEMBL

[PATCH v2 07/15] xen/asm-generic: introduce stub header

2023-11-10 Thread Oleksii Kurochko
is common for Arm, PPC and RISC-V thereby it is moved to asm-generic. Signed-off-by: Oleksii Kurochko --- Changes in V2: - update the commit messages --- xen/include/asm-generic/random.h | 20 1 file changed, 20 insertions(+) create mode 100644 xen/include/asm-generic/ran

[PATCH v2 06/15] xen/asm-generic: ifdef inclusion of

2023-11-10 Thread Oleksii Kurochko
ifdefing inclusion of in allows to avoid generation of empty header for the case when !CONFIG_MEM_ACCESS. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- Changes in V2: - add Suggested-by: Jan Beulich - update the commit message - remove --- xen/includ

[PATCH v2 13/15] xen/asm-generic: introduce stub header monitor.h

2023-11-10 Thread Oleksii Kurochko
The header is shared between archs so it is moved to asm-generic. Signed-off-by: Oleksii Kurochko --- Changes in V2: - remove inclusion of "+#include " - add "struct xen_domctl_monitor_op;" - remove one of SPDX tags. --- xen/include/asm-generic/monitor.h | 62

[PATCH v2 12/15] xen/asm-generic: introduce generic header altp2m.h

2023-11-10 Thread Oleksii Kurochko
is common between archs so it is moved to asm-generic. Signed-off-by: Oleksii Kurochko --- Changes in V2: - change uint16_t to unsigned int in declaration of altp2m_vcpu_idx - update the commit message --- xen/include/asm-generic/altp2m.h | 34 1

[PATCH v2 01/15] xen/asm-generic: introduce stub header paging.h

2023-11-10 Thread Oleksii Kurochko
The patch introduces generic paging.h header for Arm, PPC and RISC-V. All mentioned above architectures use hardware virt extensions and hardware pagetable extensions thereby it makes sense to set paging_mode_translate and paging_mode_external by default. Also in this patch Arm and PPC architectu

[PATCH v2 03/15] xen: ifdef inclusion of in

2023-11-10 Thread Oleksii Kurochko
Ifdefing inclusion of allows to avoid generation of empty for cases when CONFIG_GRANT_TABLE is not enabled. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- Changes in V2: - ifdef inclusion of asm/grant_table.h in xen/grant_table.h to avoid generation of empty he

[PATCH v2 10/15] xen/asm-generic: introduce generalized hardirq.h

2023-11-10 Thread Oleksii Kurochko
is common through archs thereby it is moved to asm-generic. Signed-off-by: Oleksii Kurochko --- Changes in V2: - add #include . - update the commit message --- xen/include/asm-generic/hardirq.h | 29 + 1 file changed, 29 insertions(+) create mode 100

[PATCH v2 02/15] xen/asm-generic: introduce generic device.h

2023-11-10 Thread Oleksii Kurochko
Arm, PPC and RISC-V use the same device.h thereby device.h was moved to asm-generic. Arm's device.h was taken as a base with the following changes: - #ifdef PCI related things. - #ifdef ACPI related things. - Rename #ifdef guards. - Add SPDX tag. Signed-off-by: Oleksii Kurochko --- It is stil

[PATCH v2 08/15] xen/asm-generic: introduce generic header percpu.h

2023-11-10 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: - use smp_processor_id() instead of get_processor_id(). - update commit message . --- xen/include/asm-generic/percpu.h | 35 1 file changed, 35 insertions(+) create mode 100644 xen/include/asm-gen

[PATCH v2 05/15] xen/asm-generic: introduce generic header iocap.h

2023-11-10 Thread Oleksii Kurochko
iocap.h is common for Arm, PPC and RISC-V architectures thereby it was moved to asm-generic. Signed-off-by: Oleksii Kurochko --- The same question as with device.h. Should it be in asm-generic? Changes in V2: - update the commit message --- xen/include/asm-generic/iocap.h | 17

[PATCH v2 00/15] Introduce generic headers

2023-11-10 Thread Oleksii Kurochko
Some headers are common between several architectures, so the current patch series provide them. Another one reason to have them as generic is a simplification of adding support necessary to make a complete Xen build as it was/is being done in the patch series [1] and [2]. Also, instead of prov

[PATCH v2 04/15] xen/asm-generic: introduce generic hypercall.h

2023-11-10 Thread Oleksii Kurochko
Introduce an empty generic hypercall.h for archs which don't implement it. Signed-off-by: Oleksii Kurochko --- Changes in V2: - add check that isn't included directly. --- xen/include/asm-generic/hypercall.h | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 xen/incl

Re: [XEN PATCH][for-4.19] domain: add ASSERT to help static analysis tools

2023-11-10 Thread Nicola Vetrini
Hi everyone, I trimmed the thread a bit, to make this more readable. IMHO, the only viable option would be to have a configuration to keep ASSERT in production build for scanning tools. But wouldn't that then likely mean scanning to be done on builds not also used in production? Would doing

[PATCH v2 20/29] tools: add 9pfs device to xenstore-stubdom

2023-11-10 Thread Juergen Gross
Add a 9pfs device to Xenstore stubdom in order to allow it to do e.g. logging into a dom0 file. Use the following parameters for the new device: - tag = "xen" - type = "xen-9pfsd" - path = "/var/lib/xen/xenstore" - security-model = "none" For now don't limit allowed file space or number of files

[PATCH v2 27/29] tools/xenstored: add helpers for filename handling

2023-11-10 Thread Juergen Gross
Add some helpers for handling filenames which might need different implementations between stubdom and daemon environments: - expansion of relative filenames (those are not really defined today, just expand them to be relative to /var/lib/xen/xenstore) - expansion of xenstore_daemon_rundir() (us

[PATCH v2 22/29] tools/xenstored: get own domid in stubdom case

2023-11-10 Thread Juergen Gross
Obtain the own domid from the Xenstore special grant entry when running as stubdom. Signed-off-by: Juergen Gross --- V2: - replacement of V1 patch (ANdrew Cooper) --- tools/xenstored/core.c | 1 + tools/xenstored/core.h | 1 + tools/xenstored/minios.c | 5 + 3 files changed, 7 insertions

[PATCH v2 18/29] tools/xenstored: rename xenbus_evtchn()

2023-11-10 Thread Juergen Gross
Rename the xenbus_evtchn() function to get_xenbus_evtchn() in order to avoid two externally visible symbols with the same name when Xenstore- stubdom is being built with a Mini-OS with CONFIG_XENBUS set. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstored/core.h | 2 +-

[PATCH v2 15/29] tools/libs/light: add backend type for 9pfs PV devices

2023-11-10 Thread Juergen Gross
Make the backend type of 9pfs PV devices configurable. The default is "qemu" with the related Xenstore backend-side directory being "9pfs". Add another type "xen-9pfsd" with the related Xenstore backend-side directory "xen_9pfs". As additional security features it is possible to specify: - "max-s

[PATCH v2 14/29] tools/xenlogd: add 9pfs read request support

2023-11-10 Thread Juergen Gross
Add the read request of the 9pfs protocol. For now support only reading plain files (no directories). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - make error check more readable (Jason Andryuk) --- tools/xen-9pfsd/io.c | 64 1 f

[PATCH v2 17/29] tools/helpers: allocate xenstore event channel for xenstore stubdom

2023-11-10 Thread Juergen Gross
In order to prepare support of PV frontends in xenstore-stubdom, add allocation of a Xenstore event channel to init-xenstore-domain.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/helpers/init-xenstore-domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tool

[PATCH v2 10/29] tools/xenlogd: add 9pfs clunk request support

2023-11-10 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xen-9pfsd/io.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c index bb9c78a1f5..c182ef0483 100644 --- a/tools/xen-9pfsd/

[PATCH v2 12/29] tools/xenlogd: add 9pfs stat request support

2023-11-10 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xen-9pfsd/io.c | 92 1 file changed, 92 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c index a605f51dc6..e5abd25857

[PATCH v2 16/29] tools/xl: support new 9pfs backend xen-9pfsd

2023-11-10 Thread Juergen Gross
Add support for the new 9pfs backend "xen-9pfsd". For this backend type the tag defaults to "Xen" and the host side path to "/var/log/xen/guests/". Signed-off-by: Juergen Gross --- V2: - test max_files and max_open_files, too (Jason Andryuk) --- docs/man/xl.cfg.5.pod.in | 36

[PATCH v2 21/29] tools/xenstored: add early_init() function

2023-11-10 Thread Juergen Gross
Some xenstored initialization needs to be done in the daemon case only, so split it out into a new early_init() function being a stub in the stubdom case. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - rename function - move patch earlier in the series --- tools/xenstored/cor

[PATCH v2 26/29] tools/xenstored: mount 9pfs device in stubdom

2023-11-10 Thread Juergen Gross
Mount the 9pfs device in stubdom enabling it to use files. This has to happen in a worker thread in order to allow the main thread handling the required Xenstore accesses in parallel. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/core.h | 4 tools/xenstore

[PATCH v2 23/29] tools/xenstored: rework ring page (un)map functions

2023-11-10 Thread Juergen Gross
When [un]mapping the ring page of a Xenstore client, different actions are required for "normal" guests and dom0. Today this distinction is made at call site. Move this distinction into [un]map_interface() instead, avoiding code duplication and preparing special handling for [un]mapping the stub d

[PATCH v2 25/29] tools/xenstored: map stubdom interface

2023-11-10 Thread Juergen Gross
When running as stubdom, map the stubdom's Xenstore ring page in order to support using the 9pfs frontend. Signed-off-by: Juergen Gross --- tools/xenstored/core.c | 2 ++ tools/xenstored/domain.c | 27 ++- tools/xenstored/domain.h | 1 + 3 files changed, 29 insertions

[PATCH v2 24/29] tools/xenstored: split domain_init()

2023-11-10 Thread Juergen Gross
Today domain_init() is called either just before calling dom0_init() in case no live update is being performed, or it is called after reading the global state from read_state_global(), as the event channel fd is needed. Split up domain_init() into a preparation part which can be called uncondition

[PATCH v2 19/29] stubdom: extend xenstore stubdom configs

2023-11-10 Thread Juergen Gross
Extend the config files of the Xenstore stubdoms to include XENBUS and 9PFRONT items in order to support file based logging. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- stubdom/xenstore-minios.cfg| 2 +- stubdom/xenstorepvh-minios.cfg | 2 +- 2 files changed, 2 insertions(+)

Re: [PATCH v2 02/29] tools: add a new xen logging daemon

2023-11-10 Thread Juergen Gross
On 10.11.23 17:13, Andrew Cooper wrote: Subject wants a log->9pfsd adjustment too On 10/11/2023 4:07 pm, Juergen Gross wrote: diff --git a/tools/xen-9pfsd/xen-9pfsd.c b/tools/xen-9pfsd/xen-9pfsd.c new file mode 100644 index 00..c365b35fe5 --- /dev/null +++ b/tools/xen-9pfsd/xen-9pfsd.c

[PATCH v2 13/29] tools/xenlogd: add 9pfs write request support

2023-11-10 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xen-9pfsd/io.c | 54 1 file changed, 54 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c index e5abd25857..f8d981c2a6

Re: [PATCH v2 02/29] tools: add a new xen logging daemon

2023-11-10 Thread Andrew Cooper
Subject wants a log->9pfsd adjustment too On 10/11/2023 4:07 pm, Juergen Gross wrote: > diff --git a/tools/xen-9pfsd/xen-9pfsd.c b/tools/xen-9pfsd/xen-9pfsd.c > new file mode 100644 > index 00..c365b35fe5 > --- /dev/null > +++ b/tools/xen-9pfsd/xen-9pfsd.c > @@ -0,0 +1,145 @@ > +/* SPDX-Li

[PATCH v2 29/29] tools/xenstored: have a single do_control_memreport()

2023-11-10 Thread Juergen Gross
With 9pfs now available in Xenstore-stubdom, there is no reason to have distinct do_control_memreport() variants for the daemon and the stubdom implementations. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c | 27 +++ 1 file changed

[PATCH v2 28/29] tools/xenstored: support complete log capabilities in stubdom

2023-11-10 Thread Juergen Gross
With 9pfs being fully available in Xenstore-stubdom now, there is no reason to not fully support all logging capabilities in stubdom. Open the logfile on stubdom only after the 9pfs file system has been mounted. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/hotplug/Linux/la

[PATCH v2 11/29] tools/xenlogd: add 9pfs create request support

2023-11-10 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V2: - set permissions correctly (Jason Andryuk) --- tools/xen-9pfsd/io.c | 159 +++ 1 file changed, 159 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c in

[PATCH v2 06/29] tools/xenlogd: add 9pfs version request support

2023-11-10 Thread Juergen Gross
Add the version request of the 9pfs protocol. For the version use the "9P2000.u" variant, as it is supported by Mini-OS and Linux. For the request parsing add all format items needed even in future in order to avoid code churn for those additions later. Signed-off-by: Juergen Gross Reviewed-by:

[PATCH v2 08/29] tools/xenlogd: add 9pfs walk request support

2023-11-10 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V2: - don't allow walking across symbolic links --- tools/xen-9pfsd/io.c| 172 tools/xen-9pfsd/xen-9pfsd.h | 1 + 2 files changed, 173 insertions(+) diff --git a/tools/xen-

[PATCH v2 04/29] tools/xenlogd: add transport layer

2023-11-10 Thread Juergen Gross
Add the transport layer of 9pfs. This is basically the infrastructure to receive requests from the frontend and to send the related answers via the rings. In order to avoid unaligned accesses e.g. on Arm, add the definition of __packed to the common-macros.h header. Signed-off-by: Juergen Gross

[PATCH v2 09/29] tools/xenlogd: add 9pfs open request support

2023-11-10 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V2: - don't allow to open symbolic link --- tools/xen-9pfsd/io.c| 144 tools/xen-9pfsd/xen-9pfsd.h | 4 + 2 files changed, 148 insertions(+) diff --git a/tools/xen-9pfsd/io

[PATCH v2 02/29] tools: add a new xen logging daemon

2023-11-10 Thread Juergen Gross
Add "xen-9pfsd", a new logging daemon meant to support infrastructure domains (e.g. xenstore-stubdom) to access files in dom0. For now only add the code needed for starting the daemon and registering it with Xenstore via a new "libxl/xen-9pfs/state" node by writing the "running" state to it. Sign

[PATCH v2 07/29] tools/xenlogd: add 9pfs attach request support

2023-11-10 Thread Juergen Gross
Add the attach request of the 9pfs protocol. This introduces the "fid" scheme of the 9pfs protocol. As this will be needed later, use a dedicated memory allocation function in alloc_fid() and prepare a fid reference count. For filling the qid data take the approach from the qemu 9pfs backend impl

[PATCH v2 00/29] tools: enable xenstore-stubdom to use 9pfs

2023-11-10 Thread Juergen Gross
This series is adding 9pfs support to Xenstore-stubdom, enabling it to do logging to a dom0 directory. This is a prerequisite for the final goal to add live update support to Xenstore-stubdom, as it enables the stubdom to store its state in a dom0 file. The 9pfs backend is a new daemon written fr

[PATCH v2 05/29] tools/xenlogd: add 9pfs response generation support

2023-11-10 Thread Juergen Gross
Add support for generation a 9pfs protocol response via a format based approach. Strings are stored in a per device string buffer and they are referenced via their offset in this buffer. This allows to avoid having to dynamically allocate memory for each single string. As a first user of the resp

[PATCH v2 03/29] tools/xenlogd: connect to frontend

2023-11-10 Thread Juergen Gross
Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross --- V2: - support multiple rings per device (Jason Andryuk) - don't set .revents initially (Jason Andryuk) - call poll() with infinite timeout (Jason Andryuk) - take mutex before calling pthread_cond_signal() --- t

[PATCH v2 01/29] xen/public: add some more 9pfs xenstore paths

2023-11-10 Thread Juergen Gross
Add some optional additional backend paths for 9pfs PV devices. Those paths will be supported by the new xenlogd 9pfs backend. Signed-off-by: Juergen Gross --- xen/include/public/io/9pfs.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/xen/include/public/

[XEN PATCH v2 10/25] arm: new VGIC: Add vgic_v3_enable

2023-11-10 Thread Mykyta Poturai
Enable the VGIC operation by properly initialising the registers in the hypervisor GIC interface. This is based on Linux commit f7b6985cc3d0f by Eric Auger Signed-off-by: Mykyta Poturai --- xen/arch/arm/vgic/vgic-init.c | 5 + xen/arch/arm/vgic/vgic-v3.c | 6 ++ xen/arch/arm/vgic/vgic

[XEN PATCH v2 13/25] arm: new VGIC: Handle ITS related GICv3 redistributor registers

2023-11-10 Thread Mykyta Poturai
In the GICv3 redistributor there are the PENDBASER and PROPBASER registers which we did not emulate so far, as they only make sense when having an ITS. In preparation for that emulate those MMIO accesses by storing the 64-bit data written into it into a variable which we later read in the ITS emula

[XEN PATCH v2 20/25] arm: new VGIC: its: Implement ITS command queue command handlers

2023-11-10 Thread Mykyta Poturai
The connection between a device, an event ID, the LPI number and the associated CPU is stored in in-memory tables in a GICv3, but their format is not specified by the spec. Instead software uses a command queue in a ring buffer to let an ITS implementation use its own format. Implement handlers for

[XEN PATCH v2 04/25] arm: new VGIC: Add GICv3 CTLR, IIDR, TYPER handlers

2023-11-10 Thread Mykyta Poturai
As in the GICv2 emulation we handle those three registers in one function. Based on Linux commit fd59ed3be17e41 by Andre Przywara Signed-off-by: Mykyta Poturai --- xen/arch/arm/include/asm/gic_v3_defs.h | 2 + xen/arch/arm/vgic/vgic-mmio-v3.c | 71 +- xen/arch/arm

[XEN PATCH v2 00/25] arm: Add GICv3 support to the New VGIC

2023-11-10 Thread Mykyta Poturai
Hi All. This series aims to add GICv3 support to the New VGIC. It adds support for the GICv3 distributor, redistributor, sysreg and ITS interfaces. This will allow Xen to emulate level-triggered interrupts with GICv3 and will make the NEW_VGIC more complete and usable. The series also introduces

[XEN PATCH v2 24/25] arm: new VGIC: its: Wire new ITS into the build system

2023-11-10 Thread Mykyta Poturai
Add vgic-its.o to the build system. Remove the dependency on !NEW_VGIC from CONFIG_HAS_ITS. Signed-off-by: Mykyta Poturai --- xen/arch/arm/Kconfig | 4 ++-- xen/arch/arm/vgic/Makefile | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/

[XEN PATCH v2 07/25] arm: new VGIC: Add GICv3 IROUTER register handlers

2023-11-10 Thread Mykyta Poturai
Since GICv3 supports much more than the 8 CPUs the GICv2 ITARGETSR register can handle, the new IROUTER register covers the whole range of possible target (V)CPUs by using the same MPIDR that the cores report themselves. In addition to translating this MPIDR into a vcpu pointer we store the origina

[XEN PATCH v2 05/25] arm: new VGIC: Add GICv3 redistributor IIDR and TYPER handler

2023-11-10 Thread Mykyta Poturai
The redistributor TYPER tells the OS about the associated MPIDR, also the LAST bit is crucial to determine the number of redistributors. Based on Linux commit 741972d8a69ce74 by Andre Przywara Signed-off-by: Mykyta Poturai --- xen/arch/arm/vgic/vgic-mmio-v3.c | 65 ++

[XEN PATCH v2 18/25] arm: new VGIC: its: Allow updates of LPI configuration table

2023-11-10 Thread Mykyta Poturai
The (system-wide) LPI configuration table is held in a table in (guest) memory. To achieve reasonable performance, we cache this data in our struct vgic_irq. If the guest updates the configuration data (which consists of the enable bit and the priority value), it issues an INV or INVALL command to

[XEN PATCH v2 15/25] arm: new VGIC: its: Introduce ITS device list

2023-11-10 Thread Mykyta Poturai
Add the vgic_its_device structure and the list of devices to the vgic_its. Implement the functions to allocate, free, add and delete the device from the list. Add the function to find the device in the list by the device id. And make them avaliable to the HW ITS code. Signed-off-by: Mykyta Poturai

[XEN PATCH v2 03/25] arm: new VGIC: Add GICv3 MMIO handling framework

2023-11-10 Thread Mykyta Poturai
Create a new file called vgic-mmio-v3.c and describe the GICv3 distributor and redistributor registers there. Also we provide a function to deal with the registration of the separate redistributor frames per VCPU and allocation of redistributor regions. Based on Linux commits: ed9b8cefa91695 by An

[XEN PATCH v2 19/25] arm: new VGIC: its: Add LPI translation cache definition

2023-11-10 Thread Mykyta Poturai
Add the basic data structure that expresses an MSI to LPI translation as well as the allocation/release hooks. Implement cache invalidation, lookup and storage. The size of the cache is arbitrarily defined as 16*nr_vcpus. This is based on Linux commits 24cab82c34aa6f, 7d825fd6eaa7467, 89489ee9ce

[XEN PATCH v2 14/25] arm: new VGIC: its: Introduce ITS emulation file with MMIO framework

2023-11-10 Thread Mykyta Poturai
The ARM GICv3 ITS emulation code goes into a separate file, but needs to be connected to the GICv3 emulation, of which it is an option. The ITS MMIO handlers require the respective ITS pointer to be passed in, so we amend the existing VGIC MMIO framework to let it cope with that. Also we introduce

[XEN PATCH v2 09/25] arm: new VGIC: vgic_init: implement map_resources

2023-11-10 Thread Mykyta Poturai
map_resources is the last initialization step needed before the first VCPU is run. At that stage the code stores the MMIO base addresses used. Also it registers the respective register frames with the MMIO framework. This is based on Linux commit b0442ee227e826af by Eric Auger Signed-off-by: Myky

[XEN PATCH v2 22/25] arm: new VGIC: its: Implement MMIO-based LPI invalidation

2023-11-10 Thread Mykyta Poturai
Since GICv4.1, it has become legal for an implementation to advertise GICR_{INVLPIR,INVALLR,SYNCR} while having an ITS, allowing for a more efficient invalidation scheme (no guest command queue contention when multiple CPUs are generating invalidations). Provide the invalidation registers as a pri

[XEN PATCH v2 23/25] arm: new VGIC: its: Enable ITS emulation as a virtual MSI controller

2023-11-10 Thread Mykyta Poturai
Now that all ITS emulation functionality is in place, we advertise the ITS device to the guest. Based on Linux commit 0e4e82f154e38 by Andre Przywara Signed-off-by: Mykyta Poturai --- xen/arch/arm/vgic/vgic-init.c| 7 + xen/arch/arm/vgic/vgic-its.c | 2 +- xen/arch/arm/vgic/vgic-m

[XEN PATCH v2 01/25] arm: vgic: its: Decouple HW and virtual ITS

2023-11-10 Thread Mykyta Poturai
HW its directly uses struct pending_irq which makes it hard to swich to a different VITS implementation if it doesn't use the same structure. Rename struct its_device to struct vgic_its_device and move it to vgic.h, so it can be defined by the VITS implementation. Add helper functions to allow HW

[XEN PATCH v2 08/25] arm: new VGIC: Add GICv3 SGI system register trap handler

2023-11-10 Thread Mykyta Poturai
In contrast to GICv2 SGIs in a GICv3 implementation are not triggered by a MMIO write, but with a system register write. Xen knows about that register already, we just need to implement the handler and wire it up to the core Xen/ARM code. Base on Linux commit 621ecd8d2123bc13 by Andre Przywara Si

[XEN PATCH v2 21/25] arm: new VGIC: its: Implement MSI injection in ITS emulation

2023-11-10 Thread Mykyta Poturai
Implement handling of the ITS INT command. With the help of the IO bus framework we learn the corresponding ITS from the doorbell address. We then use our wrapper functions to iterate the linked lists and find the proper Interrupt Translation Table Entry (ITTE) and thus the corresponding struct vgi

[XEN PATCH v2 06/25] arm: new VGIC: Add GICv3 IDREGS register handler

2023-11-10 Thread Mykyta Poturai
We implement the only one ID register that is required by the architecture, also this is the one that Linux actually checks. Based on Linux commit 54f59d2b3a0a3d by Andre Przywara Signed-off-by: Mykyta Poturai --- xen/arch/arm/vgic/vgic-mmio-v3.c | 17 +++-- 1 file changed, 15 inser

[XEN PATCH v2 16/25] arm: new VGIC: its: Implement basic ITS register handlers

2023-11-10 Thread Mykyta Poturai
Add emulation for some basic MMIO registers used in the ITS emulation. This includes: - GITS_{CTLR,TYPER,IIDR} - ID registers - GITS_{CBASER,CREADR,CWRITER} (which implement the ITS command buffer handling) - GITS_BASER The registers holding base addresses and attributes are sanitised before stori

[XEN PATCH v2 02/25] arm: new VGIC: Add GICv3 world switch backend

2023-11-10 Thread Mykyta Poturai
As the GICv3 virtual interface registers differ from their GICv2 siblings, we need different handlers for processing maintenance interrupts and reading/writing to the LRs. Implement the respective handler functions and connect them to existing code to be called if the host is using a GICv3. This i

[XEN PATCH v2 25/25] arm: new VGIC: Improve MMIO handling

2023-11-10 Thread Mykyta Poturai
Currently the full register address is used in VGIC MMIO handlers. This can cause issues when VGIC_ADDR_TO_IRQ_MASK overlaps with the base address. For example the current GUEST_GICV3_GICD_BASE overlaps with addr to irq mask for 64 bit registers, causing intids to be calculated incorrectly. This p

[XEN PATCH v2 11/25] arm: new VGIC: Add alternative redist region storage

2023-11-10 Thread Mykyta Poturai
Guests DT creation requires redist regions to be stored in the specific variables in struct vgic_dist. But in new VGIC a linked list is used for that. To not clutter the DT creation code with ifdefs, add alternative storage for redist regions in struct vgic_dist. Signed-off-by: Mykyta Poturai ---

[XEN PATCH v2 17/25] arm: new VGIC: its: Read initial LPI pending table

2023-11-10 Thread Mykyta Poturai
The LPI pending status for a GICv3 redistributor is held in a table in (guest) memory. To achieve reasonable performance, we cache the pending bit in our struct vgic_irq. The initial pending state must be read from guest memory upon enabling LPIs for this redistributor. As we can't access the guest

  1   2   >