[PATCH] xen/include: introduce resource.h

2025-02-07 Thread dmkhn
Move resource definitions to a new architecture-agnostic shared header file. Signed-off-by: Denis Mukhin --- Link to the original patch: https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-18-c5d36b31d...@ford.com/ --- --- xen/common/device-tree/device-tree.c | 21 +

[PATCH] x86/hvm: add HVM-specific Kconfig

2025-02-07 Thread dmkhn
Add separate menu for configuring HVM build-time settings to help organizing HVM-specific options. Signed-off-by: Denis Mukhin --- Link to the original patch: https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-20-c5d36b31d...@ford.com/ --- --- xen/arch/x86/Kconfig | 76 +--

[PATCH] xen/console: introduce is_console_printable()

2025-02-07 Thread dmkhn
Add is_console_printable() to implement a common check for printable characters in the UART emulation and guest logging code. Signed-off-by: Denis Mukhin --- xen/arch/arm/vuart.c | 5 ++--- xen/arch/x86/hvm/hvm.c | 5 ++--- xen/drivers/char/console.c | 3 +-- xen/include/xen/console.h

[PATCH] xen/console: introduce is_console_printable()

2025-02-06 Thread dmkhn
From: Denis Mukhin Add is_console_printable() to implement a common check for printable characters in the UART emulation and guest logging code. Signed-off-by: Denis Mukhin --- Link to the original patch: https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-1-c5d36b31d...@ford.com/

[PATCH v2] xen/console: introduce is_console_printable()

2025-02-10 Thread dmkhn
From: Denis Mukhin Add is_console_printable() to implement a common check for printable characters in the UART emulation and guest logging code. Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini --- Changes in v2: - switched from tabs to 4 spaces - Link to v1: https://lore.kernel.or

[PATCH] tools: fix typo in sysconfig.xencommons.in

2025-02-10 Thread dmkhn
From: Denis Mukhin Signed-off-by: Denis Mukhin --- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in index 1bdd830d8a..17

[PATCH] arm/vuart: move vpl011-related code to vpl011 emulator

2025-02-10 Thread dmkhn
From: Denis Mukhin Xen console driver has vpl011-related logic which shall belong vpl011 emulator code (Arm port). Move vpl011-related code from arch-independent console driver to Arm's vpl011.c. Signed-off-by: Denis Mukhin --- Link to the original patch: https://lore.kernel.org/xen-devel/20

[PATCH v2] xen/include: introduce resource.h

2025-02-11 Thread dmkhn
From: Denis Mukhin Move resource definitions to a new architecture-agnostic shared header file. Signed-off-by: Denis Mukhin --- Changes in v2: - Formatting fixes - Link to v1: https://lore.kernel.org/xen-devel/20250207231814.3863449-1-dmuk...@ford.com/ --- xen/common/device-tree/device-tree.c

[PATCH v2] xen/console: print Xen version via keyhandler

2025-02-13 Thread dmkhn
From: Denis Mukhin Add Xen version printout to 'h' keyhandler output. That is useful for debugging systems that have been left intact for a long time. Signed-off-by: Denis Mukhin --- Changes since v1: - Moved version printout to 'h' keyhandler - Kept the build-id reporting past Xen version pri

[PATCH] xen/console: make console buffer size configurable

2025-02-12 Thread dmkhn
Add new CONRING_SIZE Kconfig parameter to specify the boot console buffer size in bytes. The value is rounded to the nearest power of 2 to match existing conring_size= behavior. The supported range is [16KiB..128MiB]. Bump default size to 32 KiB. Link: https://gitlab.com/xen-project/xen/-/issues

[PATCH v4] xen/console: print Xen version via keyhandler

2025-02-14 Thread dmkhn
Add Xen version printout to 'h' keyhandler output. That is useful for debugging systems that have been left intact for a long time. Signed-off-by: Denis Mukhin --- Changes since v3: - Dropped assertions for build_id_p --- xen/common/keyhandler.c| 4 xen/common/version.c | 23 +++

[PATCH v3] xen/console: print Xen version via keyhandler

2025-02-13 Thread dmkhn
Add Xen version printout to 'h' keyhandler output. That is useful for debugging systems that have been left intact for a long time. Signed-off-by: Denis Mukhin --- Changes since v2: - moved new function declarations to xen/lib.h - dropped xen_ prefix in new functions --- xen/common/keyhandler.c

[PATCH 0/3] x86/irq: cleanup use of open-coded values

2025-03-14 Thread dmkhn
Remove uses of open-coded value 16 in x86's interrupt management code to enhance readability. Patch 0 makes a cosmetic rename NR_ISAIRQS -> NR_ISA_IRQS as per code review [1]. Patch 1 makes use of NR_ISA_IRQS in the code where necessary. Patch 2 adds new symbol APIC_VECTOR_VALID and makes use

[PATCH v2] x86/irq: introduce APIC_VECTOR_VALID()

