Re: [PATCH 1/2] xen/arm32: head: Rework how the fixmap and early UART mapping are prepared

2023-11-01 Thread Henry Wang
Hi Julien, > On Nov 2, 2023, at 07:30, Julien Grall wrote: > > From: Julien Grall > > Since commit 5e213f0f4d2c ("xen/arm32: head: Widen the use of the > temporary mapping"), boot_second (used to cover regions like Xen and > the fixmap) will not be mapped if the identity mapping overlap. > >

Re: [PATCH v8 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-11-01 Thread Henry Wang
Hi Julien, > On Nov 2, 2023, at 02:34, Julien Grall wrote: > > Hi Henry, > > On 23/10/2023 03:13, Henry Wang wrote: >> From: Penny Zheng >> Current P2M implementation is designed for MMU system only. >> We move the MMU-specific codes into mmu/p2m.c, and only keep generic >> codes in p2m.c, lik

Re: [PATCH for-4.18] x86/time: Fix UBSAN failure in __update_vcpu_system_time()

2023-11-01 Thread Henry Wang
Hi Andrew, > On Nov 2, 2023, at 04:37, Andrew Cooper wrote: > > As reported: > > (XEN) > > (XEN) UBSAN: Undefined behaviour in arch/x86/time.c:1542:32 > (XEN) member access within null pointer of type 'union vc

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

2023-11-01 Thread osstest service owner
flight 183648 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183648/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-examine 8 reboot fail REGR. vs. 183617 test-arm64-arm64-xl

Re: [XEN PATCH][for-4.19 v6 2/8] x86: add deviation for asm-only functions

2023-11-01 Thread Julien Grall
Hi Stefano, On 01/11/2023 23:10, Stefano Stabellini wrote: On Wed, 1 Nov 2023, Nicola Vetrini wrote: As stated in rules.rst, functions used only in asm modules are allowed to have no prior declaration visible when being defined, hence these functions are marked with an 'asmlinkage' macro, which

Re: [QEMU][PATCH v1] Xen: Fix xen_set_irq() and xendevicemodel_set_irq_level()

2023-11-01 Thread Stefano Stabellini
On Wed, 1 Nov 2023, Vikram Garhwal wrote: > Remove '=' from 'if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500'. > Because xendevicemodel_set_irq_level() was introduced in 4.15 version. > > Also, update xendevicemodel_set_irq_level() to return -1 for older versions. > > Signed-off-by: Vikram Garhwal

[PATCH 0/2] xen/arm32: Improve logging during early boot

2023-11-01 Thread Julien Grall
From: Julien Grall Hi all, This small series is based on some debugging I added while investigating f5a49eb7f8b3 ("xen/arm32: head: Add mising isb in switch_to_runtime_mapping()"). This will make easier to narrow down where the CPU is stuck while enabling the MMU. Julien Grall (2): xen/arm32

[PATCH 2/2] xen/arm32: head: Improve logging in head.S

2023-11-01 Thread Julien Grall
From: Julien Grall The sequence to enable the MMU on arm32 is quite complex as we may need to jump to a temporary mapping to map Xen. Recently, we had one bug in the logic (see f5a49eb7f8b3 ("xen/arm32: head: Add mising isb in switch_to_runtime_mapping()") and it was a pain to debug because ther

[PATCH 1/2] xen/arm32: head: Rework how the fixmap and early UART mapping are prepared

2023-11-01 Thread Julien Grall
From: Julien Grall Since commit 5e213f0f4d2c ("xen/arm32: head: Widen the use of the temporary mapping"), boot_second (used to cover regions like Xen and the fixmap) will not be mapped if the identity mapping overlap. So it is ok to prepare the fixmap table and link it in boot_second earlier. Wi

Re: Imagebuilder can't compute correctly the memory addresses of our images

2023-11-01 Thread Stefano Stabellini
Hi Mario, Replies inline below On Wed, 1 Nov 2023, Mario Marietto wrote: > Hello to everyone. > > We are a team of linux enthusiasts who are trying to boot Xen on a Samsung > XE303C12 Chromebook aka "snow" , following the suggestions in > the slide show presentation here: > > https://www.slid

Re: [XEN PATCH][for-4.19 v6 3/8] x86: add asmlinkage macro to variables only used in asm code

2023-11-01 Thread Stefano Stabellini
On Wed, 1 Nov 2023, Nicola Vetrini wrote: > To avoid a violation of MISRA C:2012 Rule 8.4, as permitted > by docs/misra/rules.rst. > > The current_stack_pointer is a declaration: mark it as such > for ECLAIR. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini

Re: [XEN PATCH][for-4.19 v6 2/8] x86: add deviation for asm-only functions

2023-11-01 Thread Stefano Stabellini
On Wed, 1 Nov 2023, Nicola Vetrini wrote: > As stated in rules.rst, functions used only in asm modules > are allowed to have no prior declaration visible when being > defined, hence these functions are marked with an > 'asmlinkage' macro, which is then deviated for MISRA C:2012 > Rule 8.4. > > Sig

[QEMU][PATCH v1] Xen: Fix xen_set_irq() and xendevicemodel_set_irq_level()

2023-11-01 Thread Vikram Garhwal
Remove '=' from 'if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500'. Because xendevicemodel_set_irq_level() was introduced in 4.15 version. Also, update xendevicemodel_set_irq_level() to return -1 for older versions. Signed-off-by: Vikram Garhwal --- hw/arm/xen_arm.c| 4 +++- include/hw

Re: [GIT PULL] xen: branch for v6.7-rc1

2023-11-01 Thread pr-tracker-bot
The pull request you sent on Sat, 28 Oct 2023 17:55:24 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.7-rc1-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/ca995ce438cc641c47d4b8e4abeb1878a3d07c5f Thank you! -- Deet-doot-dot, I

[PATCH for-4.18] x86/time: Fix UBSAN failure in __update_vcpu_system_time()

2023-11-01 Thread Andrew Cooper
As reported: (XEN) (XEN) UBSAN: Undefined behaviour in arch/x86/time.c:1542:32 (XEN) member access within null pointer of type 'union vcpu_info_t' (XEN) [ Xen-4.19-unstable x86_64 debug=y ubsan=y Not t

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

2023-11-01 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:34 AM Juergen Gross wrote: > > Add the code for connecting to frontends to xenlogd. > > Signed-off-by: Juergen Gross > diff --git a/tools/xenlogd/xenlogd.c b/tools/xenlogd/xenlogd.c > index 792d1026a3..da0a09a122 100644 > --- a/tools/xenlogd/xenlogd.c > +++ b/tools/xenlo

[PATCH 1/2] x86/vmx: Fix IRQ handling for EXIT_REASON_INIT

2023-11-01 Thread Andrew Cooper
When receiving an INIT, a prior bugfix tried to ignore the INIT and continue onwards. Unfortunately it's not safe to return at that point in vmx_vmexit_handler(). Just out of context in the first hunk is a local_irqs_enabled() which is depended-upon by the return-to-guest path, causing the followi

[PATCH 2/2] x86/vmx: Disallow the use of inactivity states

2023-11-01 Thread Andrew Cooper
Right now, vvmx will blindly copy L12's ACTIVITY_STATE into the L02 VMCS and enter the vCPU. Luckily for us, nested-virt is explicitly unsupported for security bugs. The inactivity states are HLT, SHUTDOWN and WAIT-FOR-SIPI, and as noted by the SDM in Vol3 27.7 "Special Features of VM Entry":

[PATCH 0/2] x86/vmx: Multiple fixes

2023-11-01 Thread Andrew Cooper
Fixes for two bugs initially reported to the Xen Security Team, but determined not have an impact in security-supported configurations. The Xen Security Team would like to thank Ishiisan for engaging in responsible disclsoure. As a reminder to the rest of the Xen community, please do ask you're n

Re: [PATCH v2 3/5] arm/dom0less: put dom0less feature code in a separate module

2023-11-01 Thread Julien Grall
Hi Luca, On 27/09/2023 15:01, Luca Fancellu wrote: Currently the dom0less feature code is mostly inside domain_build.c and setup.c, it is a feature that may not be useful to everyone so put the code in a different compilation module in order to make it easier to disable the feature in the future

Re: [PATCH v2 2/5] xen/arm: Add asm/domain.h include to kernel.h

2023-11-01 Thread Julien Grall
Hi Luca, On 27/09/2023 15:01, Luca Fancellu wrote: The 'enum domain_type' is defined by 'asm/domain.h' which is not included (directly or indirectly) by 'asm/kernel.h'. This currently doesn't break the compilation because asm/domain.h will included by the user of 'kernel.h'. But it would be bet

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

2023-11-01 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 10:27 AM Juergen Gross wrote: > > Add "xenlogd", a new logging daemon meant to support infrastructure > domains (e.g. xenstore-stubdom) to write log files in dom0. As I understand it, your new daemon is a generic 9pfs backend, which you use for logging. I think naming it s

Re: [PATCH v8 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-11-01 Thread Julien Grall
Hi Henry, On 23/10/2023 03:13, Henry Wang wrote: From: Penny Zheng Current P2M implementation is designed for MMU system only. We move the MMU-specific codes into mmu/p2m.c, and only keep generic codes in p2m.c, like VMID allocator, etc. We also move MMU-specific definitions and declarations t

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

2023-11-01 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 7:24 AM Juergen Gross wrote: > > 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 ++ >

[xen-unstable test] 183645: tolerable trouble: fail/pass/starved - PUSHED

2023-11-01 Thread osstest service owner
flight 183645 xen-unstable real [real] flight 183650 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183645/ http://logs.test-lab.xenproject.org/osstest/logs/183650/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armh

[libvirt test] 183647: tolerable all pass - PUSHED

2023-11-01 Thread osstest service owner
flight 183647 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/183647/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 183567 test-armhf-armhf-libvirt-qcow2 15 saveres

[ovmf test] 183649: all pass - PUSHED

2023-11-01 Thread osstest service owner
flight 183649 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183649/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf fbbbd984998d83cf6b69e9291336aefbac23396c baseline version: ovmf 1b1509abee839b74d3232

Re: [PATCH 2/3] Mini-OS: don't crash if no shutdown node is available

2023-11-01 Thread Andrew Cooper
On 01/11/2023 4:42 pm, Juergen Gross wrote: > On 01.11.23 17:38, Andrew Cooper wrote: >> On 01/11/2023 9:00 am, Juergen Gross wrote: >>> It might be perfectly fine not to have a control/shutdown Xenstore >>> node. If this is the case, don't crash, but just terminate the >>> shutdown thread after is

Re: [PATCH 21/29] tools: tell xenstore-stubdom its own domid

2023-11-01 Thread Andrew Cooper
On 01/11/2023 9:33 am, Juergen Gross wrote: > Pass the domid as a boot parameter when starting xenstore-stubdom. > It will be needed to administrate its own Xenstore entries. > > Signed-off-by: Juergen Gross I'm going to fix this differently. Because I'm utterly sick and tired of the absurd posi

Re: [PATCH 2/3] Mini-OS: don't crash if no shutdown node is available

2023-11-01 Thread Juergen Gross
On 01.11.23 17:38, Andrew Cooper wrote: On 01/11/2023 9:00 am, Juergen Gross wrote: It might be perfectly fine not to have a control/shutdown Xenstore node. If this is the case, don't crash, but just terminate the shutdown thread after issuing a message that shutdown isn't available. In fini_sh

Re: [PATCH 2/3] Mini-OS: don't crash if no shutdown node is available

2023-11-01 Thread Andrew Cooper
On 01/11/2023 9:00 am, Juergen Gross wrote: > It might be perfectly fine not to have a control/shutdown Xenstore > node. If this is the case, don't crash, but just terminate the > shutdown thread after issuing a message that shutdown isn't available. > > In fini_shutdown() clearing the watch can re

Re: [PATCH] stubdom: remove caml-stubdom

2023-11-01 Thread Andrew Cooper
On 01/11/2023 4:08 pm, Juergen Gross wrote: > In order to build caml-stubdom, it must be explicitly enabled via > "configure --enable-caml-stubdom". The build process is failing due to > stubdom/ocaml.patch failing to apply. Since the patched file has been > modified in 2014 the last time, it seems

[PATCH] stubdom: remove caml-stubdom

2023-11-01 Thread Juergen Gross
In order to build caml-stubdom, it must be explicitly enabled via "configure --enable-caml-stubdom". The build process is failing due to stubdom/ocaml.patch failing to apply. Since the patched file has been modified in 2014 the last time, it seems nobody cares for caml-stubdom since at least then.

[PATCH 2/2] Mini-OS: keep a positive list of externally visible symbols

2023-11-01 Thread Juergen Gross
Add a mini-os.map file containing all global symbols that are allowed to be referenced by an application or library. Hide all other symbols of Mini-OS from being visible externally. The symbols in mini-os.map have been obtained via building all defined and not failing stubdoms (caml-stubdom doesn'

[PATCH 0/2] Mini-OS: hide mini-os internal symbols

2023-11-01 Thread Juergen Gross
In order to avoid conflicts due to symbols with the same name when linking Mini-OS with an application, hide all Mini9-OS internal symbols from the application by linking the Mini-OS kernel individually and then removing all symbols which should be used internally only. Juergen Gross (2): Mini-O

[PATCH 1/2] Mini-OS: link kernel separately

2023-11-01 Thread Juergen Gross
Add an additional link step with linking all Mini-OS kernel binaries into a single object file. This is done in preparation of hiding Mini-OS internal symbols before linking the kernel with libraries and an application. Signed-off-by: Juergen Gross --- Makefile | 7 +-- 1 file changed, 5 in

[PATCH v4] acpi/processor: sanitize _OSC/_PDC capabilities for Xen dom0

2023-11-01 Thread Jason Andryuk
From: Roger Pau Monne The Processor capability bits notify ACPI of the OS capabilities, and so ACPI can adjust the return of other Processor methods taking the OS capabilities into account. When Linux is running as a Xen dom0, the hypervisor is the entity in charge of processor power management,

Re: [PATCH 3/3] Mini-OS: fix 9pfs stat receive format

2023-11-01 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:14 AM Juergen Gross wrote: > > The format string of the received data for the 9pfs stat command is > missing the initial 2 byte total length specifier. Add it. > > Fixes: 2d1dfccd3aa3 ("Mini-OS: add read and write support to 9pfsfront") > Signed-off-by: Juergen Gross > --

Re: [PATCH 2/3] Mini-OS: don't crash if no shutdown node is available

2023-11-01 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:06 AM Juergen Gross wrote: > > It might be perfectly fine not to have a control/shutdown Xenstore > node. If this is the case, don't crash, but just terminate the > shutdown thread after issuing a message that shutdown isn't available. > > In fini_shutdown() clearing the w

Re: [PATCH 1/3] Mini-OS: make xenstore_buf externally visible

2023-11-01 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 6:13 AM Juergen Gross wrote: > > For support of the 9pfs frontend in Xenstore-stubdom xenstore_buf > needs to be externally visible. > > Signed-off-by: Juergen Gross xenstore_buf will be used by the xen.git patch "[PATCH 24/29] tools/xenstored: map stubdom interface". Rev

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

2023-11-01 Thread Mario Marietto
Hi Marek, I would like to recompile and install the kernel 6.6 on my ARM Chromebook. I would like to know if your patch has been accepted and included there. Thanks. On Wed, Nov 1, 2023 at 8:48 AM Chuck Zmudzinski wrote: > > On 10/31/2023 8:08 AM, Marek Szyprowski wrote: > > Hi, > > > > On 31.10

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

2023-11-01 Thread osstest service owner
flight 183644 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183644/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-examine 8 reboot fail REGR. vs. 183617 test-arm64-arm64-li

Re: [PATCH v8 3/8] xen/arm: Fold mmu_init_secondary_cpu() to head.S

2023-11-01 Thread Henry Wang
Hi Julien, > On Nov 1, 2023, at 20:05, Julien Grall wrote: >>> >>> While debugging an MMU issue on Arm32, I wrote a patch to sprinkle prints >>> in the enable_mmu() code. I will clean-up the patch and send it. >> Just to make sure, your patch is for both Arm32 and Arm64, is my >> understanding

Re: [PATCH v8 3/8] xen/arm: Fold mmu_init_secondary_cpu() to head.S

2023-11-01 Thread Julien Grall
On 01/11/2023 01:58, Henry Wang wrote: Hi Julien, Hi, On Nov 1, 2023, at 02:29, Julien Grall wrote: Hi Henry, +Ayan On 23/10/2023 03:13, Henry Wang wrote: Currently mmu_init_secondary_cpu() only enforces the page table should not contain mapping that are both Writable and eXecutables aft

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

2023-11-01 Thread Julien Grall
Hi Juergen, On 01/11/2023 11:08, Juergen Gross wrote: On 01.11.23 11:44, Julien Grall wrote: Hi Juergen, On 01/11/2023 09:33, Juergen Gross wrote: Rename the xenbus_evtchn() function to get_xenbus_evtchn() in order to avoid two externally visible symbols with the same name when Xenstore- stub

Xen 4.18 rc5

2023-11-01 Thread Henry Wang
Hi all, Xen 4.18 rc5 is tagged. You can check that out from xen.git: git://xenbits.xen.org/xen.git 4.18.0-rc5 For your convenience there is also a tarball at: https://downloads.xenproject.org/release/xen/4.18.0-rc5/xen-4.18.0-rc5.tar.gz And the signature is at: https://downloads.xenproject.org/

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

2023-11-01 Thread Juergen Gross
On 01.11.23 11:44, Julien Grall wrote: Hi Juergen, On 01/11/2023 09:33, Juergen Gross wrote: 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

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

2023-11-01 Thread Julien Grall
Hi Juergen, On 01/11/2023 09:33, Juergen Gross wrote: 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. This works right now, but what guarant

[PATCH] xen: avoid generation of stub header

2023-11-01 Thread Oleksii Kurochko
Platforms which doesn't have HAS_PCI enabled it is needed to have , which contains only an empty definition of struct arch_pci_dev ( except ARM, it introduces several ARM-specific functions ). Also, for architectures ( such as PPC or RISC-V ) on initial stages of adding support, it is needed to ge

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

2023-11-01 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(). For filling the qid data take the approach from the qemu 9pfs backend implementation. Signed-off-by: Juerge

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

2023-11-01 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 --- tools/xe

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

2023-11-01 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 --- tools/xenstored/control.c | 27 +++ 1 file changed, 7 insertions(+), 20 deleti

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

2023-11-01 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/tools/xenlogd/io.c b/tools/xenlogd/io.c index 6e92667fab..6b4692ca67 100644 --- a/tools/xenlogd/io.c

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

2023-11-01 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 08/29] tools/xenlogd: add 9pfs walk request support

2023-11-01 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 138 tools/xenlogd/xenlogd.h | 1 + 2 files changed, 139 insertions(+) diff --git a/tools/xenlogd/io.c b/tools/xenlogd/io.c index fa825c9f39..778e1dc2

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

2023-11-01 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 --- tools/helpers/init-xenstore-domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/helpers/init-xenstore-doma

[PATCH 16/29] tools/xl: support new 9pfs backend xenlogd

2023-11-01 Thread Juergen Gross
Add support for the new 9pfs backend "xenlogd". For this backend type the tag defaults to "Xen" and the host side path to "/var/log/xen/guests/". Signed-off-by: Juergen Gross --- docs/man/xl.cfg.5.pod.in | 36 ++-- tools/xl/xl_parse.c | 35 +++

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

2023-11-01 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 37 + 1 file changed, 37 insertions(+) diff --git a/tools/xenlogd/io.c b/tools/xenlogd/io.c index c2b259f42e..2607095e51 100644 --- a/tools/xenlogd/io.c +++ b/to

[PATCH 22/29] tools/xenstored:

2023-11-01 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 09/29] tools/xenlogd: add 9pfs open request support

2023-11-01 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 130 tools/xenlogd/xenlogd.h | 4 ++ 2 files changed, 134 insertions(+) diff --git a/tools/xenlogd/io.c b/tools/xenlogd/io.c index 778e1dc2c9..c2b259f

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

2023-11-01 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 "xenlogd" with the related Xenstore backend-side directory "xen_9pfs". As additional security features it is possible to specify: - "max-spa

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

2023-11-01 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 27/29] tools/xenstored: add daemon_init() function

2023-11-01 Thread Juergen Gross
Some xenstored initialization needs to be done in the daemon case only, so split it out into a new daemon_init() function being a stub in the stubdom case. Signed-off-by: Juergen Gross --- tools/xenstored/core.c | 6 +- tools/xenstored/core.h | 1 + tools/xenstored/minios.c | 4

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

2023-11-01 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 --- tools/xenstored/core.h | 2 +- tools/xenstored/domain.c |

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

2023-11-01 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 --- stubdom/xenstore-minios.cfg| 2 +- stubdom/xenstorepvh-minios.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

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

2023-11-01 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 --- tools/hotplug/Linux/launch-xenstore.in | 1 + too

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

2023-11-01 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 = "xenlogd" - path = "/var/lib/xen/xenstore" For now don't limit allowed file space or number of files. Add a new libxl function

[PATCH 21/29] tools: tell xenstore-stubdom its own domid

2023-11-01 Thread Juergen Gross
Pass the domid as a boot parameter when starting xenstore-stubdom. It will be needed to administrate its own Xenstore entries. Signed-off-by: Juergen Gross --- tools/helpers/init-xenstore-domain.c | 4 ++-- tools/xenstored/core.c | 9 + tools/xenstored/core.h

[PATCH 24/29] tools/xenstored: map stubdom interface

2023-11-01 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 25/29] tools/xenstored: mount 9pfs device in stubdom

2023-11-01 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 --- tools/xenstored/core.h | 5 + tools/xenstored/domain.c | 2 ++ tools/x

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

2023-11-01 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 --- tools/xenlogd/io.c | 60 ++ 1 file changed, 60 insertions(+) diff --git a/tools/xenlogd/io.c b/tools/xenlogd/io.c i

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

2023-11-01 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 133 + 1 file changed, 133 insertions(+) diff --git a/tools/xenlogd/io.c b/tools/xenlogd/io.c index 2607095e51..34f137be1b 100644 --- a/tools/xenlogd/io

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

2023-11-01 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/tools/xenlogd/io.c b/tools/xenlogd/io.c index 34f137be1b..6e92667fab 100644 --- a/tools/xenlogd/io.c

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

2023-11-01 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 02/29] tools: add a new xen logging daemon

