Re: [PATCH v16 1/4] xen/domain: unify domain ID allocation

2025-08-26 Thread dmkhn
On Thu, Aug 21, 2025 at 09:16:16AM +0200, Jan Beulich wrote: > On 20.08.2025 01:58, dm...@proton.me wrote: > > On Thu, Aug 14, 2025 at 09:11:11AM +0200, Jan Beulich wrote: > >> On 13.08.2025 00:30, dm...@proton.me wrote: > >>> From: Denis Mukhin > >>> > >>> Currently, there are two different domai

Re: [PATCH v16 1/4] xen/domain: unify domain ID allocation

2025-08-26 Thread dmkhn
On Thu, Aug 21, 2025 at 12:29:23PM +0200, Alejandro Vallejo wrote: > On Thu Aug 21, 2025 at 9:16 AM CEST, Jan Beulich wrote: > > On 20.08.2025 01:58, dm...@proton.me wrote: > >> On Thu, Aug 14, 2025 at 09:11:11AM +0200, Jan Beulich wrote: > >>> On 13.08.2025 00:30, dm...@proton.me wrote: > Fro

Re: [PATCH v16 1/4] xen/domain: unify domain ID allocation

2025-08-26 Thread dmkhn
On Wed, Aug 20, 2025 at 10:33:16PM +0100, Julien Grall wrote: > Hi Denis, > > On 12/08/2025 23:30, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Currently, there are two different domain ID allocation implementations: > > > >1) Sequential IDs allocation in dom0less Arm code based on

Re: [PATCH v16 3/4] tools/tests: introduce unit tests for domain ID allocator

2025-08-26 Thread dmkhn
On Mon, Aug 25, 2025 at 03:47:39PM +0200, Anthony PERARD wrote: Thanks for review! Will address in the next revision. Please see some responses below. > On Tue, Aug 12, 2025 at 10:30:50PM +, dm...@proton.me wrote: > > diff --git a/tools/tests/domid/.gitignore b/tools/tests/domid/.gitignore >

Re: [PATCH v16 2/4] tools/include: move xc_bitops.h to xen-tools/bitops.h

2025-08-26 Thread dmkhn
On Mon, Aug 25, 2025 at 11:30:20AM +0200, Anthony PERARD wrote: > On Tue, Aug 12, 2025 at 10:30:45PM +, dm...@proton.me wrote: > > diff --git a/tools/libs/guest/xg_dom_elfloader.c > > b/tools/libs/guest/xg_dom_elfloader.c > > index f17930d98bf7..8531e90f8e21 100644 > > --- a/tools/libs/guest/x

Re: [PATCH v4 6/8] tools/xl: enable NS16550-compatible UART emulator for HVM (x86)

2025-08-26 Thread dmkhn
On Mon, Aug 25, 2025 at 04:49:58PM +0200, Anthony PERARD wrote: > On Thu, Jul 31, 2025 at 07:22:12PM +, dm...@proton.me wrote: > > diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in > > index 5362fb0e9a6f..e1d012274eaf 100644 > > --- a/docs/man/xl.cfg.5.pod.in > > +++ b/docs/man/x

Re: [PATCH v16 1/4] xen/domain: unify domain ID allocation

2025-08-19 Thread dmkhn
On Thu, Aug 14, 2025 at 09:11:11AM +0200, Jan Beulich wrote: > On 13.08.2025 00:30, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Currently, there are two different domain ID allocation implementations: > > > > 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; >

Re: [PATCH v4 2/8] emul/vuart: introduce framework for UART emulators

2025-08-13 Thread dmkhn
On Tue, Aug 12, 2025 at 08:52:18AM +0200, Jan Beulich wrote: > On 12.08.2025 01:55, dm...@proton.me wrote: > > On Mon, Aug 11, 2025 at 09:34:58AM +0200, Jan Beulich wrote: > >> On 09.08.2025 20:55, dm...@proton.me wrote: > >>> On Mon, Aug 04, 2025 at 12:11:03PM +0200, Jan Beulich wrote: > On 3

[PATCH v16 2/4] tools/include: move xc_bitops.h to xen-tools/bitops.h

2025-08-12 Thread dmkhn
From: Denis Mukhin Move xc_bitops.h to common tools location to be shared between the toolstack and unit test code. Adjust the guard in xen-tools/bitops.h Correct the #include directives and comments referring to the old xc_bitops.h in the toolstack code. Signed-off-by: Denis Mukhin --- Chan

[PATCH v16 0/4] xen/domain: domain ID allocation

2025-08-12 Thread dmkhn
Patch 1 introduces new domid_{alloc,free} calls. Patch 2 is a prep change for domain ID allocator test. Patch 3 introduces some basic testing for domain ID allocator. Patch 4 adjusts create_dom0() messages (use %pd). Link to v15: https://lore.kernel.org/xen-devel/20250809170747.1836880-1-dmuk...@

[PATCH v16 4/4] xen/domain: update create_dom0() messages

2025-08-12 Thread dmkhn
From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin Reviewed-by: Alejandro Vallejo Acked-by: Jan Beulich Reviewed-by: Julien Grall --- Changes since v15: - n/a --- xen/arch/arm/domain_build.c | 6

[PATCH v16 3/4] tools/tests: introduce unit tests for domain ID allocator

2025-08-12 Thread dmkhn
From: Denis Mukhin Introduce some basic infrastructure for doing domain ID allocation unit tests, and add a few tests that ensure correctness of the domain ID allocator. Use and xen/lib/find-next-bit.c in test hardness code. Adjust find-next-bit.c to be compiled with __XEN_TOOLS__. Signed-of