2025-03-20 Thread dmkhn
Add new macro APIC_VECTOR_VALID() to validate the interrupt vector range as per [1]. This macro replaces hardcoded checks against the open-coded value 16 in LAPIC and virtual LAPIC code and simplifies the code a bit. [1] Intel SDM volume 3A Chapter "ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER"

[PATCH v3] x86/hvm: add HVM-specific Kconfig

2025-03-14 Thread dmkhn
Add a separate menu for configuring HVM build-time settings to better organize HVM-specific options. HVM options will now appear in a dedicated sub-menu in the menuconfig tool. Also, make AMD_SVM config dependent on AMD config and INTEL_VMX on INTEL respectively. Signed-off-by: Denis Mukhin ---

[PATCH 1/3] x86/irq: rename NR_ISAIRQS to NR_ISA_IRQS

2025-03-14 Thread dmkhn
Rename NR_ISAIRQS to NR_ISA_IRQS to enhance readability. No functional changes. Signed-off-by: Denis Mukhin --- xen/arch/x86/hvm/hvm.c | 4 ++-- xen/arch/x86/hvm/vpt.c | 2 +- xen/arch/x86/include/asm/hvm/irq.h | 4 ++-- xen/arch/x86/physdev.c | 2 +- xen/dri

[PATCH 2/3] x86/irq: use NR_ISA_IRQS instead of open-coded value

2025-03-14 Thread dmkhn
Replace the open-coded value 16 with the NR_ISA_IRQS symbol to enhance readability. No functional changes. Signed-off-by: Denis Mukhin --- xen/arch/x86/hvm/dm.c | 2 +- xen/arch/x86/hvm/irq.c | 17 + xen/arch/x86/hvm/vpic.c| 4 ++-- xen/arch/x86/includ

[PATCH v1 3/8] xen/domain: introduce domid_top

2025-03-18 Thread dmkhn
Rename max_init_domid to domid_top to align with its usage in the code (Arm), where it represents the upper boundary of the non-system domain ID range. Relocate the domid_top declaration to an architecture-independent location. Signed-off-by: Denis Mukhin --- xen/arch/arm/dom0less-build.c

[PATCH v1 8/8] xen/console: introduce console_get_focus()

2025-03-18 Thread dmkhn
Add console_get_focus() as a console public API to the retrieve current console owner domain ID. Make console_{get,put}_domain() private and simplify vpl011 code a bit. Signed-off-by: Denis Mukhin --- xen/arch/arm/vpl011.c | 5 + xen/drivers/char/console.c | 9 +++-- xen/include/xe

[PATCH v1 6/8] xen/console: rename console_rx to console_focus

2025-03-18 Thread dmkhn
Update the symbol name in preparation for the semantic change to the physical console input owner domain identifier. No functional change. Signed-off-by: Denis Mukhin --- xen/drivers/char/console.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/xen

[PATCH v1 2/8] xen/console: introduce console input permission

2025-03-18 Thread dmkhn
Add new flag in domain structure for marking permission to intercept the physical console input by the domain. Update console input switch logic accordingly. Signed-off-by: Denis Mukhin --- xen/arch/arm/vpl011.c | 2 ++ xen/arch/x86/pv/shim.c | 2 ++ xen/common/domain.c| 2 +

[PATCH v1 4/8] xen/domain: introduce domid_alloc()

2025-03-18 Thread dmkhn
Move domain ID allocation to a dedicated function domid_alloc() and use it during domain creation. Update domid_top within domid_alloc() to reflect the highest known domain ID. Initialize domid_top using the result of get_initial_domain_id(). Allocation algorithm: - If an explicit domain ID is p

[PATCH v1 5/8] xen/console: rename switch_serial_input() to console_switch_focus()

2025-03-18 Thread dmkhn
Update the name to emphasize the physical console input switch to a new owner domain following the naming notation in the console driver. No functional change. Signed-off-by: Denis Mukhin --- xen/drivers/char/console.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xe

[PATCH v1 7/8] xen/console: introduce console_set_focus()

2025-03-18 Thread dmkhn
Switch console_focus address space from integers mapped to domain IDs to direct domain IDs, simplifying the console input switching code. Introduce console_set_focus() to set the console owner domain identifier. Signed-off-by: Denis Mukhin --- xen/drivers/char/console.c | 81 ---

[PATCH v1 1/8] xen/console: fix trailing whitespaces

2025-03-18 Thread dmkhn
Remove trailing whitespaces in the console driver. No functional change. Signed-off-by: Denis Mukhin --- xen/drivers/char/console.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index ba428199d2..c3150fbdb7 1006

[PATCH v1 0/8] xen/console: cleanup console input switch logic

2025-03-18 Thread dmkhn
Currently, on x86, console input can be rotated in round-robin manner only between dom0, PV shim, and Xen itself. On Arm the input rotation can include domUs with vpl011. The patch series introduces the concept of "console focus", which is defined as the ID of the domain that currently owns the