2023-11-01 Thread Juergen Gross
Add "xenlogd", a new logging daemon meant to support infrastructure domains (e.g. xenstore-stubdom) to write log files in dom0. For now only add the code needed for starting the daemon and registering it with Xenstore via a new "/tool/xenlog/state" node by writing the "running" state to it. Signe

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

2023-11-01 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 03/29] tools/xenlogd: connect to frontend

2023-11-01 Thread Juergen Gross
Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross --- tools/xenlogd/Makefile | 2 +- tools/xenlogd/io.c | 45 tools/xenlogd/xenlogd.c | 575 +++- tools/xenlogd/xenlogd.h | 50 4 files changed, 668 insertions(

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

2023-11-01 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 01/29] xen/public: add some more 9pfs xenstore paths

2023-11-01 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/

Re: [XEN PATCH][for-4.19 v6 0/8] Fix or deviate various instances of missing declarations

2023-11-01 Thread Nicola Vetrini
On 2023-11-01 10:15, Nicola Vetrini wrote: The patches in this series aim to fix or deviate various instances where a function or variable do not have a declaration visible when such entity is defined (in violation of MISRA C:2012 Rule 8.4). An exception listed under docs/misra/rules.rst allows

[XEN PATCH][for-4.19 v6 8/8] docs/misra: exclude three more files

