Re: [PATCH v3 25/33] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Juergen Gross
On 26.01.24 17:22, Julien Grall wrote: Hi Juergen, On 04/01/2024 09:00, Juergen Gross wrote: All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch ---  

Re: [XEN PATCH 4/9] x86/smp: move stack_base to cpu_data

2024-02-05 Thread Jan Beulich
On 02.02.2024 19:24, Julien Grall wrote: > On 14/11/2023 17:50, Krystian Hebel wrote: >> This location is easier to access from assembly. Having it close to >> other data required during initialization has also positive (although >> rather small) impact on prefetching data from RAM. > > I

Re: [XEN PATCH 4/9] x86/smp: move stack_base to cpu_data

2024-02-05 Thread Julien Grall
Hi Jan, On 05/02/2024 08:41, Jan Beulich wrote: On 02.02.2024 19:24, Julien Grall wrote: static bool smp_store_cpu_info(unsigned int id) @@ -579,8 +581,6 @@ static int do_boot_cpu(int apicid, int cpu) printk("Booting processor %d/%d eip %lx\n", cpu, apicid,

Re: [PATCH v6 07/15] xen/arm: add support for cache coloring configuration via device-tree

2024-02-05 Thread Michal Orzel
On 05/02/2024 10:39, Jan Beulich wrote: > > > On 03.02.2024 12:43, Carlo Nonato wrote: >> On Thu, Feb 1, 2024 at 3:19 PM Jan Beulich wrote: >>> On 29.01.2024 18:18, Carlo Nonato wrote: @@ -950,6 +951,11 @@ void __init create_domUs(void) #endif } +

Re: [PATCH v6 04/15] xen/arm: add Dom0 cache coloring support

2024-02-05 Thread Carlo Nonato
Hi Jan, On Mon, Feb 5, 2024 at 10:35 AM Jan Beulich wrote: > > On 03.02.2024 12:39, Carlo Nonato wrote: > > On Thu, Feb 1, 2024 at 2:30 PM Jan Beulich wrote: > >> On 29.01.2024 18:18, Carlo Nonato wrote: > >>> --- a/xen/common/llc-coloring.c > >>> +++ b/xen/common/llc-coloring.c > >>> @@ -17,6

[PATCH v4 14/32] tools/xen-9pfsd: add 9pfs read request support

2024-02-05 Thread Juergen Gross
Add the read request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - make error check more readable (Jason Andryuk) V4: - add directory read support --- tools/xen-9pfsd/io.c | 90 1

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

2024-02-05 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: -

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

2024-02-05 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 Reviewed-by: Jason Andryuk ---

[PATCH v4 07/32] tools/xen-9pfsd: add 9pfs attach request support

2024-02-05 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

[PATCH v4 10/32] tools/xen-9pfsd: add 9pfs clunk request support

2024-02-05 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V3: - use unlinkat() (Jason Andryuk) --- tools/xen-9pfsd/io.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/tools/xen-9pfsd/io.c

[PATCH v4 19/32] stubdom: extend xenstore stubdom configs

2024-02-05 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

[PATCH v4 24/32] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Juergen Gross
All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch V4: - make sock local to posix.c (Julien Grall) --- tools/xenstored/Makefile.common | 4 - tools/xenstored/core.c

[PATCH v4 21/32] tools/xenstored: add early_init() function

2024-02-05 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. Remove the call of talloc_enable_leak_report_full(), as it serves no real purpose: the daemon only ever exits due to a crash, in which case a

[PATCH v4 12/32] tools/xen-9pfsd: add 9pfs stat request support

2024-02-05 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V3: - use fstatat() (Jason Andryuk) V4: - add "s" format to fill_buffer() as a preparation for reading dirs --- tools/xen-9pfsd/io.c | 102 +++ 1 file

[PATCH v4 11/32] tools/xen-9pfsd: add 9pfs create request support

2024-02-05 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - set permissions correctly (Jason Andryuk) V3: - use opendirat() etc. (Jason Andryuk) - rework error handling a little bit --- tools/xen-9pfsd/io.c | 151

[PATCH v4 25/32] tools/xenstored: get own domid in stubdom case

2024-02-05 Thread Juergen Gross
Obtain own domid when running as stubdom. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V2: - replacement of V1 patch (Andrew Cooper) V3: - rename called function to get_domid() (Julien Grall) - change stub_domid type to domid_t (Julien Grall) ---

[PATCH v4 13/32] tools/xen-9pfsd: add 9pfs write request support

2024-02-05 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- 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

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

2024-02-05 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

Re: [PATCH v6 10/15] xen: add cache coloring allocator for domains

2024-02-05 Thread Jan Beulich
On 05.02.2024 12:59, Carlo Nonato wrote: > On Thu, Feb 1, 2024 at 4:53 PM Jan Beulich wrote: >> On 29.01.2024 18:18, Carlo Nonato wrote: >>> @@ -157,7 +158,11 @@ >>> #define PGC_static 0 >>> #endif >>> >>> -#define PGC_preserved (PGC_extra | PGC_static) >>> +#ifndef PGC_colored >>> +#define

Re: [PATCH v7 6/7] xen/arm: switch Arm to use asm-generic/device.h

2024-02-05 Thread Oleksii
On Wed, 2024-01-31 at 15:56 +0100, Jan Beulich wrote: > On 26.01.2024 16:42, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > I'm not an Arm maintainer, but if I was I wouldn't let you get away > with > an empty description here. Specifically at least ... > > > ---

[PATCH v3 6/8] IRQ: drop regs parameter from handler functions

2024-02-05 Thread Jan Beulich
It's simply not needed anymore. Note how Linux made this change many years ago already, in 2.6.19 (late 2006, see [1]). Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Acked-by: Julien Grall [1] https://git.kernel.org/torvalds/c/7d12e780e003f93433d49ce78cfedf4b4c52adc5 --- v2: Arm build

[PATCH v3 5/8] serial: drop serial_[rt]x_interrupt()'s regs parameter

2024-02-05 Thread Jan Beulich
They're simply not needed anymore. Signed-off-by: Jan Beulich --- v2: Setting of IRQ regs split off to an earlier patch. --- a/xen/drivers/char/cadence-uart.c +++ b/xen/drivers/char/cadence-uart.c @@ -51,7 +51,7 @@ static void cuart_interrupt(int irq, voi /* ACK. */ if (

[PATCH v3 7/8] x86/APIC: drop regs parameter from direct vector handler functions

2024-02-05 Thread Jan Beulich
The only place it was needed is in the spurious handler, and there we can use get_irq_regs() instead. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1322,7 +1322,7 @@ int reprogram_timer(s_time_t timeout) return apic_tmict ||

[PATCH 4/5] Reduce assembly code size of exception entry points

2024-02-05 Thread Frediano Ziglio
We just pushed a 8-bytes zero and exception constants are small so we can just write a single byte saving 3 bytes for instruction. With ENDBR64 this reduces the size of the entry point from 32 to 16 bytes (due to alignment). Signed-off-by: Frediano Ziglio --- xen/arch/x86/x86_64/entry.S | 16

[PATCH 5/5] Reduce assembly instruction size

2024-02-05 Thread Frediano Ziglio
Use 32 bit versions in all cases, not only for registers till 8th. This reduces the encoding from (example with r14): 49 c7 c6 ff 7f 00 00mov$0x7fff,%r14 to 41 be ff 7f 00 00 mov$0x7fff,%r14d Signed-off-by: Frediano Ziglio --- xen/arch/x86/include/asm/asm_defns.h

Re: [PATCH v4 00/32] tools: enable xenstore-stubdom to use 9pfs

2024-02-05 Thread Julien Grall
Hi Juergen, On 05/02/2024 10:49, Juergen Gross wrote: 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

Re: [PATCH v3 31/34] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-02-05 Thread Oleksii
On Mon, 2024-02-05 at 08:46 +0100, Jan Beulich wrote: > On 02.02.2024 18:30, Oleksii wrote: > > On Tue, 2024-01-23 at 14:03 +0100, Jan Beulich wrote: > > > On 22.12.2023 16:13, Oleksii Kurochko wrote: > > > > +/* Convert between Xen-heap virtual addresses and machine > > > > frame > > > > numbers.

[PATCH v3 0/8] limit passing around of cpu_user_regs

2024-02-05 Thread Jan Beulich
Unlike (synchronous) exception handlers, interrupt handlers don't normally have a need to know the outer context's register state. Similarly, the vast majority of key handlers has no need for such. 1: serial: fake IRQ-regs context in poll handlers 2: keyhandler: drop regs parameter from

Re: [PATCH v3 8/8] consolidate do_bug_frame() / bug_fn_t

2024-02-05 Thread Andrew Cooper
On 05/02/2024 1:32 pm, Jan Beulich wrote: > The type not being used in do_bug_frame() is suspicious. Apparently > that's solely because the type uses a pointer-to-const parameter, > when so far run_in_exception_handler() wanted functions taking pointer- > to-non-const. Expand use of const, in turn

Re: [PATCH v3 25/33] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Julien Grall
Hi Juergen, On 05/02/2024 09:21, Juergen Gross wrote: On 26.01.24 17:22, Julien Grall wrote: Hi Juergen, On 04/01/2024 09:00, Juergen Gross wrote: All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by:

Re: [RFC PATCH] xen/arm: improve handling of load/store instruction decoding

2024-02-05 Thread Julien Grall
Hi Alex, On 31/01/2024 17:50, Alex Bennée wrote: While debugging VirtIO on Arm we ran into a warning due to memory being memcpy'd across MMIO space. While the bug was in the mappings the warning was a little confusing: (XEN) d47v2 Rn should not be equal to Rt except for r31 (XEN) d47v2

[PATCH v4 16/32] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-05 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/". Do most of the default settings in libxl. Unfortunately the default path can't easily be set in libxl, as the domain name isn't available in the

[PATCH v4 22/32] tools/xenstored: move systemd handling to posix.c

2024-02-05 Thread Juergen Gross
Move systemd handling to a new late_init() function in posix.c. This prepares a future removal of the NO_SOCKETS macro. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - new patch --- tools/xenstored/core.c | 17 +

[PATCH v4 08/32] tools/xen-9pfsd: add 9pfs walk request support

2024-02-05 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - don't allow walking across symbolic links --- tools/xen-9pfsd/io.c| 171 tools/xen-9pfsd/xen-9pfsd.h | 1 + 2 files changed, 172

Re: [PATCH v2 (resend) 00/27] Remove the directmap

2024-02-05 Thread Elias El Yandouzi
Hi Jan, On 29/01/2024 08:28, Jan Beulich wrote: On 16.01.2024 20:25, Elias El Yandouzi wrote: Julien Grall (8): xen/vmap: Check the page has been mapped in vm_init_type() xen/vmap: Introduce vmap_size() and use it xen/arm: fixmap: Rename the fixmap slots to follow the x86 convention

Re: [RFC PATCH] xen/arm: improve handling of load/store instruction decoding

2024-02-05 Thread Alex Bennée
Julien Grall writes: > Hi Alex, > > On 31/01/2024 17:50, Alex Bennée wrote: >> While debugging VirtIO on Arm we ran into a warning due to memory >> being memcpy'd across MMIO space. While the bug was in the mappings >> the warning was a little confusing: >>(XEN) d47v2 Rn should not be equal

[xen-unstable test] 184589: tolerable FAIL

2024-02-05 Thread osstest service owner
flight 184589 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/184589/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 184586

Re: [PATCH 1/5] Constify some parameters

2024-02-05 Thread Jan Beulich
On 05.02.2024 12:27, Jan Beulich wrote: > On 05.02.2024 11:45, Frediano Ziglio wrote: >> Make clean they are not changed in the functions. >> >> Signed-off-by: Frediano Ziglio > > For this and the other 4 patches - I didn't see a cover letter; was there > none? Even worse - while there is an

Re: [PATCH v6 10/15] xen: add cache coloring allocator for domains

2024-02-05 Thread Carlo Nonato
Hi Jan, On Thu, Feb 1, 2024 at 4:53 PM Jan Beulich wrote: > > On 29.01.2024 18:18, Carlo Nonato wrote: > > @@ -157,7 +158,11 @@ > > #define PGC_static 0 > > #endif > > > > -#define PGC_preserved (PGC_extra | PGC_static) > > +#ifndef PGC_colored > > +#define PGC_colored 0 > > +#endif > > + > >

Re: [PATCH v7 5/7] xen/asm-generic: introduce generic device.h

2024-02-05 Thread Oleksii
On Wed, 2024-01-31 at 15:54 +0100, Jan Beulich wrote: > On 26.01.2024 16:42, Oleksii Kurochko wrote: > > Arm, PPC and RISC-V use the same device.h thereby device.h > > was moved to asm-generic. > > It's not "move" anymore with the splitting off of the Arm and PPC > parts. For reasons mentioned

[PATCH v3 1/8] serial: fake IRQ-regs context in poll handlers

2024-02-05 Thread Jan Beulich
In preparation of dropping the register parameters from serial_[rt]x_interrupt() and in turn from IRQ handler functions, register state needs making available another way for the few key handlers which need it. Fake IRQ-like state. Signed-off-by: Jan Beulich --- The use of guest_cpu_user_regs()

[PATCH v3 2/8] keyhandler: drop regs parameter from handle_keyregs()

2024-02-05 Thread Jan Beulich
In preparation for further removal of regs parameters, drop it here. In the two places where it's actually needed, retrieve IRQ context if available, or else guest context. Suggested-by: Andrew Cooper Signed-off-by: Jan Beulich --- As an alternative to the new boolean parameter, I wonder if we

Re: [PATCH v3 5/8] serial: drop serial_[rt]x_interrupt()'s regs parameter

2024-02-05 Thread Andrew Cooper
On 05/02/2024 1:30 pm, Jan Beulich wrote: > They're simply not needed anymore. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper

Re: [PATCH v6 05/15] xen: extend domctl interface for cache coloring

2024-02-05 Thread Jan Beulich
On 03.02.2024 12:41, Carlo Nonato wrote: > On Thu, Feb 1, 2024 at 2:51 PM Jan Beulich wrote: >> On 29.01.2024 18:18, Carlo Nonato wrote: >>> --- a/xen/common/llc-coloring.c >>> +++ b/xen/common/llc-coloring.c >>> @@ -4,6 +4,7 @@ >>> * >>> * Copyright (C) 2022 Xilinx Inc. >>> */ >>>

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

2024-02-05 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

[PATCH v4 28/32] tools/xenstored: map stubdom interface

2024-02-05 Thread Juergen Gross
When running as stubdom, map the stubdom's Xenstore ring page in order to support using the 9pfs frontend. Use the same pattern as in dom0_init() when running as daemon in dom0 (introduce the own domain, then send an event to the client side to signal Xenstore is ready to communicate).

[PATCH v4 27/32] tools/xenstored: split domain_init()

2024-02-05 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

[PATCH v4 31/32] tools/xenstored: support complete log capabilities in stubdom

2024-02-05 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 Reviewed-by: Julien Grall

[PATCH v4 29/32] tools/xenstored: mount 9pfs device in stubdom

2024-02-05 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 Reviewed-by: Julien Grall --- V3: - add logging in

[PATCH v4 26/32] tools/xenstored: rework ring page (un)map functions

2024-02-05 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

Re: [RFC PATCH] xen/arm: improve handling of load/store instruction decoding

2024-02-05 Thread Michal Orzel
On 05/02/2024 11:42, Julien Grall wrote: > > > Hi Alex, > > On 31/01/2024 17:50, Alex Bennée wrote: >> While debugging VirtIO on Arm we ran into a warning due to memory >> being memcpy'd across MMIO space. While the bug was in the mappings >> the warning was a little confusing: >> >>

[PATCH v4.5 3/8] VMX: tertiary execution control infrastructure

2024-02-05 Thread Jan Beulich
This is a prereq to enabling e.g. the MSRLIST feature. Note that the PROCBASED_CTLS3 MSR is different from other VMX feature reporting MSRs, in that all 64 bits report allowed 1-settings. vVMX code is left alone, though, for the time being. Signed-off-by: Jan Beulich --- v4.5: Bump

Re: [PATCH v3 3/8] serial: drop serial_rx_fn's regs parameter

2024-02-05 Thread Andrew Cooper
On 05/02/2024 1:28 pm, Jan Beulich wrote: > It's simply not needed anymore. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper

Re: [PATCH] xen/bitmap: Deduplicate __bitmap_weight() implementations

2024-02-05 Thread Jan Beulich
On 02.02.2024 16:38, Andrew Cooper wrote: > We have two copies of __bitmap_weight() that differ by whether they make > hweight32() or hweight64() calls, yet we already have hweight_long() which is > the form that __bitmap_weight() wants. > > Fix hweight_long() to return unsigned int like all the

Re: [PATCH] x86/ucode: Remove accidentally introduced tabs

2024-02-05 Thread Andrew Cooper
On 05/02/2024 8:57 am, Jan Beulich wrote: > On 02.02.2024 19:00, Andrew Cooper wrote: >> Fixes: cf7fe8b72dea ("x86/ucode: Fix stability of the raw CPU Policy rescan") >> Signed-off-by: Andrew Cooper > I had spotted those as odd while backporting, but didn't consider the > issue bad enough to

[PATCH 1/5] Constify some parameters

2024-02-05 Thread Frediano Ziglio
Make clean they are not changed in the functions. Signed-off-by: Frediano Ziglio --- xen/arch/x86/pv/callback.c | 4 ++-- xen/common/sched/compat.c | 2 +- xen/common/sched/core.c| 2 +- xen/xsm/flask/flask_op.c | 8 4 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH v4 09/32] tools/xen-9pfsd: add 9pfs open request support