[PATCH v3] x86/emulate: Remove HAVE_AS_RDRAND and HAVE_AS_RDSEED

2025-04-04 Thread dmkhn
From: Denis Mukhin The new toolchain baseline knows the rdrand/rdseed instructions, no need to carry the workaround in the code. Resolves: https://gitlab.com/xen-project/xen/-/work_items/208 Signed-off-by: Denis Mukhin --- Changes since v2: - updated arch_get_random() - Link to v2: https://lor

[PATCH v3] x86/vmx: Rework VMX wrappers using `asm goto()`

2025-04-04 Thread dmkhn
From: Denis Mukhin Improve error handling in VMX wrappers by switching to `asm goto()` where possible. Resolves: https://gitlab.com/xen-project/xen/-/work_items/210 Signed-off-by: Denis Mukhin --- Changes since v2: - dropped vmread changes - checked \n\t formatting - Link to v2: https://lore.k

[PATCH v2 0/7] xen/console: cleanup console input switch logic

2025-04-05 Thread dmkhn
Currently, on x86, console input can be rotated in round-robin manner only between dom0, PV shim, and Xen itself. On Arm the input rotation can include domUs with vpl011. The patch series introduces the concept of "console focus", which is defined as the ID of the domain that currently owns the

[PATCH v2 4/6] x86/emulate: remove HAVE_AS_SSE4_2

2025-04-05 Thread dmkhn
From: Denis Mukhin The new toolchain baseline knows the crc32 instructions, no need to carry the workaround in the code. Resolves: https://gitlab.com/xen-project/xen/-/work_items/206 Signed-off-by: Denis Mukhin --- xen/arch/x86/arch.mk | 1 - xen/arch/x86/x86_emulate/x86_emul

[PATCH v1 0/3] xen/console: few cleanups in console driver

2025-04-05 Thread dmkhn
The patch series introduces a few cleanups aimed at reducing code duplication in the console driver. Originally, patches 2 and 3 were part of NS16550 emulator v3 series [1]. Patch 1 removes some code duplication for logging via conring facility. Patch 2 (see [2]) removes code duplication between

[PATCH v2 1/6] x86/vmx: remove HAVE_AS_{EPT,VMX}, GAS_VMX_OP() and *_OPCODE

2025-04-05 Thread dmkhn
From: Denis Mukhin The new toolchain baseline knows the VMX instructions, no need to carry the workaround in the code. Move asm for vmxoff directly on the only callsite in vmcs.c Updated formatting for all __xxx() calls to be consistent. Resolves: https://gitlab.com/xen-project/xen/-/work_item

[PATCH v1] x86/domain: revisit logging in arch_domain_create()

2025-04-05 Thread dmkhn
From: Denis Mukhin Use %pd in all logs issued from arch_domain_create(). Also, expand error message in arch_domain_create() under !emulation_flags_ok() case to help debugging. Signed-off-by: Denis Mukhin --- The origin of the patch is: https://lore.kernel.org/xen-devel/20250103-vuart-ns8250

[PATCH v3] x86/domain: revisit logging in arch_domain_create()

2025-04-05 Thread dmkhn
From: Denis Mukhin Use %pd in all logs issued from arch_domain_create(). Also, expand error message in arch_domain_create() under !emulation_flags_ok() case to help debugging. Signed-off-by: Denis Mukhin --- Changes since v2: - dropped full stops in the updated log messages --- xen/arch/x86/d

[PATCH v2 6/7] xen/console: introduce console_set_focus()

2025-04-05 Thread dmkhn
From: Denis Mukhin Switch console_focus address space from integers mapped to domain IDs to direct domain IDs, simplifying the console input switching code. Introduce console_set_focus() to set the console owner domain identifier. Signed-off-by: Denis Mukhin --- Changes since v1: - update cons

[PATCH v1 0/3] xen/domain: updates to hardware emulation flags

2025-04-05 Thread dmkhn
The patch series introduces use of d->arch.emulation_flags for non-x86 platforms (patch 1) and hooks emulation_flags to 'q' keyhandler for debugging. emulation_flags on non-x86 systems will be used in the follow on virtual UARTs clean up series. Also, series adds helper macros (patch 2) which are

[PATCH v4] x86/domain: revisit logging in arch_domain_create()

2025-04-04 Thread dmkhn
From: Denis Mukhin Use %pd in all logs issued from arch_domain_create() and reword some of the messages. Also, expand error message in arch_domain_create() under !emulation_flags_ok() case to help debugging. Signed-off-by: Denis Mukhin --- Changes since v3: - re-formatted log messages - shorte

[PATCH v1] x86/vmx: Rework __vmread()/vmread_safe()/vmr()

2025-04-07 Thread dmkhn
From: Denis Mukhin Use `asm goto()` in vmread_safe() to simplify the error handling logic. Update __vmread() to return `unsigned long` as per suggestion in [1]. Rename __vmread() to vmread_unsafe() to match the behavior. Update all call sites everywhere. Drop `UNLIKELY_*()`. Group all vmread*()