[PATCH v16 1/4] xen/domain: unify domain ID allocation

2025-08-12 Thread dmkhn
From: Denis Mukhin Currently, there are two different domain ID allocation implementations: 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; 2) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use max_init_domid (both Arm and x86). The domain I

Re: [PATCH v4 5/8] emul/vuart-ns16550: introduce NS16550-compatible UART emulator (x86)

2025-08-11 Thread dmkhn
On Mon, Aug 11, 2025 at 09:39:42AM +0200, Jan Beulich wrote: > On 09.08.2025 20:37, dm...@proton.me wrote: > > On Mon, Aug 04, 2025 at 12:53:36PM +0200, Jan Beulich wrote: > >> On 31.07.2025 21:22, dm...@proton.me wrote: > >>> --- a/xen/common/emul/vuart/Makefile > >>> +++ b/xen/common/emul/vuart/M

Re: [PATCH v4 2/8] emul/vuart: introduce framework for UART emulators

2025-08-11 Thread dmkhn
On Mon, Aug 11, 2025 at 09:34:58AM +0200, Jan Beulich wrote: > On 09.08.2025 20:55, dm...@proton.me wrote: > > On Mon, Aug 04, 2025 at 12:11:03PM +0200, Jan Beulich wrote: > >> On 31.07.2025 21:21, dm...@proton.me wrote: > >>> --- a/xen/common/Kconfig > >>> +++ b/xen/common/Kconfig > >>> @@ -1,6 +1

Re: [PATCH v15 3/4] tools/tests: introduce unit tests for domain ID allocator

2025-08-11 Thread dmkhn
On Mon, Aug 11, 2025 at 09:58:24AM +0200, Jan Beulich wrote: > On 09.08.2025 19:08, dm...@proton.me wrote: > > diff --git a/tools/tests/domid/include/xen/domain.h > > b/tools/tests/domid/include/xen/domain.h > > new file mode 12 > > index ..2eda9aed088e > > --- /dev/null > > +++ b/

Re: [PATCH v15 1/4] xen/domain: unify domain ID allocation

2025-08-11 Thread dmkhn
On Mon, Aug 11, 2025 at 01:00:00PM +0200, Alejandro Vallejo wrote: > On Sat Aug 9, 2025 at 7:08 PM CEST, dmkhn wrote: > > From: Denis Mukhin > > > > Currently, there are two different domain ID allocation implementations: > > > > 1) Sequential IDs allocat

Re: [PATCH v15 1/4] xen/domain: unify domain ID allocation