2024-02-05 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- V2: - don't allow to open symbolic link V3: - use openat() (Jason Andryuk) - use common error handling in p9_open() --- tools/xen-9pfsd/io.c| 137

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

2024-02-05 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

[PATCH v4 30/32] tools/xenstored: add helpers for filename handling

2024-02-05 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()

Re: [PATCH 1/5] Constify some parameters

2024-02-05 Thread Jan Beulich
On 05.02.2024 11:45, Frediano Ziglio wrote: > Make clean they are not changed in the functions. > > Signed-off-by: Frediano Ziglio For this and the other 4 patches - I didn't see a cover letter; was there none? And then please follow patch submission guidelines: Patches are to be sent To: the

[PATCH v3 8/8] consolidate do_bug_frame() / bug_fn_t

2024-02-05 Thread Jan Beulich
The type not being used in do_bug_frame() is suspicious. Apparently that's solely because the type uses a pointer-to-const parameter, when so far run_in_exception_handler() wanted functions taking pointer- to-non-const. Expand use of const, in turn requiring common code's do_bug_frame() as well as

Re: [PATCH v6 01/15] xen/common: add cache coloring common code

2024-02-05 Thread Jan Beulich
On 03.02.2024 11:57, Carlo Nonato wrote: > On Thu, Feb 1, 2024 at 1:59 PM Jan Beulich wrote: >> On 29.01.2024 18:17, Carlo Nonato wrote: >>> --- a/xen/arch/Kconfig >>> +++ b/xen/arch/Kconfig >>> @@ -31,3 +31,20 @@ config NR_NUMA_NODES >>> associated with multiple-nodes management. It is