[PATCH v5] x86/domain: revisit logging in arch_domain_create()

2025-04-08 Thread dmkhn
From: Denis Mukhin Use %pd in all logs issued from arch_domain_create() and reword some of the messages. Also, expand error message in arch_domain_create() under !emulation_flags_ok() case to help debugging. Signed-off-by: Denis Mukhin --- Changes since v4: - updated wording in the messages as

[PATCH v2 7/7] xen/console: introduce console_get_focus()

2025-04-01 Thread dmkhn
From: Denis Mukhin Add console_get_focus() as a console public API to the retrieve current console owner domain ID. Make console_{get,put}_domain() private and simplify vpl011 code a bit. Signed-off-by: Denis Mukhin --- xen/arch/arm/vpl011.c | 5 + xen/drivers/char/console.c | 9

[PATCH v2 2/7] xen/domain: introduce domid_alloc()

2025-03-31 Thread dmkhn
From: Denis Mukhin Move domain ID allocation during domain creation to a dedicated function domid_alloc(). Allocation algorithm: - If an explicit domain ID is provided, verify its availability and use it if ID is unused; - Otherwise, perform an exhaustive search for the first available ID wi

[PATCH v2 1/7] xen/console: introduce console input permission

2025-03-31 Thread dmkhn
From: Denis Mukhin Add new flag in domain structure for marking permission to intercept the physical console input by the domain. Update console input switch logic accordingly. Signed-off-by: Denis Mukhin --- Changes since v1: - dropped change in __serial_rx() --- xen/arch/arm/vpl011.c |

[PATCH v2 5/7] xen/console: rename console_rx to console_focus

2025-03-31 Thread dmkhn
From: Denis Mukhin Update the symbol name in preparation for the semantic change to the physical console input owner domain identifier. No functional change. Signed-off-by: Denis Mukhin --- Changes since v1: - keep the original console_focus description --- xen/drivers/char/console.c | 16 +++

[PATCH v1 2/3] x86/domain: add helpers to simplify emulation flags management

2025-03-31 Thread dmkhn
From: Denis Mukhin Introduce XEN_X86_EMU_BASELINE and XEN_X86_EMU_OPTIONAL to simplify d->arch.emulation_flags management in the code. Signed-off-by: Denis Mukhin --- tools/python/xen/lowlevel/xc/xc.c | 4 +--- xen/include/public/arch-x86/xen.h | 7 +++ 2 files changed, 8 insertions(+), 3

[PATCH v1 1/3] xen/domain: introduce non-x86 hardware emulation flags

2025-03-31 Thread dmkhn
From: Denis Mukhin Define per-architecture emulation_flags for configuring in-hypervisor emulators. Print d->arch.emulation_flags from 'q' keyhandler for better traceability while debugging in-hypervisor hardware emulators. Simplify the x86's emulation_flags description and make it consistent w

[PATCH v1 3/3] xen/domain: rewrite emulation_flags_ok()

2025-03-31 Thread dmkhn
From: Denis Mukhin Rewrite emulation_flags_ok() using XEN_X86_EMU_{OPTIONAL,BASELINE} to simplify future modifications. Signed-off-by: Denis Mukhin --- Came in the context of NS16550 emulator v3 series: https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-0-c5d36b31d...@ford.com/ A

[PATCH v2 4/7] xen/console: rename switch_serial_input() to console_switch_input()

2025-03-31 Thread dmkhn
From: Denis Mukhin Update the name to emphasize the physical console input switch to a new owner domain following the naming notation in the console driver. No functional change. Signed-off-by: Denis Mukhin --- Changes since v1: - rename console_switch_focus() to console_switch_input() --- xe

[PATCH v1 3/5] x86/vmx: remove GAS_VMX_OP()

2025-04-01 Thread dmkhn
From: Denis Mukhin Remove unneeded GAS_VMX_OP() macro, now that all used VMX instuctions are natively supported by the baseline compiler. Signed-off-by: Denis Mukhin --- xen/arch/x86/include/asm/hvm/vmx/vmx.h | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a

[PATCH v1 0/5] x86/asm: cleanups after toolchain baseline upgrade

2025-04-01 Thread dmkhn
Patches 1-4 remove various compiler workarounds in the hypervisor code for Intel's VMX instructions. Patch 5 removes compiler workaround for missing clac/stac instructions. CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/1747394875 Denis Mukhin (5): x86/vmx: remove HAVE_AS_VM

[PATCH v1 1/5] x86/vmx: remove HAVE_AS_VMX

2025-04-01 Thread dmkhn
From: Denis Mukhin Remove the workaround under HAVE_AS_VMX for older compilers, as the minimally required GCC 5.1 / Binutils 2.25, and Clang 11 natively support the VMX instructions used in the hypervisor code. Signed-off-by: Denis Mukhin --- xen/arch/x86/arch.mk | 3 +-- xe