2025-08-11 Thread dmkhn
On Mon, Aug 11, 2025 at 01:14:49PM +0200, Jan Beulich wrote: > On 09.08.2025 19:08, dm...@proton.me wrote: > > --- /dev/null > > +++ b/xen/common/domid.c > > @@ -0,0 +1,95 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +/* > > + * Domain ID allocator. > > + * > > + * Covers dom0 or late hw

Re: [PATCH v4 2/8] emul/vuart: introduce framework for UART emulators

2025-08-09 Thread dmkhn
On Mon, Aug 04, 2025 at 12:11:03PM +0200, Jan Beulich wrote: > On 31.07.2025 21:21, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Introduce a driver framework to abstract UART emulators in the hypervisor. > > > > That allows for architecture-independent handling of virtual UARTs in the > >

Re: [PATCH v4 5/8] emul/vuart-ns16550: introduce NS16550-compatible UART emulator (x86)

2025-08-09 Thread dmkhn
On Mon, Aug 04, 2025 at 12:53:36PM +0200, Jan Beulich wrote: > On 31.07.2025 21:22, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Add initial in-hypervisor emulator for NS8250/NS16x50-compatible UARTs under > > CONFIG_VUART_NS16550 for x86 port of Xen. > > > > x86 port of Xen lacks vUART f

Re: [PATCH] xen/arm: irq: add missing spin_unlock() in init_local_irq_data() error path

2025-08-09 Thread dmkhn
On Sat, Aug 09, 2025 at 05:32:41PM +0300, Mykola Kvach wrote: > From: Mykola Kvach > > If init_one_irq_desc() fails, init_local_irq_data() returns without > releasing local_irqs_type_lock, leading to a possible deadlock. > > Release the lock before returning to ensure proper cleanup. > > Signed

[PATCH v15 4/4] xen/domain: update create_dom0() messages

2025-08-09 Thread dmkhn
From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin Reviewed-by: Alejandro Vallejo Acked-by: Jan Beulich Acked-by: Julien Grall --- Changes since v14: - added Julien's A-b --- xen/arch/arm/domain_

[PATCH v15 2/4] tools/include: move xc_bitops.h to xen-tools/bitops.h

2025-08-09 Thread dmkhn
From: Denis Mukhin Move xc_bitops.h to common tools location to be shared between the toolstack and unit test code. Adjust the guard in xen-tools/bitops.h Correct the #include directives and comments referring to the old xc_bitops.h in the toolstack code. Signed-off-by: Denis Mukhin --- Chan

[PATCH v15 0/4] xen/domain: domain ID allocation

2025-08-09 Thread dmkhn
Patch 1 introduces new domid_{alloc,free} calls. Patch 2 is a prep change for domain ID allocator test. Patch 3 introduces some basic testing for domain ID allocator. Patch 4 adjusts create_dom0() messages (use %pd). Link to v14: https://lore.kernel.org/xen-devel/20250808021938.669855-1-dmuk...@f

[PATCH v15 3/4] tools/tests: introduce unit tests for domain ID allocator

2025-08-09 Thread dmkhn
From: Denis Mukhin Introduce some basic infrastructure for doing domain ID allocation unit tests, and add a few tests that ensure correctness of the domain ID allocator. Use and xen/lib/find-next-bit.c in test hardness code. Adjust find-next-bit.c to be compiled with __XEN_TOOLS__. Signed-of

[PATCH v15 1/4] xen/domain: unify domain ID allocation

2025-08-09 Thread dmkhn
From: Denis Mukhin Currently, there are two different domain ID allocation implementations: 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; 2) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use max_init_domid (both Arm and x86). The domain I

Re: [PATCH v14 3/4] tools/tests: introduce unit tests for domain ID allocator

2025-08-09 Thread dmkhn
On Fri, Aug 08, 2025 at 06:56:16PM +0100, Julien Grall wrote: > Hi Denis, > > On 08/08/2025 03:20, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Introduce some basic infrastructure for doing domain ID allocation unit > > tests, > > and add a few tests that ensure correctness of the domai

Re: [PATCH v14 3/4] tools/tests: introduce unit tests for domain ID allocator

2025-08-09 Thread dmkhn
On Fri, Aug 08, 2025 at 06:57:07PM +0100, Julien Grall wrote: > > > On 08/08/2025 18:56, Julien Grall wrote: > > Hi Denis, > > > > On 08/08/2025 03:20, dm...@proton.me wrote: > >> From: Denis Mukhin > >> > >> Introduce some basic infrastructure for doing domain ID allocation > >> unit tests, > >

Re: [PATCH v14 1/4] xen/domain: unify domain ID allocation

2025-08-09 Thread dmkhn
On Fri, Aug 08, 2025 at 06:42:03PM +0100, Julien Grall wrote: > Hi Denis, > > On 08/08/2025 03:19, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Currently, there are two different domain ID allocation implementations: > > > >1) Sequential IDs allocation in dom0less Arm code based on

Re: [PATCH v2 3/3] CI: Run driver domains test on Debian too

2025-08-08 Thread dmkhn
On Fri, Aug 08, 2025 at 04:32:43PM +0200, Marek Marczykowski-Górecki wrote: > The recent failure affected only glibc-based systems, so do the test on > Debian too. > > Signed-off-by: Marek Marczykowski-Górecki Just one tiny comment below, otherwise looks good to me! With or without addressing i

Re: [PATCH v2 2/3] CI: Add configure --enable-systemd for full build

2025-08-08 Thread dmkhn
On Fri, Aug 08, 2025 at 04:32:42PM +0200, Marek Marczykowski-Górecki wrote: > This doesn't exclude sysvinit scripts, but allows testing systemd too. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Denis Mukhin > -- > New in v2. > > Requires containers rebuild > --- > automation/b

Re: [PATCH v2 1/3] CI: Add driver domains tests

2025-08-08 Thread dmkhn
On Fri, Aug 08, 2025 at 04:32:41PM +0200, Marek Marczykowski-Górecki wrote: > Setup a simple two domU system. One with network backend, running > xendriverdomain service, and one with frontend, trying to ping the > backend. > > Contrary to other similar tests, use disk image instead of initrd, to

[PATCH v14 3/4] tools/tests: introduce unit tests for domain ID allocator

2025-08-07 Thread dmkhn
From: Denis Mukhin Introduce some basic infrastructure for doing domain ID allocation unit tests, and add a few tests that ensure correctness of the domain ID allocator. Use and xen/lib/find-next-bit.c in test hardness code. Adjust find-next-bit.c to be compiled with __XEN_TOOLS__. Signed-of

[PATCH v14 4/4] xen/domain: update create_dom0() messages

2025-08-07 Thread dmkhn
From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin Reviewed-by: Alejandro Vallejo Acked-by: Jan Beulich --- Changes since v13: - n/a --- xen/arch/arm/domain_build.c | 6 +++--- xen/arch/x86/setup.

[PATCH v14 0/4] xen/domain: domain ID allocation

2025-08-07 Thread dmkhn
Patch 1 introduces new domid_{alloc,free} calls. Patch 2 is a prep change for domain ID allocator test. Patch 3 introduces some basic testing for domain ID allocator. Patch 4 adjusts create_dom0() messages (use %pd). Link to v13: https://lore.kernel.org/xen-devel/20250730174042.1632011-1-dmuk...@

[PATCH v14 2/4] tools/include: move xc_bitops.h to xen-tools/bitops.h

2025-08-07 Thread dmkhn
From: Denis Mukhin Move xc_bitops.h to common tools location to be shared between the toolstack and unit test code. Adjust the guard in xen-tools/bitops.h Correct the #include directives and comments referring to the old xc_bitops.h in the toolstack code. Signed-off-by: Denis Mukhin --- Chan

[PATCH v14 1/4] xen/domain: unify domain ID allocation

2025-08-07 Thread dmkhn
From: Denis Mukhin Currently, there are two different domain ID allocation implementations: 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; 2) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use max_init_domid (both Arm and x86). The domain I

Re: [XEN PATCH] automation/eclair: restrict clean target to xen

2025-08-07 Thread dmkhn
On Thu, Aug 07, 2025 at 11:53:56PM +0200, Nicola Vetrini wrote: > The clean target also clears files outside the xen directory, > which is not needed for the purposes of running an analysis. > > No functional change. > > Reported-by: Andrew Cooper > Signed-off-by: Nicola Vetrini Reviewed-by: D

Re: [PATCH v4 4/8] xen/8250-uart: update definitions

2025-08-07 Thread dmkhn
On Mon, Aug 04, 2025 at 12:23:34PM +0200, Jan Beulich wrote: > On 31.07.2025 21:22, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Added missing definitions needed for NS16550 UART emulator. > > > > Newly introduced MSR definitions re-used in the existing ns16550 driver. > > > > Also, corre

Re: [PATCH v4 7/8] tools/xl: enable NS16550-compatible UART emulator for PVH (x86)

2025-08-07 Thread dmkhn
On Mon, Aug 04, 2025 at 01:06:32PM +0200, Jan Beulich wrote: > On 31.07.2025 21:22, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Enable virtual NS16550 for PVH domains in xl. > > > > {map,unmap}_domain_emuirq_pirq() infrastructure is modified by adding new > > type of interrupt resources

Re: [PATCH v4 2/8] emul/vuart: introduce framework for UART emulators

2025-08-07 Thread dmkhn
On Wed, Aug 06, 2025 at 04:24:52PM +0200, Roger Pau Monné wrote: > On Thu, Jul 31, 2025 at 07:21:49PM +, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Introduce a driver framework to abstract UART emulators in the hypervisor. > > > > That allows for architecture-independent handling of

Re: [PATCH v4 3/8] x86/domain: allocate d->{iomem,irq}_caps before arch-specific initialization

2025-08-07 Thread dmkhn
On Mon, Aug 04, 2025 at 12:20:11PM +0200, Jan Beulich wrote: > On 31.07.2025 21:21, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Move IRQ/IOMEM rangesets allocation before arch_domain_create(). > > > > That guarantees that arch-specific code could access those rangesets to > > register tr

Re: [PATCH v4 3/8] x86/domain: allocate d->{iomem,irq}_caps before arch-specific initialization

2025-08-07 Thread dmkhn
On Wed, Aug 06, 2025 at 04:37:23PM +0200, Roger Pau Monné wrote: > On Thu, Jul 31, 2025 at 07:21:54PM +, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Move IRQ/IOMEM rangesets allocation before arch_domain_create(). > > > > That guarantees that arch-specific code could access those ran

Re: [PATCH v4 5/8] emul/vuart-ns16550: introduce NS16550-compatible UART emulator (x86)

2025-08-07 Thread dmkhn
On Wed, Aug 06, 2025 at 05:06:24PM +0200, Roger Pau Monné wrote: [..] > > @@ -0,0 +1,1009 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +/* > > + * NS16550-compatible UART Emulator. > > + * > > + * See: > > + * - Serial and UART Tutorial: > > + * > > https://download.freebsd.org/doc/

Re: [PATCH v4 1/8] xen/domain: introduce common emulation flags

2025-08-07 Thread dmkhn
On Wed, Aug 06, 2025 at 03:56:42PM +0200, Roger Pau Monné wrote: > On Tue, Aug 05, 2025 at 12:54:31AM +, dm...@proton.me wrote: > > + Cc: Oleskii > > > > On Mon, Aug 04, 2025 at 11:46:36AM +0200, Jan Beulich wrote: > > > On 31.07.2025 21:21, dm...@proton.me wrote: > > > > --- a/xen/include/xen/

Re: [PATCH v4 1/8] xen/domain: introduce common emulation flags

2025-08-07 Thread dmkhn
On Thu, Aug 07, 2025 at 04:28:20PM +0200, Oleksii Kurochko wrote: [..] > Hi Arm/RISC-V maintainers, > > Do you foresee any need in bubbling up emulation_flags to the common `struct > domain`? > > > At the moment, in RISC-V's downstream branches emulation_flags isn't > used. And, > for n

Re: [PATCH v1 1/2] CI: Add driver domains tests

2025-08-07 Thread dmkhn
On Thu, Aug 07, 2025 at 02:06:49AM +0200, Marek Marczykowski-Górecki wrote: > Setup a simple two domU system. One with network backend, running > xendriverdomain service, and one with frontend, trying to ping the > backend. > > Contrary to other similar tests, use disk image instead of initrd, to

Re: [PATCH v13 2/3] tools/tests: introduce unit tests for domain ID allocator

2025-08-06 Thread dmkhn
On Tue, Aug 05, 2025 at 04:15:28PM +0200, Roger Pau Monné wrote: > On Wed, Jul 30, 2025 at 05:41:00PM +, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Introduce some basic infrastructure for doing domain ID allocation unit > > tests, > > and add a few tests that ensure correctness of

Re: [PATCH v13 1/3] xen/domain: unify domain ID allocation

2025-08-06 Thread dmkhn
On Tue, Aug 05, 2025 at 03:38:37PM +0200, Roger Pau Monné wrote: > On Wed, Jul 30, 2025 at 05:40:54PM +, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Currently, there are two different domain ID allocation implementations: > > > > 1) Sequential IDs allocation in dom0less Arm code ba

[PATCH v11] xen/console: introduce domain_console struct

2025-08-06 Thread dmkhn
From: Denis Mukhin Introduce domain_console for grouping data structures used for integrating domain's diagnostic console with Xen's console driver. Group all pbuf-related data structures under domain_console. Rename the moved fields to plain .buf, .idx and .lock names, since all uses of the fi

Re: [PATCH v4 1/8] xen/domain: introduce common emulation flags

2025-08-04 Thread dmkhn
+ Cc: Oleskii On Mon, Aug 04, 2025 at 11:46:36AM +0200, Jan Beulich wrote: > On 31.07.2025 21:21, dm...@proton.me wrote: > > --- a/xen/include/xen/sched.h > > +++ b/xen/include/xen/sched.h > > @@ -652,6 +652,8 @@ struct domain > > unsigned int *llc_colors; > > #endif > > > > +uint32_t em

Re: [PATCH v1 12/16] xen/domain: introduce domain-emu.h

2025-08-04 Thread dmkhn
On Mon, Aug 04, 2025 at 09:13:07AM +0200, Jan Beulich wrote: > On 01.08.2025 21:30, dm...@proton.me wrote: > > On Fri, Aug 01, 2025 at 08:02:56AM +0200, Jan Beulich wrote: > >> On 31.07.2025 22:55, dm...@proton.me wrote: > >>> On Wed, Jul 09, 2025 at 04:57:44PM +0200, Jan Beulich wrote: > On 2

Re: [PATCH] console: make printk_ratelimit_{burst,ms} const

2025-08-04 Thread dmkhn
On Mon, Aug 04, 2025 at 09:10:34AM +0200, Jan Beulich wrote: > On 01.08.2025 20:58, dm...@proton.me wrote: > > On Fri, Aug 01, 2025 at 09:30:34AM +0200, Jan Beulich wrote: > >> Them not being altered by any means, their __read_mostly attribute is > >> actually counter-productive: It causes the comp

Re: [PATCH v1 12/16] xen/domain: introduce domain-emu.h

2025-08-01 Thread dmkhn
On Fri, Aug 01, 2025 at 08:02:56AM +0200, Jan Beulich wrote: > On 31.07.2025 22:55, dm...@proton.me wrote: > > On Wed, Jul 09, 2025 at 04:57:44PM +0200, Jan Beulich wrote: > >> On 24.06.2025 05:56, dm...@proton.me wrote: > >>> @@ -458,16 +459,16 @@ struct arch_domain > >>> } __cacheline_aligned; >

Re: [XEN][PATCH 0/3] xen/arch: irq: drop unreachable pirq callbacks

2025-08-01 Thread dmkhn
On Fri, Aug 01, 2025 at 10:08:54AM +, Grygorii Strashko wrote: > From: Grygorii Strashko > > Hence prerequisite patch was merged [1] arch specific pIRQ callback can now > be dropped for arches without pIRQ support as those callback become > unreachable. > > [1] commit 341f271cf86f ("xen/evt

Re: [XEN][PATCH] xen/dom0less: arm: fix hwdom 1:1 low memory allocation

2025-08-01 Thread dmkhn
On Fri, Aug 01, 2025 at 03:54:30PM +, Grygorii Strashko wrote: > From: Grygorii Strashko > > Call stack for dom0less hwdom case (1:1) memory: > create_domUs > |-construct_domU > |-construct_hwdom() > |-allocate_memory_11() > > And allocate_memory_11() uses "dom0_mem" as: > min_low_orde

Re: [PATCH] console: make printk_ratelimit_{burst,ms} const

2025-08-01 Thread dmkhn
On Fri, Aug 01, 2025 at 09:30:34AM +0200, Jan Beulich wrote: > Them not being altered by any means, their __read_mostly attribute is > actually counter-productive: It causes the compiler to instantiate the > variables, when already with just the attributes dropped the compiler > can constant-propag

Re: Console vs serial

2025-08-01 Thread dmkhn
On Fri, Aug 01, 2025 at 12:44:57PM +0100, Frediano Ziglio wrote: > On Fri, Aug 1, 2025 at 12:25 PM Andrew Cooper > wrote: > > > > Hello, > > > > There's a long-standing irritation in Xen, whereby printk()'s which > > occur prior to console_init_preirq() get half-lost. > > > > They end up in the c

Re: [PATCH v4 5/8] emul/vuart-ns16550: introduce NS16550-compatible UART emulator (x86)

2025-07-31 Thread dmkhn
On Thu, Jul 31, 2025 at 04:57:00PM -0700, Stefano Stabellini wrote: > On Thu, 31 Jul 2025, dm...@proton.me wrote: [..] > > +/* > > + * Emulate 8-bit write access to NS16550 register. > > + */ > > +static int ns16550_io_write8( > > +struct vuart_ns16550 *vdev, uint32_t reg, uint8_t *data) > >