2023-11-01 Thread Nicola Vetrini
These files should not conform to MISRA guidelines at the moment, therefore they are added to the exclusion list. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- These exclusions are automatically picked up by ECLAIR's automation to hide reports originating from these files. C

[XEN PATCH][for-4.19 v6 4/8] x86/grant: switch included header to make declarations visible

2023-11-01 Thread Nicola Vetrini
The declarations for {create,replace}_grant_p2m_mapping are not visible when these functions are defined, therefore the right header needs to be included to allow them to be visible. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- Changes in v3: - asm/pag

[XEN PATCH][for-4.19 v6 6/8] xen/console: remove stub definition in consoled.h

2023-11-01 Thread Nicola Vetrini
The stub definition of 'consoled_guest_tx' can be removed, since its its single caller uses the implementation built with PV_SHIM enabled. Fixes: 5ef49f185c2d ("x86/pv-shim: shadow PV console's page for L2 DomU") Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/include/xen

[XEN PATCH][for-4.19 v6 2/8] x86: add deviation for asm-only functions

2023-11-01 Thread Nicola Vetrini
As stated in rules.rst, functions used only in asm modules are allowed to have no prior declaration visible when being defined, hence these functions are marked with an 'asmlinkage' macro, which is then deviated for MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini --- Changes in v3: - added S