[PATCH v4 03/32] tools/xen-9pfsd: connect to frontend

2024-02-05 Thread Juergen Gross
Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - support multiple rings per device (Jason Andryuk) - don't set .revents initially (Jason Andryuk) - call poll() with infinite timeout (Jason Andryuk) -

[PATCH v4 02/32] tools: add a new xen logging daemon

2024-02-05 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.

[PATCH v4 01/32] tools: add access macros for unaligned data

2024-02-05 Thread Juergen Gross
Add the basic access macros for unaligned data to common-macros.h. Signed-off-by: Juergen Gross Acked-by: Andrew Cooper --- V3: - new patch --- tools/include/xen-tools/common-macros.h | 17 + 1 file changed, 17 insertions(+) diff --git a/tools/include/xen-tools/common-macros.h

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

2024-02-05 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

[PATCH v4 04/32] tools/xen-9pfsd: add transport layer

2024-02-05 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. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - rename put_request_bytes() (Jason Andryuk) -

[PATCH v4 05/32] tools/xen-9pfsd: add 9pfs response generation support

2024-02-05 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

[PATCH v4 06/32] tools/xen-9pfsd: add 9pfs version request support

2024-02-05 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 Acked-by:

[PATCH 0/2] gnttab: hypervisor side XSA-448 follow-up