Re: [PATCH v4 3/8] x86/domain: allocate d->{iomem,irq}_caps before arch-specific initialization

2025-07-31 Thread dmkhn
On Thu, Jul 31, 2025 at 08:21:24PM +, dm...@proton.me wrote: > On Thu, Jul 31, 2025 at 10:52:08PM +0300, Grygorii Strashko wrote: > > Hi Denis, > > > > On 31.07.25 22:21, dm...@proton.me wrote: > > > From: Denis Mukhin > > > > > > Move IRQ/IOMEM rangesets allocation before arch_domain_create()

Re: [PATCH v4 2/8] emul/vuart: introduce framework for UART emulators

2025-07-31 Thread dmkhn
On Thu, Jul 31, 2025 at 05:08:12PM -0700, Stefano Stabellini wrote: > On Thu, 31 Jul 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Introduce a driver framework to abstract UART emulators in the hypervisor. > > > > That allows for architecture-independent handling of virtual UARTs in

Re: [PATCH v4 7/8] tools/xl: enable NS16550-compatible UART emulator for PVH (x86)

2025-07-31 Thread dmkhn
On Thu, Jul 31, 2025 at 05:46:37PM -0700, Stefano Stabellini wrote: > On Thu, 31 Jul 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Enable virtual NS16550 for PVH domains in xl. > > > > {map,unmap}_domain_emuirq_pirq() infrastructure is modified by adding new > > type of interrupt res