[XEN PATCH][for-4.19 v6 7/8] x86/mem_access: make function static

2023-11-01 Thread Nicola Vetrini
The function is used only within this file, and therefore can be static. No functional change. Signed-off-by: Nicola Vetrini Acked-by: Tamas K Lengyel --- Changes in v3: - style fix --- xen/arch/x86/mm/mem_access.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/a

[XEN PATCH][for-4.19 v6 5/8] x86/vm_event: add missing include for hvm_vm_event_do_resume

2023-11-01 Thread Nicola Vetrini
The missing header makes the declaration visible when the function is defined, thereby fixing a violation of MISRA C:2012 Rule 8.4. Fixes: 1366a0e76db6 ("x86/vm_event: add hvm/vm_event.{h,c}") Signed-off-by: Nicola Vetrini Acked-by: Tamas K Lengyel --- xen/arch/x86/hvm/vm_event.c | 1 + 1 file

[XEN PATCH][for-4.19 v6 3/8] x86: add asmlinkage macro to variables only used in asm code

2023-11-01 Thread Nicola Vetrini
To avoid a violation of MISRA C:2012 Rule 8.4, as permitted by docs/misra/rules.rst. The current_stack_pointer is a declaration: mark it as such for ECLAIR. Signed-off-by: Nicola Vetrini --- Changes in v3: - Edited commit message - Add two new variables Changes in v5: - Mark current_stack_pointe