2024-02-05 Thread Jan Beulich
Let's try to better deal with effectively no-op requests. 1: fully ignore zero-size copy requests 2: almost fully ignore zero-size flush requests Jan

Re: [PATCH v4 00/32] tools: enable xenstore-stubdom to use 9pfs

2024-02-05 Thread Jürgen Groß
On 05.02.24 11:55, Julien Grall wrote: Hi Juergen, On 05/02/2024 10:49, Juergen Gross wrote: 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

Ping: Ping: [PATCH] Argo: drop meaningless mfn_valid() check

2024-02-05 Thread Jan Beulich
On 04.01.2024 09:12, Jan Beulich wrote: > On 23.12.2023 22:35, Christopher Clark wrote: >> On Sat, Dec 23, 2023 at 12:47 PM Christopher Clark >> wrote: >>> >>> On Sun, Dec 17, 2023 at 11:55 PM Jan Beulich wrote: Christopher, On 27.11.2023 14:55, Jan Beulich wrote: >

Re: [PATCH] x86/ucode: Remove accidentally introduced tabs

2024-02-05 Thread Jan Beulich
On 02.02.2024 19:00, Andrew Cooper wrote: > Fixes: cf7fe8b72dea ("x86/ucode: Fix stability of the raw CPU Policy rescan") > Signed-off-by: Andrew Cooper I had spotted those as odd while backporting, but didn't consider the issue bad enough to raise it when the change had gone in already anyway.