Re: [PATCH v4 8/8] emul/vuart: introduce console forwarding enforcement via vUART

2025-07-31 Thread dmkhn
On Thu, Jul 31, 2025 at 05:10:12PM -0700, Stefano Stabellini wrote: > On Thu, 31 Jul 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > It may be useful to enforce console forwarding over the virtual UART. E.g. > > hardware domain uses PV console by default, but it may be necessary to hav

Re: [PATCH] ns16550: ensure polling timer is disarmed

2025-07-31 Thread dmkhn
On Thu, Jul 31, 2025 at 08:54:10AM +0200, Jan Beulich wrote: > On 30.07.2025 20:31, dm...@proton.me wrote: > > On Wed, Jul 30, 2025 at 10:12:54AM +0200, Jan Beulich wrote: > >> On 30.07.2025 05:13, dm...@proton.me wrote: > >>> From: Denis Mukhin > >>> > >>> As it stands, polling timer is kept in t

Re: [PATCH v1] xen/console: remove __printk_ratelimit()

2025-07-31 Thread dmkhn
Hi Jan, Thanks for the feedback. On Thu, Jul 31, 2025 at 08:23:16AM +0200, Jan Beulich wrote: > On 30.07.2025 20:06, dm...@proton.me wrote: > > On Wed, Jul 30, 2025 at 07:35:04AM +0200, Jan Beulich wrote: > >> On 30.07.2025 00:18, dm...@proton.me wrote: > >>> On Mon, Jul 28, 2025 at 11:32:43AM +0