[XEN PATCH][for-4.19 v6 1/8] xen: modify or add declarations for variables where needed

2023-11-01 Thread Nicola Vetrini
Some variables with external linkage used in C code do not have a visible declaration where they are defined. Other variables can be made static, thereby eliminating the need for a declaration. Doing so also resolves violations of MISRA C:2012 Rule 8.4. Fix typo s/mcinfo_dumpped/mcinfo_dumped/ whi

Re: [PATCH v4 0/5] Kconfig for PCI passthrough on ARM

2023-11-01 Thread Christian Lindig
> On 30 Oct 2023, at 23:52, Stewart Hildebrand > wrote: > > There are multiple series in development/review [1], [2] that will benefit > from > having a Kconfig option for PCI passthrough on ARM. Hence I have sent this > series independent from any other series. > > v3->v4: > * rename ("xen

Re: [RFC PATCH 02/22] x86/msr: implement MSR_SMI_COUNT for Dom0 on Intel

2023-11-01 Thread Edwin Torok
> On 31 Oct 2023, at 09:57, Jan Beulich wrote: > > On 31.10.2023 10:42, Edwin Torok wrote: >>> On 30 Oct 2023, at 16:20, Jan Beulich wrote: >>> On 25.10.2023 21:29, Edwin Török wrote: Dom0 should always be able to read this MSR: it is useful when investigating performance issues in

[XEN PATCH][for-4.19 v6 0/8] Fix or deviate various instances of missing declarations

2023-11-01 Thread Nicola Vetrini
The patches in this series aim to fix or deviate various instances where a function or variable do not have a declaration visible when such entity is defined (in violation of MISRA C:2012 Rule 8.4). An exception listed under docs/misra/rules.rst allows asm-only functions and variables to be exempte

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

2023-11-01 Thread Julien Grall
On 01/11/2023 08:45, Chuck Zmudzinski wrote: On 11/1/2023 4:27 AM, Julien Grall wrote: Hi, @Stefano, as you pointed out, there is already a thread on xen-users for this discussion. Could we use this thread for any discussion? This would make easier to follow. Some high level comment below.

[PATCH 1/3] Mini-OS: make xenstore_buf externally visible

2023-11-01 Thread Juergen Gross
For support of the 9pfs frontend in Xenstore-stubdom xenstore_buf needs to be externally visible. Signed-off-by: Juergen Gross --- include/xenbus.h | 2 ++ xenbus.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/xenbus.h b/include/xenbus.h index c0fc0ac5..5

[PATCH 2/3] Mini-OS: don't crash if no shutdown node is available

2023-11-01 Thread Juergen Gross
It might be perfectly fine not to have a control/shutdown Xenstore node. If this is the case, don't crash, but just terminate the shutdown thread after issuing a message that shutdown isn't available. In fini_shutdown() clearing the watch can result in an error now, in case the early exit above wa

[PATCH 3/3] Mini-OS: fix 9pfs stat receive format

2023-11-01 Thread Juergen Gross
The format string of the received data for the 9pfs stat command is missing the initial 2 byte total length specifier. Add it. Fixes: 2d1dfccd3aa3 ("Mini-OS: add read and write support to 9pfsfront") Signed-off-by: Juergen Gross --- 9pfront.c | 9 + 1 file changed, 5 insertions(+), 4 del

[PATCH 0/3] Mini-OS: preparations for 9pfs in xenstore-stubdom

2023-11-01 Thread Juergen Gross
This small patch series is doing some preparations for being able to use 9pfs in Xenstore-stubdom. Juergen Gross (3): Mini-OS: make xenstore_buf externally visible Mini-OS: don't crash if no shutdown node is available Mini-OS: fix 9pfs stat receive format 9pfront.c| 9 + i

Re: live migration fails: qemu placing pci devices at different locations

2023-11-01 Thread James Dingwall
On Tue, Oct 31, 2023 at 10:07:29AM +, James Dingwall wrote: > Hi, > > I'm having a bit of trouble performing live migration between hvm guests. The > sending side is xen 4.14.5 (qemu 5.0), receiving 4.15.5 (qemu 5.1). The error > message recorded in qemu-dm---incoming.log: > > qemu-system-i

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

2023-11-01 Thread Chuck Zmudzinski
On 11/1/2023 4:27 AM, Julien Grall wrote: > Hi, > > @Stefano, as you pointed out, there is already a thread on xen-users for > this discussion. Could we use this thread for any discussion? This would > make easier to follow. > > Some high level comment below. I agree to keep the discussion her

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

2023-11-01 Thread Julien Grall
Hi, @Stefano, as you pointed out, there is already a thread on xen-users for this discussion. Could we use this thread for any discussion? This would make easier to follow. Some high level comment below. On 01/11/2023 02:50, Chuck Zmudzinski wrote: On 10/31/2023 7:45 PM, Stefano Stabellini

[ovmf test] 183646: all pass - PUSHED

2023-11-01 Thread osstest service owner
flight 183646 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183646/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 1b1509abee839b74d3232bbd6a256a1bdc230925 baseline version: ovmf ccbe2e938386ed1ec49b3

  1   2   >