[PATCH v1 4/5] x86/vmx: remove *_OPCODE

2025-04-01 Thread dmkhn
From: Denis Mukhin Remove all *_OPCODE definitions from vmx.h now that all used VMX instructions are natively supported by the baseline compiler. Use vmxon and vmxoff instructions directly. Update __vmxon() to account for vmxon use. Resolves: https://gitlab.com/xen-project/xen/-/work_items/202

[PATCH v1 2/5] x86/vmx: remove HAVE_AS_EPT

2025-04-01 Thread dmkhn
From: Denis Mukhin Remove the workaround under HAVE_AS_EPT for older compilers, as the minimally required GCC 5.1 / Binutils 2.25, and Clang 11 natively support the VMX instructions used in the hypervisor code. Signed-off-by: Denis Mukhin --- xen/arch/x86/arch.mk | 1 - xen/

[PATCH v1 5/5] x86/asm: remove HAVE_AS_CLAC_STAC

2025-04-01 Thread dmkhn
From: Denis Mukhin The new toolchain baseline knows the STAC/CLAC instructions, no need to carry the workaround in the code. Resolves: https://gitlab.com/xen-project/xen/-/work_items/203 Signed-off-by: Denis Mukhin --- xen/arch/x86/arch.mk | 1 - xen/arch/x86/include/asm/asm-d

[PATCH 3/3] x86/irq: introduce APIC_VECTOR_VALID

2025-03-14 Thread dmkhn
Add new symbol APIC_VECTOR_VALID to replace open-coded value 16 in LAPIC and virtual LAPIC code. See: Intel SDM volume 3A Chapter "ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER" Section "Valid Interrupt Vectors" No functional change. Signed-off-by: Denis Mukhin --- xen/arch/x86/cpu/mcheck/m

Re: [PATCH v1 3/4] CI: switch arm64 XTF test runner to qemu-xtf.sh

2025-04-17 Thread dmkhn
On Wed, Apr 16, 2025 at 05:12:55PM -0700, Stefano Stabellini wrote: > On Wed, 16 Apr 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Hook arm64 QEMU configuration to qemu-xtf.sh and use new script in arm64 CI > > jobs. > > > > Signed-off-by: Denis Mukhin > > Reviewed-by: Stefano Stab

Re: [PATCH v1 4/4] CI: add argo x86 XTF test

2025-04-17 Thread dmkhn
On Wed, Apr 16, 2025 at 05:11:51PM -0700, Stefano Stabellini wrote: > On Wed, 16 Apr 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Introduce new CI job to run x86 XTF argo test under QEMU to smoke test argo > > feature functionality in upstream CI. > > > > The new job lead time is ~3

Re: [PATCH v4 3/3] drivers: Make ioapic_sbdf and hpet_sbdf contain pci_sbdf_t

2025-04-15 Thread dmkhn
On Mon, Apr 14, 2025 at 08:19:18PM +0100, Andrii Sultanov wrote: > From: Andrii Sultanov > > Following a similar change to amd_iommu struct, make two more structs > take pci_sbdf_t directly instead of seg and bdf separately. This lets us > drop several conversions from the latter to the former an

Re: [PATCH v1 2/4] CI: switch x86 EFI smoke test runner to qemu-xtf.sh

2025-04-17 Thread dmkhn
On Wed, Apr 16, 2025 at 05:14:41PM -0700, Stefano Stabellini wrote: > On Wed, 16 Apr 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Use qemu-xtf.sh for qemu-smoke-x86-64-gcc-efi job. > > > > Lead time is reduced a bit since not all XTF code base is built, just the > > required test. >

Re: [PATCH v1 1/4] CI: unify x86 XTF test runner

2025-04-17 Thread dmkhn
On Wed, Apr 16, 2025 at 05:16:49PM -0700, Stefano Stabellini wrote: > On Wed, 16 Apr 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Add test runner script qemu-xtf.sh which is allows any XTF x86 test to be > > easily executed. Test runner is invoked from the qemu-smoke* jobs with the

Re: [PATCH v4 07/13] x86/hyperlaunch: obtain cmdline from device tree

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:29PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Add support to read the command line from the hyperlauunch device tree. > The device tree command line is located in the "bootargs" property of the > "multiboot,kernel" node. > > A boot loader comman

Re: [PATCH v4 08/13] x86/hyperlaunch: locate dom0 initrd with hyperlaunch

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:30PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Look for a subnode of type `multiboot,ramdisk` within a domain node and > parse via the fdt_read_multiboot_module() helper. After a successful > helper call, the module index is returned and the modul

Re: [PATCH v4 11/13] x86/hyperlaunch: add memory parsing to domain config

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:33PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Add three properties, memory, mem-min, and mem-max, to the domain node device > tree parsing to define the memory allocation for a domain. All three fields > are > expressed in kb and written as a u6