Re: [PATCH v1 03/16] arm/vpl011: use vuart_ prefix in vpl011 public calls

2025-07-31 Thread dmkhn
On Tue, Jun 24, 2025 at 12:11:10PM +0200, Orzel, Michal wrote: > > > On 24/06/2025 05:55, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Use generic names prefixed with 'vuart_' in public PL011 emulator data > > structures and functions. > > > > No functional change intended. > > > > Sign

Re: [PATCH v1 04/16] arm/vpl011: use raw spin_lock_{irqrestore,irqsave}

2025-07-31 Thread dmkhn
On Wed, Jun 25, 2025 at 08:52:39AM +0200, Orzel, Michal wrote: > > > On 24/06/2025 23:46, dm...@proton.me wrote: > > On Tue, Jun 24, 2025 at 09:50:54AM +0200, Orzel, Michal wrote: > >> > >> > >> On 24/06/2025 07:46, Jan Beulich wrote: > >>> On 24.06.2025 05:55, dm...@proton.me wrote: > From:

Re: [PATCH v1 02/16] arm/vpl011: move DT node parsing to PL011 emulator code

2025-07-31 Thread dmkhn
On Wed, Jun 25, 2025 at 08:57:27AM +0200, Orzel, Michal wrote: > > > On 24/06/2025 23:56, dm...@proton.me wrote: > > On Tue, Jun 24, 2025 at 09:49:39AM +0200, Orzel, Michal wrote: > >> > >> > >> On 24/06/2025 05:55, dm...@proton.me wrote: > >>> From: Denis Mukhin > >>> > >>> Move vpl011 DT node

Re: [PATCH v1 07/16] arm/vuart: rename 'virtual UART' Kconfig option

2025-07-31 Thread dmkhn
Hi Michal, On Wed, Jun 25, 2025 at 09:07:48AM +0200, Orzel, Michal wrote: > > > On 24/06/2025 09:14, dm...@proton.me wrote: > > On Tue, Jun 24, 2025 at 08:37:22AM +0200, Orzel, Michal wrote: > >> > >> > >> On 24/06/2025 05:55, dm...@proton.me wrote: > >>> From: Denis Mukhin > >>> > >>> Rename H

Re: [PATCH v1 12/16] xen/domain: introduce domain-emu.h

2025-07-31 Thread dmkhn
Hi Jan, On Wed, Jul 09, 2025 at 04:57:44PM +0200, Jan Beulich wrote: > On 24.06.2025 05:56, dm...@proton.me wrote: > > @@ -458,16 +459,16 @@ struct arch_domain > > } __cacheline_aligned; > > > > #ifdef CONFIG_HVM > > -#define X86_EMU_LAPICXEN_X86_EMU_LAPIC > > -#define X86_EMU_HPET XEN_X

Re: [PATCH v1 13/16] drivers/vuart: move PL011 emulator code

2025-07-31 Thread dmkhn
On Thu, Jul 10, 2025 at 10:00:10AM -0700, Stefano Stabellini wrote: > On Thu, 10 Jul 2025, Jan Beulich wrote: > > On 10.07.2025 03:59, dm...@proton.me wrote: > > > On Tue, Jun 24, 2025 at 09:33:04AM +0200, Jan Beulich wrote: > > >> On 24.06.2025 09:31, dm...@proton.me wrote: > > >>> On Tue, Jun 24,

Re: [PATCH v4 3/8] x86/domain: allocate d->{iomem,irq}_caps before arch-specific initialization

2025-07-31 Thread dmkhn
On Thu, Jul 31, 2025 at 10:52:08PM +0300, Grygorii Strashko wrote: > Hi Denis, > > On 31.07.25 22:21, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Move IRQ/IOMEM rangesets allocation before arch_domain_create(). > > > > That guarantees that arch-specific code could access those rangesets

[PATCH v4 8/8] emul/vuart: introduce console forwarding enforcement via vUART

2025-07-31 Thread dmkhn
From: Denis Mukhin It may be useful to enforce console forwarding over the virtual UART. E.g. hardware domain uses PV console by default, but it may be necessary to have console forwarded to the hardware domain via emulated UART. Add CONFIG_VUART_CONSOLE_FOCUS to enforce such behavior. Signed-

[PATCH v4 6/8] tools/xl: enable NS16550-compatible UART emulator for HVM (x86)