Re: [PATCH v3 25/33] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Juergen Gross
On 26.01.24 17:22, Julien Grall wrote: Hi Juergen, On 04/01/2024 09:00, Juergen Gross wrote: All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch ---  

Re: [PATCH v6 01/15] xen/common: add cache coloring common code

2024-02-05 Thread Jan Beulich
On 03.02.2024 11:57, Carlo Nonato wrote: > On Wed, Jan 31, 2024 at 4:57 PM Jan Beulich wrote: >> On 29.01.2024 18:17, Carlo Nonato wrote: >>> +Background >>> +** >>> + >>> +Cache hierarchy of a modern multi-core CPU typically has first levels >>> dedicated >>> +to each core (hence using

Re: [PATCH v3 25/33] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Julien Grall
Hi Juergen, On 05/02/2024 08:07, Juergen Gross wrote: On 26.01.24 17:22, Julien Grall wrote: Hi Juergen, On 04/01/2024 09:00, Juergen Gross wrote: All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by:

Re: [PATCH v6 04/15] xen/arm: add Dom0 cache coloring support

2024-02-05 Thread Jan Beulich
On 03.02.2024 12:39, Carlo Nonato wrote: > On Thu, Feb 1, 2024 at 2:30 PM Jan Beulich wrote: >> On 29.01.2024 18:18, Carlo Nonato wrote: >>> --- a/xen/common/llc-coloring.c >>> +++ b/xen/common/llc-coloring.c >>> @@ -17,6 +17,63 @@ size_param("llc-way-size", llc_way_size); >>> /* Number of

Re: [PATCH v6 07/15] xen/arm: add support for cache coloring configuration via device-tree

2024-02-05 Thread Jan Beulich
On 03.02.2024 12:43, Carlo Nonato wrote: > On Thu, Feb 1, 2024 at 3:19 PM Jan Beulich wrote: >> On 29.01.2024 18:18, Carlo Nonato wrote: >>> @@ -950,6 +951,11 @@ void __init create_domUs(void) >>> #endif >>> } >>> >>> +dt_property_read_string(node, "llc-colors", _colors_str);

Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue

2024-02-05 Thread Julien Grall
Hi, On 04/02/2024 09:40, Peng Fan wrote: -Original Message- From: Julien Grall Sent: 2024年2月2日 17:20 To: John Ernberg ; Stefano Stabellini ; Bertrand Marquis ; Michal Orzel ; Volodymyr Babchuk ; Peng Fan Cc: Jonas Blixt ; xen-devel@lists.xenproject.org Subject: Re: [PATCH 1/2]

[PATCH 3/5] Use more specific constant

2024-02-05 Thread Frediano Ziglio
__HYPERVISOR_arch_1 and __HYPERVISOR_paging_domctl_cont for x86 have the same value but this function is handling "paging_domctl_cont" hypercall so using the latter mnemonic in the code is more clear. Signed-off-by: Frediano Ziglio --- xen/arch/x86/mm/paging.c | 2 +- 1 file changed, 1

[PATCH 2/5] Remove useless assignment

2024-02-05 Thread Frediano Ziglio
The variable is assigned later, that value is never used. Signed-off-by: Frediano Ziglio --- xen/common/event_channel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index a7a004a084..15aec5dcbb 100644 ---

[PATCH v4 23/32] tools/xenstored: move all log-pipe handling into posix.c

2024-02-05 Thread Juergen Gross
All of the log-pipe handling is needed only when running as daemon. Move it into posix.c. This requires to have a service function in the main event loop for handling the related requests and one for setting the fds[] array. Use a generic name for those functions, as socket handling can be added

[PATCH 1/2] gnttab: fully ignore zero-size copy requests

2024-02-05 Thread Jan Beulich
Along the line with observations in the context of XSA-448, no field in struct gnttab_copy_ptr is relevant when no data is to be copied, much like e.g. the pointers passed to memcpy() are irrelevant (and would never be "validated") when the passed length is zero. Signed-off-by: Jan Beulich ---

[PATCH 2/2] almost fully ignore zero-size flush requests

2024-02-05 Thread Jan Beulich
Along the line with observations in the context of XSA-448, besides "op" no field is relevant when the range to be flushed is empty, much like e.g. the pointers passed to memcpy() are irrelevant (and would never be "validated") when the passed length is zero. Split the existing condition

[xen-unstable-smoke test] 184590: tolerable all pass - PUSHED

2024-02-05 Thread osstest service owner
flight 184590 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184590/ 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

[PATCH v3 3/8] serial: drop serial_rx_fn's regs parameter

2024-02-05 Thread Jan Beulich
It's simply not needed anymore. Signed-off-by: Jan Beulich --- v2: Re-base over earlier (new/split) patches. --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -526,7 +526,7 @@ static void switch_serial_input(void) printk("\n"); } -static void __serial_rx(char c,

[PATCH v3 4/8] PV-shim: drop pv_console_rx()'s regs parameter

2024-02-05 Thread Jan Beulich
It's not needed anymore. This is in preparation of dropping the register parameters from IRQ handler functions. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -181,7 +181,7 @@ static void cf_check

Re: [PATCH] tools/xentop: fix sorting bug for some columns

2024-02-05 Thread Anthony PERARD
On Sun, Feb 04, 2024 at 11:19:40AM +0100, zithro / Cyril Rébert wrote: > From: Cyril Rébert > > Sort doesn't work on columns VBD_OO, VBD_RD, VBD_WR and VBD_RSECT. > Fix by adjusting variables names in compare functions. > Bug fix only. No functional change. > > Signed-off-by: Cyril Rébert

Re: [PATCH v4 00/32] tools: enable xenstore-stubdom to use 9pfs

2024-02-05 Thread Julien Grall
Hi Juergen, On 05/02/2024 11:08, Jürgen Groß wrote: On 05.02.24 11:55, Julien Grall wrote: Hi Juergen, On 05/02/2024 10:49, Juergen Gross wrote: 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

Re: [PATCH] tools/xentop: fix sorting bug for some columns

2024-02-05 Thread Andrew Cooper
On 05/02/2024 5:37 pm, Anthony PERARD wrote: > On Sun, Feb 04, 2024 at 11:19:40AM +0100, zithro / Cyril Rébert wrote: >> From: Cyril Rébert >> >> Sort doesn't work on columns VBD_OO, VBD_RD, VBD_WR and VBD_RSECT. >> Fix by adjusting variables names in compare functions. >> Bug fix only. No

[PATCH 0/7] VT-d: SATC handling and ATS tidying

2024-02-05 Thread Jan Beulich
On a Sapphire Rapids system I noticed a line in the serial log indicating a DMAR entry type we're not recognizing. While arranging for it to be both recognized and respected, I noticed some further potential for cleaning up. 1: VT-d: parse ACPI "SoC Integrated Address Translation Cache Reporting

[PATCH 3/7] VT-d: respect ACPI SATC's ATC_REQUIRED flag

2024-02-05 Thread Jan Beulich
When the flag is set, permit Dom0 to control the device (no worse than what we had before and in line with other "best effort" behavior we use when it comes to Dom0), but suppress passing through to DomU-s unless ATS can actually be enabled for such devices. Signed-off-by: Jan Beulich --- Is

[PATCH 2/7] IOMMU: rename and re-type ats_enabled

2024-02-05 Thread Jan Beulich
Make the variable a tristate, with (as done elsewhere) a negative value meaning "default". Since all use sites need looking at, also rename it to match our usual "opt_*" pattern. While touching it, also move it to .data.ro_after_init. The only place it retains boolean nature is pci_ats_device(),

Re: [PATCH v4 23/32] tools/xenstored: move all log-pipe handling into posix.c

2024-02-05 Thread Jürgen Groß
On 05.02.24 15:33, Julien Grall wrote: Hi Juergen, On 05/02/2024 10:49, Juergen Gross wrote: All of the log-pipe handling is needed only when running as daemon. Move it into posix.c. This requires to have a service function in the main event loop for handling the related requests and one for

Re: [PATCH v4 23/32] tools/xenstored: move all log-pipe handling into posix.c

2024-02-05 Thread Julien Grall
Hi Juergen, On 05/02/2024 14:36, Jürgen Groß wrote: On 05.02.24 15:33, Julien Grall wrote: Hi Juergen, On 05/02/2024 10:49, Juergen Gross wrote: All of the log-pipe handling is needed only when running as daemon. Move it into posix.c. This requires to have a service function in the main

Re: [PATCH v4 24/32] tools/xenstored: move all socket handling into posix.c

2024-02-05 Thread Julien Grall
Hi Juergen, On 05/02/2024 10:49, Juergen Gross wrote: All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, -- Julien Grall

Re: [XEN PATCH v3] xen/arm: ffa: reclaim shared memory on guest destroy

2024-02-05 Thread Jens Wiklander
Hi Bertrand, On Thu, Feb 1, 2024 at 2:57 PM Bertrand Marquis wrote: > > Hi Jens, > > > On 17 Jan 2024, at 12:06, Jens Wiklander wrote: > > > > When an FF-A enabled guest is destroyed it may leave behind memory > > shared with SPs. This memory must be reclaimed before it's reused or an > > SP

Re: [PATCH v3 31/34] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-02-05 Thread Oleksii
On Mon, 2024-02-05 at 15:05 +0100, Jan Beulich wrote: > On 05.02.2024 13:49, Oleksii wrote: > > On Mon, 2024-02-05 at 08:46 +0100, Jan Beulich wrote: > > > On 02.02.2024 18:30, Oleksii wrote: > > > > On Tue, 2024-01-23 at 14:03 +0100, Jan Beulich wrote: > > > > > On 22.12.2023 16:13, Oleksii

[PATCH v4 25/30] xen/riscv: add minimal stuff to processor.h to build full Xen

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - Change message -> subject in "Changes in V3" - Documentation about system requirement was added. In the future, it can be checked if the extension is supported by system __riscv_isa_extension_available() (

[PATCH v4 21/30] xen/riscv: add definition of __read_mostly

2024-02-05 Thread Oleksii Kurochko
The definition of __read_mostly should be removed in: https://lore.kernel.org/xen-devel/f25eb5c9-7c14-6e23-8535-2c66772b3...@suse.com/ The patch introduces it in arch-specific header to not block enabling of full Xen build for RISC-V. Signed-off-by: Oleksii Kurochko --- - [PATCH] move

  1   2   >