Re: [PATCH v4 12/13] x86/hyperlaunch: add max vcpu parsing of hyperlaunch device tree

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:34PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Introduce the `cpus` property, named as such for dom0less compatibility, that > represents the maximum number of vcpus to allocate for a domain. In the device > tree, it will be encoded as a u32 value

Re: [PATCH v4 13/13] x86/hyperlaunch: add capabilities to boot domain

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:35PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Introduce the ability to assign capabilities to a domain via its definition in > device tree. The first capability enabled to select is the control domain > capability. The capability property is a bi

Re: [PATCH v4 03/13] common/hyperlaunch: introduce the domain builder

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:25PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Introduce the domain builder which is capable of consuming a device tree as > the > first boot module. If it finds a device tree as the first boot module, it will > set its type to BOOTMOD_FDT. This

Re: [PATCH v4 05/13] x86/hyperlaunch: Add helpers to locate multiboot modules

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:27PM +0100, Alejandro Vallejo wrote: > Hyperlaunch mandates either a reg or module-index DT prop on nodes that > contain `multiboot,module" under their "compatible" prop. This patch > introduces a helper to generically find such index, appending the module > to the lis

Re: [PATCH v4 06/13] x86/hyperlaunch: locate dom0 kernel with hyperlaunch

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:28PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Look for a subnode of type `multiboot,kernel` within a domain node. If > found, locate it using the multiboot module helper to generically ensure > it lives in the module list. If the bootargs propert

Re: [PATCH v4 09/13] x86/hyperlaunch: add domain id parsing to domain config

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:31PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Introduce the ability to specify the desired domain id for the domain > definition. The domain id will be populated in the domid property of the > domain node in the device tree configuration. > > Si

Re: [PATCH v4 10/13] x86/hyperlaunch: specify dom0 mode with device tree

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:32PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Enable selecting the mode in which the domain will be built and ran. This > includes: > > - whether it will be either a 32/64 bit domain > - if it will be run as a PV or HVM domain > - and if i

Re: [PATCH v4 01/13] x86/boot: add cmdline to struct boot_domain

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:23PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Add a container for the "cooked" command line for a domain. This > provides for the backing memory to be directly associated with the > domain being constructed. This is done in anticipation that the

[PATCH v2 4/4] CI: add argo x86 XTF test

2025-04-18 Thread dmkhn
From: Denis Mukhin Introduce new CI job to run x86 XTF argo test under QEMU to smoke test argo feature functionality in upstream CI. The new job lead time is ~30s, limit max job duration to 60s. Signed-off-by: Denis Mukhin --- Depends on https://lore.kernel.org/xen-devel/20250416050443.9197

[PATCH v2 1/4] CI: unify x86 XTF test runner

2025-04-18 Thread dmkhn
From: Denis Mukhin Add test runner script qemu-xtf.sh which is allows any XTF x86 test to be easily executed. Test runner is invoked from the qemu-smoke* jobs with the hardcoded parameters. Each x86 XTF job lead time is reduced a bit since only the test-related code is built, not the entire XTF

[PATCH v2 3/4] CI: switch arm64 XTF test runner to qemu-xtf.sh

2025-04-18 Thread dmkhn
From: Denis Mukhin Hook arm64 QEMU configuration to qemu-xtf.sh and use new script in arm64 CI jobs. Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini --- Changes since v2: - removed TOP - dropped XEN_CONSOLE in favor of XEN_CMDLINE - I kept Stefano's R-b since the change was trivial

[PATCH v2 0/4] CI: updates to XTF CI runners

2025-04-18 Thread dmkhn
The series started from adding new argo XTF CI job and ended up with updating all XTF runners and related CI jobs. It unifies the XTF runner scripts so that it is possible to use one script for executing any XTF test under QEMU. That simplifies running XTFs locally and in CI. Patch 1 reworks x86

[PATCH v2 2/4] CI: switch x86 EFI smoke test runner to qemu-xtf.sh

2025-04-18 Thread dmkhn
From: Denis Mukhin Use qemu-xtf.sh for qemu-smoke-x86-64-gcc-efi job. Lead time is reduced a bit since not all XTF code base is built, just the required test. Signed-off-by: Denis Mukhin --- Changes since v2: - removed TOP - dropped XEN_CONSOLE in favor of XEN_CMDLINE --- automation/gitlab-ci

Re: [PATCH v4 04/13] x86/hyperlaunch: initial support for hyperlaunch device tree

2025-04-18 Thread dmkhn
On Thu, Apr 17, 2025 at 01:48:26PM +0100, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Add the ability to detect both a formal hyperlaunch device tree or a dom0less > device tree. If the hyperlaunch device tree is found, then count the number of > domain entries, reporting an error if m

[PATCH v3 1/4] CI: unify x86 XTF test runner

2025-04-22 Thread dmkhn
From: Denis Mukhin Add test runner script qemu-xtf.sh which is allows any XTF x86 test to be easily executed. Test runner is invoked from the qemu-smoke* jobs with the hardcoded parameters. Each x86 XTF job lead time is reduced a bit since only the test-related code is built, not the entire XTF

[PATCH v3 4/4] CI: add argo x86 XTF test

2025-04-22 Thread dmkhn
From: Denis Mukhin Introduce new CI job to run x86 XTF argo test under QEMU to smoke test argo feature functionality in upstream CI. The new job lead time is ~30s, limit max job duration to 60s. Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini --- Changes v2->v3: - Added Stefano's

[PATCH v3 3/4] CI: switch arm64 XTF test runner to qemu-xtf.sh

2025-04-22 Thread dmkhn
From: Denis Mukhin Hook arm64 QEMU configuration to qemu-xtf.sh and use new script in arm64 CI jobs. Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini --- Changes v2->v3: - .gitignore fixup - Kept Stefano's R-b since the change was trivial --- automation/gitlab-ci/test.yaml

[PATCH v3 2/4] CI: switch x86 EFI smoke test runner to qemu-xtf.sh

2025-04-22 Thread dmkhn
From: Denis Mukhin Use qemu-xtf.sh for qemu-smoke-x86-64-gcc-efi job. Lead time is reduced a bit since not all XTF code base is built, just the required test. Signed-off-by: Denis Mukhin --- Changes v2->v3: - use pv64 variant for EFI job --- automation/gitlab-ci/test.yaml| 2

[PATCH v3 0/4] CI: updates to XTF CI runners

2025-04-22 Thread dmkhn
The series started from adding new argo XTF CI job and ended up with updating all XTF runners and related CI jobs. It unifies the XTF runner scripts so that it is possible to use one script for executing any XTF test under QEMU. That simplifies running XTFs locally and in CI. Patch 1 reworks x86

Re: [PATCH v2 1/4] CI: unify x86 XTF test runner

2025-04-22 Thread dmkhn
On Mon, Apr 21, 2025 at 01:39:21PM -0700, Stefano Stabellini wrote: > On Sat, 19 Apr 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Add test runner script qemu-xtf.sh which is allows any XTF x86 test to be > > easily executed. Test runner is invoked from the qemu-smoke* jobs with the

Re: [PATCH v2 2/4] CI: switch x86 EFI smoke test runner to qemu-xtf.sh

2025-04-22 Thread dmkhn
On Mon, Apr 21, 2025 at 01:39:32PM -0700, Stefano Stabellini wrote: > On Sat, 19 Apr 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Use qemu-xtf.sh for qemu-smoke-x86-64-gcc-efi job. > > > > Lead time is reduced a bit since not all XTF code base is built, just the > > required test. >

Re: [PATCH v1 3/3] xen/domain: rewrite emulation_flags_ok()

2025-04-22 Thread dmkhn
On Tue, Apr 08, 2025 at 05:34:27PM +0200, Jan Beulich wrote: > On 01.04.2025 02:52, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Rewrite emulation_flags_ok() using XEN_X86_EMU_{OPTIONAL,BASELINE} > > to simplify future modifications. > > > > Signed-off-by: Denis Mukhin > > --- > > Came i

Re: [PATCH v1 2/3] xen/console: introduce console_puts()

2025-04-27 Thread dmkhn
On Fri, Apr 25, 2025 at 03:47:53PM -0700, Stefano Stabellini wrote: > On Thu, 3 Apr 2025, dm...@proton.me wrote: > > From: Denis Mukhin > > > > guest_console_write() duplicates the code from __putstr(), eliminate code > > duplication. > > > > Introduce console_puts() for writing a buffer to consol

Re: [PATCH v3 0/4] CI: updates to XTF CI runners

2025-04-22 Thread dmkhn
On Tue, Apr 22, 2025 at 01:54:06PM -0700, Stefano Stabellini wrote: > On Tue, 22 Apr 2025, dm...@proton.me wrote: > > > The series started from adding new argo XTF CI job and ended up with > > updating > > all XTF runners and related CI jobs. > > > > It unifies the XTF runner scripts so that it i

[PATCH v3] x86/vmx: Update __vmread() signature

2025-04-22 Thread dmkhn
From: Denis Mukhin Current implementation of __vmread() returns the result via pointer argument which leads to having excess code in some places. Update the signature of __vmread() to return `unsigned long` and drop the pointer argument as per suggestion in [1]. Rename __vmread() to vmread() as

[PATCH v4] xen/domain: unify domain ID allocation

2025-04-22 Thread dmkhn
From: Denis Mukhin Currently, hypervisor code has two different non-system domain ID allocation algorithms: (a) Arm port allocates IDs sequentially based on max_init_domid; (b) x86 has another algorithm implementation embedded into XEN_DOMCTL_createdomain; does not use max_init_domid,

Re: [PATCH v2] x86/vmx: Update __vmread() signature

2025-04-22 Thread dmkhn
On Tue, Apr 22, 2025 at 09:56:00AM +0200, Jan Beulich wrote: > On 22.04.2025 03:15, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Current implementation of __vmread() returns the result via pointer argument > > which leads to having excess code in some places. > > > > Update the signature

Re: [PATCH v1 2/3] x86/domain: add helpers to simplify emulation flags management

2025-04-22 Thread dmkhn
On Tue, Apr 08, 2025 at 05:23:17PM +0200, Jan Beulich wrote: > On 01.04.2025 02:52, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Introduce XEN_X86_EMU_BASELINE and XEN_X86_EMU_OPTIONAL to simplify > > d->arch.emulation_flags management in the code. > > If the simplification is limited to

Re: [PATCH v3] xen/domain: unify domain ID allocation

2025-04-22 Thread dmkhn
On Thu, Apr 17, 2025 at 11:47:07AM +0200, Jan Beulich wrote: > On 16.04.2025 08:15, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Unify the logic of domain ID allocation, so that both the initial domain > > creation and the usage by domctl use the same helper function across > > architectu

Re: [PATCH 2/2] tools/xen-hptool: Replace hard tabs

2025-04-23 Thread dmkhn
On Wed, Apr 23, 2025 at 05:28:21PM -0400, Jason Andryuk wrote: > With a tab stop of 8, the alignment is off. Replace the hard tabs with > spaces to match the file. > > Fixes: 284d5633be37 ("Tools: add online/offline hotplug user interfaces") > Signed-off-by: Jason Andryuk Reviewed-by: Denis Muk

Re: [PATCH 1/2] tools/xen-hptool: Add missing newlines

2025-04-23 Thread dmkhn
On Wed, Apr 23, 2025 at 05:28:20PM -0400, Jason Andryuk wrote: > Add some missing newlines to error messages. > > Fixes: 284d5633be37 ("Tools: add online/offline hotplug user interfaces") > Signed-off-by: Jason Andryuk Reviewed-by: Denis Mukhin > --- > tools/misc/xen-hptool.c | 4 ++-- > 1 fi

Re: [PATCH] xen/vpci: Fix msix existing mapping printk

2025-04-23 Thread dmkhn
On Wed, Apr 23, 2025 at 05:22:29PM -0400, Jason Andryuk wrote: > The format string lacks a space, so mfn and type run together: > (XEN) d0v0 :06:00.7: existing mapping (mfn: 753037type: 0) at 0x1 > clobbers MSIX MMIO area > > Add a space. > > Signed-off-by: Jason Andryuk Reviewed-by: Denis

Re: [PATCH v4] xen/domain: unify domain ID allocation

2025-04-23 Thread dmkhn
Hi Julien, Thanks a lot for review! On Wed, Apr 23, 2025 at 12:22:39PM +0100, Julien Grall wrote: > Hi Denis, > > On 22/04/2025 22:54, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Currently, hypervisor code has two different non-system domain ID allocation > > algorithms: > > > >(a

[PATCH v4 2/3] x86/vmx: Update DR7 type

2025-04-26 Thread dmkhn
From: Denis Mukhin Convert the DR7 type to `unsigned int` and fix the accesses where necessary. [1] https://lore.kernel.org/xen-devel/0d01646b-83e3-4a02-b365-d149d2664...@citrix.com/ Signed-off-by: Denis Mukhin --- xen/arch/x86/hvm/vmx/vmx.c| 2 +- xen/arch/x86/include/asm/domain.h |

[PATCH v4 0/3] x86/vmx: Update __vmread()

2025-04-26 Thread dmkhn
The patch series reworks __vmread() by introducing a new cleaner API. Patch 1 introduces a new vmread() call which will be a replacement for __vmcall(). Patch 2 updates the type of arch_vcpu->dr7 field. Patch 3 replaces __vmread() with vmread(). Link to v3: https://lore.kernel.org/xen-devel/2025

[PATCH v4 3/3] x86/vmx: Replace __vmread() with vmread()

2025-04-26 Thread dmkhn
From: Denis Mukhin Use vmread() instead of __vmread() as per suggestion in [1] everywhere in the VT-x code. Remove __vmread() and update ECLAIR configuration. [1] https://lore.kernel.org/xen-devel/0d01646b-83e3-4a02-b365-d149d2664...@citrix.com/ Signed-off-by: Denis Mukhin --- docs/misra/fu

[PATCH v2 2/3] xen/console: introduce console_puts()

2025-04-26 Thread dmkhn
From: Denis Mukhin guest_console_write() duplicates the code from __putstr(), eliminate code duplication. Introduce console_puts() for writing a buffer to console devices. Also, introduce internal console flags to control which console devices should be used. Signed-off-by: Denis Mukhin --- C

[PATCH v2 0/3] xen/console: few cleanups in console driver

2025-04-26 Thread dmkhn
The patch series introduces a few cleanups aimed at reducing code duplication in the console driver. Originally, patches 2 and 3 were part of NS16550 emulator v3 series [1]. Patch 1 removes some code duplication for logging via conring facility. Patch 2 (see [2]) removes code duplication between

  1   2   3   4   5   >