2025-07-31 Thread dmkhn
From: Denis Mukhin Enable UART emulator to be individually configured per HVM-domain. Signed-off-by: Denis Mukhin --- Changes since v3: - new patch --- docs/man/xl.cfg.5.pod.in | 9 -- tools/golang/xenlight/helpers.gen.go | 4 +-- tools/golang/xenlight/types.gen.go | 3 +-

[PATCH v4 4/8] xen/8250-uart: update definitions

2025-07-31 Thread dmkhn
From: Denis Mukhin Added missing definitions needed for NS16550 UART emulator. Newly introduced MSR definitions re-used in the existing ns16550 driver. Also, corrected FCR DMA definition bit#3 (0x08) as per: https://www.ti.com/lit/ds/symlink/tl16c550c.pdf See "7.7.2 FIFO Control Register (FC

[PATCH v4 7/8] tools/xl: enable NS16550-compatible UART emulator for PVH (x86)

2025-07-31 Thread dmkhn
From: Denis Mukhin Enable virtual NS16550 for PVH domains in xl. {map,unmap}_domain_emuirq_pirq() infrastructure is modified by adding new type of interrupt resources 'IRQ_EMU' which means 'emulated device IRQ' (similarly to IRQ_MSI_EMU). This is necessary to for IOAPIC emulation code to skip

[PATCH v4 1/8] xen/domain: introduce common emulation flags

2025-07-31 Thread dmkhn
From: Denis Mukhin Add common emulation_flags for configuring domain emulation features. Print d->emulation_flags from 'q' keyhandler for better traceability while debugging. Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini --- Original patch: https://lore.kernel.org/xen-devel/20

[PATCH v4 2/8] emul/vuart: introduce framework for UART emulators

2025-07-31 Thread dmkhn
From: Denis Mukhin Introduce a driver framework to abstract UART emulators in the hypervisor. That allows for architecture-independent handling of virtual UARTs in the console driver and simplifies enabling new UART emulators. The framework is built under CONFIG_HAS_VUART, which will be automa

[PATCH v4 5/8] emul/vuart-ns16550: introduce NS16550-compatible UART emulator (x86)

2025-07-31 Thread dmkhn
From: Denis Mukhin Add initial in-hypervisor emulator for NS8250/NS16x50-compatible UARTs under CONFIG_VUART_NS16550 for x86 port of Xen. x86 port of Xen lacks vUART facility similar to Arm's SBSA emulator to support x86 guest OS bring up in the embedded setups. In parallel domain creation sce

[PATCH v4 3/8] x86/domain: allocate d->{iomem,irq}_caps before arch-specific initialization

2025-07-31 Thread dmkhn
From: Denis Mukhin Move IRQ/IOMEM rangesets allocation before arch_domain_create(). That guarantees that arch-specific code could access those rangesets to register traps for emulation. It is necessary for those emulators registering trap handlers and ensuring that emulated IRQs are not shared

[PATCH v4 0/8] x86: introduce NS16550-compatible UART emulator

2025-07-31 Thread dmkhn
x86 port of Xen lacks vUART facility similar to Arm's vpl011 to support x86 guest OS bring up in the embedded setups. This patch series introduces initial in-hypervisor emulator for NS8250/NS16x50-compatible UARTs under CONFIG_VUART_NS16550. In parallel domain creation scenario (hyperlaunch), NS1

Re: [PATCH] ns16550: ensure polling timer is disarmed

2025-07-30 Thread dmkhn
On Wed, Jul 30, 2025 at 10:12:54AM +0200, Jan Beulich wrote: > On 30.07.2025 05:13, dm...@proton.me wrote: > > From: Denis Mukhin > > > > As it stands, polling timer is kept in the list of timers even after the > > interrupts have been enabled / polling disabled on ns16550-compatible UART. > > > >

Re: [PATCH v1] xen/console: remove __printk_ratelimit()

2025-07-30 Thread dmkhn
On Wed, Jul 30, 2025 at 07:35:04AM +0200, Jan Beulich wrote: > On 30.07.2025 00:18, dm...@proton.me wrote: > > On Mon, Jul 28, 2025 at 11:32:43AM +0200, Jan Beulich wrote: > >> On 26.07.2025 11:20, Julien Grall wrote: > >>> On 25/07/2025 22:24, dm...@proton.me wrote: > From: Denis Mukhin > >>

[PATCH v13 0/3] xen/domain: domain ID allocation

2025-07-30 Thread dmkhn
Patch 1 introduces new domid_{alloc,free} calls. Patch 2 introduces some basic testing for domain ID allocator. Patch 3 adjusts create_dom0() messages (use %pd). Link to v12: https://lore.kernel.org/xen-devel/20250730033414.1614441-1-dmuk...@ford.com/ Link to CI: https://gitlab.com/xen-project/p

[PATCH v13 2/3] tools/tests: introduce unit tests for domain ID allocator

2025-07-30 Thread dmkhn
From: Denis Mukhin Introduce some basic infrastructure for doing domain ID allocation unit tests, and add a few tests that ensure correctness of the domain ID allocator. Signed-off-by: Denis Mukhin --- Changes since v12: - fixed Makefile - dropped unused symbols/includes from the test harness

[PATCH v13 3/3] xen/domain: update create_dom0() messages

2025-07-30 Thread dmkhn
From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin Reviewed-by: Alejandro Vallejo Acked-by: Jan Beulich --- Changes since v12: - n/a --- xen/arch/arm/domain_build.c | 6 +++--- xen/arch/x86/setup.

[PATCH v13 1/3] xen/domain: unify domain ID allocation

2025-07-30 Thread dmkhn
From: Denis Mukhin Currently, there are two different domain ID allocation implementations: 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; 2) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use max_init_domid (both Arm and x86). The domain I

[PATCH v12 3/3] xen/domain: update create_dom0() messages

2025-07-29 Thread dmkhn
From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin Reviewed-by: Alejandro Vallejo Acked-by: Jan Beulich --- Changes since v11: - Dropped use of %pd for non-existing domain in Arm's code - Added Jan

[PATCH v12 2/3] tools/tests: introduce unit tests for domain ID allocator

2025-07-29 Thread dmkhn
From: Denis Mukhin Introduce some basic infrastructure for doing domain ID allocation unit tests, and add a few tests that ensure correctness of the domain ID allocator. Signed-off-by: Denis Mukhin --- Changes since v11: - simplified test, dropped dom0less variant --- tools/tests/Makefile

[PATCH v12 0/3] xen/domain: domain ID allocation

2025-07-29 Thread dmkhn
Patch 1 introduces new domid_{alloc,free} calls. Patch 2 introduces some basic testing for domain ID allocator. Patch 3 adjusts create_dom0() messages (use %pd). Link to v11: https://lore.kernel.org/xen-devel/20250728183427.1013975-1-dmuk...@ford.com/ Link to CI: https://gitlab.com/xen-project/p

[PATCH v12 1/3] xen/domain: unify domain ID allocation

2025-07-29 Thread dmkhn
From: Denis Mukhin Currently, there are two different domain ID allocation implementations: 1) Sequential IDs allocation in dom0less Arm code based on max_init_domid; 2) Sequential IDs allocation in XEN_DOMCTL_createdomain; does not use max_init_domid (both Arm and x86). The domain I

[PATCH] ns16550: ensure polling timer is disarmed

2025-07-29 Thread dmkhn
From: Denis Mukhin As it stands, polling timer is kept in the list of timers even after the interrupts have been enabled / polling disabled on ns16550-compatible UART. Ensure polling timer is removed from the timer list once UART interrupts are enabled. Signed-off-by: Denis Mukhin --- xen/dr

[PATCH] ns16550: remove trailing whitespaces

2025-07-29 Thread dmkhn
From: Denis Mukhin Remove trailing whitespaces in NS16550-compatible UART driver. Signed-off-by: Denis Mukhin --- xen/drivers/char/ns16550.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 0bbbafb49

Re: [PATCH v11 3/3] xen/domain: update create_dom0() messages

2025-07-29 Thread dmkhn
On Tue, Jul 29, 2025 at 10:11:31AM +0200, Jan Beulich wrote: > On 28.07.2025 20:34, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Use %pd for domain identification in error/panic messages in create_dom0(). > > Except that ... > > > --- a/xen/arch/arm/domain_build.c > > +++ b/xen/arch/arm

Re: [PATCH v11 1/3] xen/domain: unify domain ID allocation

2025-07-29 Thread dmkhn
On Tue, Jul 29, 2025 at 12:34:25PM +0200, Alejandro Vallejo wrote: Thanks for review! > On Mon Jul 28, 2025 at 8:34 PM CEST, dmkhn wrote: > > From: Denis Mukhin > > > > Currently, there are two different domain ID allocation implementations: > > > > 1) Sequ

Re: [PATCH v1] xen/console: remove __printk_ratelimit()

2025-07-29 Thread dmkhn
On Mon, Jul 28, 2025 at 11:32:43AM +0200, Jan Beulich wrote: > On 26.07.2025 11:20, Julien Grall wrote: > > On 25/07/2025 22:24, dm...@proton.me wrote: > >> From: Denis Mukhin > >> > >> __printk_ratelimit() is never used outside of the console driver. > >> Remove it from the lib.h and merge with t

Re: [PATCH v2] xen/arm, xen/common: Add Kconfig option to control Dom0 boot

2025-07-29 Thread dmkhn
On Tue, Jul 29, 2025 at 10:20:54AM +0200, Jan Beulich wrote: > On 28.07.2025 23:28, dm...@proton.me wrote: > > On Mon, Jul 28, 2025 at 05:07:30PM +, Oleksii Moisieiev wrote: > >> This commit introduces a new Kconfig option, `CONFIG_DOM0_BOOT`, to > >> allow for building Xen without support for

Re: [PATCH v2] xen/arm, xen/common: Add Kconfig option to control Dom0 boot

2025-07-28 Thread dmkhn
On Mon, Jul 28, 2025 at 05:07:30PM +, Oleksii Moisieiev wrote: > This commit introduces a new Kconfig option, `CONFIG_DOM0_BOOT`, to > allow for building Xen without support for booting a regular domain (Dom0). > This functionality is primarily intended for the ARM architecture. > > A new Kcon

[PATCH v1 1/2] drivers/ehci-dbgp: remove use of run_in_exception_handle()

2025-07-28 Thread dmkhn
From: Denis Mukhin Polling is relevant for early boot only where facilities requiring run_in_exception_handler() are not used (e.g. 'd' keyhandler). Rework ehci_dbgp_poll() by droppping use of run_in_exception_handler(). The ground work for run_in_exception_handler() removal was done under XSA

[PATCH v1 2/2] drivers/ns16550: remove use of run_in_exception_handler()

2025-07-28 Thread dmkhn
From: Denis Mukhin Polling is relevant for early boot only where facilities requiring run_in_exception_handler() are not used (e.g. 'd' keyhandler). Rework ns16550_poll() by droppping use of run_in_exception_handler(). The ground work for run_in_exception_handler() removal was done under XSA-4

  1   2   3   4   5   >