Re: Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-28 Thread Paul Moore
On Tue, Jan 28, 2025 at 6:22 AM Joel Granados wrote: > On Mon, Jan 27, 2025 at 03:42:39PM +, Matthew Wilcox wrote: > > On Mon, Jan 27, 2025 at 04:55:58PM +0200, Jani Nikula wrote: > > > You could have static const within functions too. You get the rodata > > > protection and function local sco

Re: [PATCH v3 13/24] xen/console: introduce hwdom_crashconsole=

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin > > The new command line switch `hwdom_crashconsole=BOOL` allows to switch serial > console input focus to xen for machine state inspection using keyhandler > mechanism after the hardware domain crashes. > > The new comma

Re: slow start of Pod HVM domU with qemu 9.1

2025-01-28 Thread Edgar E. Iglesias
On Tue, Jan 28, 2025 at 03:15:44PM +0100, Olaf Hering wrote: > Hello, > > starting with qemu 9.1 a PoD HVM domU takes a long time to start. > Depending on the domU kernel, it may trigger a warning, which prompted me > to notice this change in behavior: > > [0.00] Linux version 4.12.14-120

Re: [PATCH v3 11/24] xen/domain: move get_initial_domain_id() to arch-independent header

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin > > Honor 'hardware_domid=' parameter across all architectures In which way is it not honored right now (besides depending on LATE_HWDOM=y)? It is, for example, not supposed to be the case that in a late-hwdom configurati

Re: [PATCH v3 19/24] xen/8250-uart: add missing definitions

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > @@ -51,12 +54,19 @@ > #define UART_IIR_THR 0x02/* - tx reg. empty */ > #define UART_IIR_MSI 0x00/* - MODEM status */ > #define UART_IIR_BSY 0x07/* - busy detect (DW) */ > +#define UART_IIR_FE 0xC

Re: [for-4.20][PATCH 2/2] xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-28 Thread Alejandro Vallejo
On Mon Jan 27, 2025 at 5:14 PM GMT, Michal Orzel wrote: > > > On 27/01/2025 18:03, Alejandro Vallejo wrote: > > > > > > Hi, > > > > On Mon Jan 27, 2025 at 10:45 AM GMT, Michal Orzel wrote: > >> On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > >> arch/arm/platforms/vexp

[PATCH for-4.20 2/2] x86/irq: drop fixup_irqs() parameters

2025-01-28 Thread Roger Pau Monne
The solely remaining caller always passes the same globally available parameters. Drop the parameters and modify fixup_irqs() to use cpu_online_map in place of the input mask parameter, and always be verbose in its output printing. While there remove some of the checks given the single context wh

Re: [for-4.20][PATCH v2 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-28 Thread Julien Grall
On Tue, 28 Jan 2025 at 06:40, Michal Orzel wrote: > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > common/device-tree/bootfdt.c: In function 'build_assertions': > ./include/xen/macros.h:47:31: error: static assertion failed: > "!(alignof(struct membanks) != 8)" >4

Re: [PATCH 0/3] tools/hvmloader: Decouple APIC IDs from vCPU IDs

2025-01-28 Thread Alejandro Vallejo
On Tue Jan 28, 2025 at 5:45 PM GMT, Roger Pau Monné wrote: > On Tue, Jan 28, 2025 at 04:33:39PM +, Alejandro Vallejo wrote: > > The hypervisor, hvmloader and the toolstack currently engage in a shared > > assumption that for every vCPU apicid == 2 * vcpuid. This series removes > > such > > ass

Re: [PATCH 1/3] tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves

2025-01-28 Thread Alejandro Vallejo
On Tue Jan 28, 2025 at 5:59 PM GMT, Roger Pau Monné wrote: > On Tue, Jan 28, 2025 at 04:33:40PM +, Alejandro Vallejo wrote: > > Make it so the APs expose their own APIC IDs in a lookup table (LUT). We > > can use that LUT to populate the MADT, decoupling the algorithm that > > relates CPU IDs a

Re: [PATCH v1 1/3] xen/riscv: implement software page table walking

2025-01-28 Thread Jan Beulich
On 27.01.2025 18:22, Oleksii Kurochko wrote: > On 1/27/25 1:57 PM, Jan Beulich wrote: >> On 27.01.2025 13:29, Oleksii Kurochko wrote: >>> On 1/27/25 11:06 AM, Jan Beulich wrote: On 20.01.2025 17:54, Oleksii Kurochko wrote: > RISC-V doesn't have hardware feature to ask MMU to translate

Re: [PATCH v1 1/3] xen/riscv: implement software page table walking

2025-01-28 Thread Jan Beulich
On 27.01.2025 18:41, Oleksii Kurochko wrote: > > On 1/27/25 6:22 PM, Oleksii Kurochko wrote: >> >> >> On 1/27/25 1:57 PM, Jan Beulich wrote: >>> On 27.01.2025 13:29, Oleksii Kurochko wrote: On 1/27/25 11:06 AM, Jan Beulich wrote: > On 20.01.2025 17:54, Oleksii Kurochko wrote: >> RISC-

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-28 Thread Gerd Hoffmann
On Sat, Jan 25, 2025 at 07:13:34PM +0100, Philippe Mathieu-Daudé wrote: > Some SysBus devices can optionally be dynamically plugged onto > the sysbus-platform-bus (then virtual guests are aware of > mmio mapping and IRQs via device tree / ACPI rules). Do we have some sane way to have user-pluggabl

Re: [for-4.20][PATCH v2 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-28 Thread Luca Fancellu
Hi Michal, Julien, > On 28 Jan 2025, at 09:40, Michal Orzel wrote: > > On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: > common/device-tree/bootfdt.c: In function 'build_assertions': > ./include/xen/macros.h:47:31: error: static assertion failed: > "!(alignof(struct me

Re: [PATCH v3 06/24] xen/domain: introduce hardware emulation flags

2025-01-28 Thread Jan Beulich
On 28.01.2025 00:57, Jason Andryuk wrote: > On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: >> --- /dev/null >> +++ b/xen/include/public/virtdev.h >> @@ -0,0 +1,61 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only */ >> +#ifndef XEN__PUBLIC_VIRTDEV_H >> +#define XEN__PUBLIC_VIRTDEV_H >> + >> +/

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-28 Thread Peter Maydell
On Tue, 28 Jan 2025 at 10:42, Gerd Hoffmann wrote: > > On Sat, Jan 25, 2025 at 07:13:34PM +0100, Philippe Mathieu-Daudé wrote: > > Some SysBus devices can optionally be dynamically plugged onto > > the sysbus-platform-bus (then virtual guests are aware of > > mmio mapping and IRQs via device tree

Re: [PATCH v3 04/24] xen/console: introduce console_{get,put}_domain()

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > @@ -529,14 +532,18 @@ static void switch_serial_input(void) > > static void __serial_rx(char c) > { > +struct domain *d; > int rc = 0; > > -switch ( console_rx ) > -{ > -case 0: > +if ( console_rx == 0 ) >

[for-4.20][PATCH v2 0/2] xen/arm CONFIG_PHYS_ADDR_T_32=y fixes

2025-01-28 Thread Michal Orzel
This series contains build fixes when CONFIG_PHYS_ADDR_T_32=y. @Oleksii: This is a release blocker. Michal Orzel (2): device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y xen/arch/arm/include/asm/mm.h| 2 +- xen/common/

Re: [PATCH 2/2] tests/qtest: Make qtest_has_accel() generic

2025-01-28 Thread Thomas Huth
On 28/01/2025 12.18, Philippe Mathieu-Daudé wrote: Since commit b14a0b7469f ("accel: Use QOM classes for accel types") accelerators are registered as QOM objects. Use QOM as a generic API to query for available accelerators. This is in particular useful to query hardware accelerators such HFV, Xe

Re: [PATCH 1/2] tests/qtest: Extract qtest_qom_has_concrete_type() helper

2025-01-28 Thread Thomas Huth
On 28/01/2025 12.18, Philippe Mathieu-Daudé wrote: Extract qtest_qom_has_concrete_type() out of qtest_has_device() in order to re-use it in the following commit. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqtest.c | 89 -- 1 file changed,

Re: [for-4.20][PATCH v2 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-28 Thread Michal Orzel
On 28/01/2025 11:34, Luca Fancellu wrote: > > > Hi Michal, Julien, > >> On 28 Jan 2025, at 09:40, Michal Orzel wrote: >> >> On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: >> common/device-tree/bootfdt.c: In function 'build_assertions': >> ./include/xen/macros.h:47:

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-28 Thread BALATON Zoltan
On Tue, 28 Jan 2025, Peter Maydell wrote: On Tue, 28 Jan 2025 at 10:42, Gerd Hoffmann wrote: On Sat, Jan 25, 2025 at 07:13:34PM +0100, Philippe Mathieu-Daudé wrote: Some SysBus devices can optionally be dynamically plugged onto the sysbus-platform-bus (then virtual guests are aware of mmio ma

[for-4.20][PATCH v2 1/2] device-tree: bootfdt: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-28 Thread Michal Orzel
On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: common/device-tree/bootfdt.c: In function 'build_assertions': ./include/xen/macros.h:47:31: error: static assertion failed: "!(alignof(struct membanks) != 8)" 47 | #define BUILD_BUG_ON(cond) ({ _Static_assert(!(cond), "!(

[for-4.20][PATCH v2 2/2] xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

2025-01-28 Thread Michal Orzel
On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed: arch/arm/platforms/vexpress.c: In function 'vexpress_smp_init': arch/arm/platforms/vexpress.c:102:12: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'long long unsigned int' [-Werr

Re: [PATCH v3 06/24] xen/domain: introduce hardware emulation flags

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > --- /dev/null > +++ b/xen/include/public/virtdev.h > @@ -0,0 +1,61 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +#ifndef XEN__PUBLIC_VIRTDEV_H > +#define XEN__PUBLIC_VIRTDEV_H > + > +/* > + * Domain hardware emulation flags. > + */ > +e

Re: [PATCH v3 06/24] xen/domain: introduce hardware emulation flags

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > @@ -8,7 +9,9 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc, > { > switch(d_config->c_info.type) { > case LIBXL_DOMAIN_TYPE_HVM: > -config->arch.emulation_flags = (XEN_X86_EMU_ALL & ~XEN_X86_EMU_VPCI); > +con

[PATCH 2/2] tests/qtest: Make qtest_has_accel() generic

2025-01-28 Thread Philippe Mathieu-Daudé
Since commit b14a0b7469f ("accel: Use QOM classes for accel types") accelerators are registered as QOM objects. Use QOM as a generic API to query for available accelerators. This is in particular useful to query hardware accelerators such HFV, Xen or WHPX which otherwise have their definitions pois

[PATCH 0/2] tests/qtest: Make qtest_has_accel() generic

2025-01-28 Thread Philippe Mathieu-Daudé
In preparation of running QTests using HVF on Darwin, make qtest_has_accel() generic. Note, this also allow running other accelerators such Xen, WHPX, ... Philippe Mathieu-Daudé (2): tests/qtest: Extract qtest_qom_has_concrete_type() helper tests/qtest: Make qtest_has_accel() generic tests/

[PATCH 1/2] tests/qtest: Extract qtest_qom_has_concrete_type() helper

2025-01-28 Thread Philippe Mathieu-Daudé
Extract qtest_qom_has_concrete_type() out of qtest_has_device() in order to re-use it in the following commit. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqtest.c | 89 -- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/tests/q

Re: Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-28 Thread Joel Granados
On Mon, Jan 27, 2025 at 03:42:39PM +, Matthew Wilcox wrote: > On Mon, Jan 27, 2025 at 04:55:58PM +0200, Jani Nikula wrote: > > You could have static const within functions too. You get the rodata > > protection and function local scope, best of both worlds? > > timer_active is on the stack, so

Re: [PATCH v3 05/24] xen/console: introduce consoled_is_enabled()

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin > > There are few places which check pv_shim console under CONFIG_PV_SHIM in xen > console driver. Instead of #ifdef-ing, use new consoled_is_enabled() to > customize the logic. > > Header file now can be included w/o CON

Re: [PATCH v2] x86/boot: Handle better alignment for 32 bit code

2025-01-28 Thread Frediano Ziglio
ping On Tue, Jan 14, 2025 at 11:54 AM Frediano Ziglio wrote: > > Output file didn't have correct alignment. > Allows alignment into data or code up to 2mb. > Intermediate object files are kept in order to copy alignment > from object produced by the linker and final object (produced > by combine_

Re: slow start of Pod HVM domU with qemu 9.1

2025-01-28 Thread Stefano Stabellini
On Tue, 28 Jan 2025, Edgar E. Iglesias wrote: > On Tue, Jan 28, 2025 at 03:15:44PM +0100, Olaf Hering wrote: > > Hello, > > > > starting with qemu 9.1 a PoD HVM domU takes a long time to start. > > Depending on the domU kernel, it may trigger a warning, which prompted me > > to notice this change

Re: [PATCH v3 19/24] xen/8250-uart: add missing definitions

2025-01-28 Thread Jason Andryuk
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin Added missing definitions needed for NS8250 UART emulator. Re-used newly introduced MSR definitions in the existing ns16550 driver. Also, fixed indentation in a comment for FCR register. Signed-off-by: Denis Mukhin ---

Re: [PATCH v3 03/24] arm/vuart: add hwdom prefix to UART emulator

2025-01-28 Thread Denis Mukhin
On Monday, January 27th, 2025 at 2:58 PM, Jason Andryuk wrote: > > > On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: > > > From: Denis Mukhin dmuk...@ford.com > > > > Using "vuart" in UART emulator designed for hardware domain debugging > > is confusing in generic Arm code (e.g. vpl0

Re: Config space access to Mediatek MT7922 doesn't work after device reset in Xen PV dom0 (regression, Linux 6.12)

2025-01-28 Thread Bjorn Helgaas
On Fri, Jan 17, 2025 at 01:05:30PM +0100, Marek Marczykowski-Górecki wrote: > After updating PV dom0 to Linux 6.12, The Mediatek MT7922 device reports > all 0xff when accessing its config space. This happens only after device > reset (which is also triggered when binding the device to the > xen-pci

Re: [PATCH v3 19/24] xen/8250-uart: add missing definitions

2025-01-28 Thread Denis Mukhin
On Tuesday, January 28th, 2025 at 2:34 PM, Jason Andryuk wrote: > > > On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: > > > From: Denis Mukhin dmuk...@ford.com > > > > Added missing definitions needed for NS8250 UART emulator. > > > > Re-used newly introduced MSR definitions in the ex

Re: [PATCH v3 15/24] xen/console: make console buffer size configurable

2025-01-28 Thread Denis Mukhin
On Tuesday, January 28th, 2025 at 8:32 AM, Jan Beulich wrote: > > > On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > > > From: Denis Mukhin dmuk...@ford.com > > > > Add new CONRING_SIZE Kconfig parameter to specify the boot console buffer > > size > > in bytes. The value is rounded t

Re: Config space access to Mediatek MT7922 doesn't work after device reset in Xen PV dom0 (regression, Linux 6.12)

2025-01-28 Thread Bjorn Helgaas
[+cc linux-pci] On Wed, Jan 29, 2025 at 03:10:49AM +0100, Marek Marczykowski-Górecki wrote: > On Tue, Jan 28, 2025 at 07:15:26PM -0600, Bjorn Helgaas wrote: > > On Fri, Jan 17, 2025 at 01:05:30PM +0100, Marek Marczykowski-Górecki wrote: > > > After updating PV dom0 to Linux 6.12, The Mediatek MT79

Re: Config space access to Mediatek MT7922 doesn't work after device reset in Xen PV dom0 (regression, Linux 6.12)

2025-01-28 Thread Marek Marczykowski-Górecki
On Tue, Jan 28, 2025 at 09:03:15PM -0600, Bjorn Helgaas wrote: > [+cc linux-pci] > > On Wed, Jan 29, 2025 at 03:10:49AM +0100, Marek Marczykowski-Górecki wrote: > > On Tue, Jan 28, 2025 at 07:15:26PM -0600, Bjorn Helgaas wrote: > > > On Fri, Jan 17, 2025 at 01:05:30PM +0100, Marek Marczykowski-Gór

Re: Config space access to Mediatek MT7922 doesn't work after device reset in Xen PV dom0 (regression, Linux 6.12)

2025-01-28 Thread Marek Marczykowski-Górecki
On Tue, Jan 28, 2025 at 07:15:26PM -0600, Bjorn Helgaas wrote: > On Fri, Jan 17, 2025 at 01:05:30PM +0100, Marek Marczykowski-Górecki wrote: > > After updating PV dom0 to Linux 6.12, The Mediatek MT7922 device reports > > all 0xff when accessing its config space. This happens only after device > >

Re: Config space access to Mediatek MT7922 doesn't work after device reset in Xen PV dom0 (regression, Linux 6.12)

2025-01-28 Thread Bjorn Helgaas
On Wed, Jan 29, 2025 at 04:22:43AM +0100, Marek Marczykowski-Górecki wrote: > On Tue, Jan 28, 2025 at 09:03:15PM -0600, Bjorn Helgaas wrote: > > On Wed, Jan 29, 2025 at 03:10:49AM +0100, Marek Marczykowski-Górecki wrote: > > > On Tue, Jan 28, 2025 at 07:15:26PM -0600, Bjorn Helgaas wrote: > > > > O

Re: Config space access to Mediatek MT7922 doesn't work after device reset in Xen PV dom0 (regression, Linux 6.12)

2025-01-28 Thread Marek Marczykowski-Górecki
On Tue, Jan 28, 2025 at 09:40:18PM -0600, Bjorn Helgaas wrote: > I guess the code at [2] is running in user mode and uses Linux > syscalls for config access? Is it straceable? Nope, it's running as the hypervisor and mediates Linux's access to the hardware. In fact, Linux PV kernel (which dom0 is

Re: [PATCH v3 07/24] xen/console: introduce framework for UART emulators

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin > > Introduce a driver framework to abstract UART emulators in the hypervisor. > > That allows for architecture-independent handling of virtual UARTs from Xen > console driver and simplifies enabling new architecture-depe

Re: [PATCH v3 09/24] xen/console: rename console_rx to console_owner

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin > > Update the symbol name to prepare for the follow on semantic change of console > owner identifier. Again the rename may be okay, but I'm afraid you can't defer to future changes when it comes to addressing the why asp

Re: [PATCH v3 08/24] xen/console: rename switch_serial_input() to console_switch_input()

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin > > Updated the name to highlight the physical console input selection logic: > existing code does not switch only serial console, it also switches debugging > console (debug I/O port and console hypercall). Would you min

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-28 Thread Philippe Mathieu-Daudé
On 28/1/25 13:57, BALATON Zoltan wrote: On Tue, 28 Jan 2025, Peter Maydell wrote: On Tue, 28 Jan 2025 at 10:42, Gerd Hoffmann wrote: On Sat, Jan 25, 2025 at 07:13:34PM +0100, Philippe Mathieu-Daudé wrote: Some SysBus devices can optionally be dynamically plugged onto the sysbus-platform-bus

[PATCH for-4.20 1/2] x86/shutdown: quiesce devices ahead of AP shutdown

2025-01-28 Thread Roger Pau Monne
The current shutdown logic in smp_send_stop() will first disable the APs, and then attempt to disable (some) of the interrupt sources. There are two issues with this approach; the first one being that MSI interrupt sources are not disabled, the second one is the APs are stopped before interrupts a

[PATCH for-4.20 0/2] x86/shutdown: prevent lapic "Receive accept error" errors on AMD

2025-01-28 Thread Roger Pau Monne
Hello, The following series aims to fix the issues seeing during shutdown on AMD boxes related to "Receive accept error" local APIC messages. Fix patch aims to fix the issue, while second patch adjust fixup_irqs() given it now has a single caller. I think at least patch 1 should be considered fo

[PATCH 2/3] tools/hvmloader: Replace LAPIC_ID() with cpu_to_apicid[]

2025-01-28 Thread Alejandro Vallejo
Replace uses of the LAPIC_ID() macro with accesses to the cpu_to_apicid[] lookup table. This table contains the APIC IDs of each vCPU as probed at runtime rather than assuming a predefined relation. Moved smp_initialise() ahead of apic_setup() in order to initialise cpu_to_apicid ASAP and avoid us

[PATCH 1/3] tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves

2025-01-28 Thread Alejandro Vallejo
Make it so the APs expose their own APIC IDs in a lookup table (LUT). We can use that LUT to populate the MADT, decoupling the algorithm that relates CPU IDs and APIC IDs from hvmloader. Modified the printf to also print the APIC ID of each CPU, as well as fixing a (benign) wrong specifier being u

[PATCH 0/3] tools/hvmloader: Decouple APIC IDs from vCPU IDs

2025-01-28 Thread Alejandro Vallejo
The hypervisor, hvmloader and the toolstack currently engage in a shared assumption that for every vCPU apicid == 2 * vcpuid. This series removes such assumption from hvmloader, by making it read the APIC ID of each vCPU and storing it for later use. The last patch prevents writing an MP Tables sh

[PATCH 3/3] tools/hvmloader: Skip writing MP tables if any CPU has an APIC ID >= 255

2025-01-28 Thread Alejandro Vallejo
MP Tables have no means of representing APIC IDs wider than 255. At the moment the effect is wrapping around which would give a corrupted table with duplicate APIC IDs (some of them possibly the broadcast 255). Skip writing it altogether. While it would be possible to restrict the APs shown it's j

Re: [PATCH 0/3] tools/hvmloader: Decouple APIC IDs from vCPU IDs

2025-01-28 Thread Roger Pau Monné
On Tue, Jan 28, 2025 at 04:33:39PM +, Alejandro Vallejo wrote: > The hypervisor, hvmloader and the toolstack currently engage in a shared > assumption that for every vCPU apicid == 2 * vcpuid. This series removes such > assumption from hvmloader, by making it read the APIC ID of each vCPU and >

Re: [PATCH 1/3] tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves

2025-01-28 Thread Roger Pau Monné
On Tue, Jan 28, 2025 at 04:33:40PM +, Alejandro Vallejo wrote: > Make it so the APs expose their own APIC IDs in a lookup table (LUT). We > can use that LUT to populate the MADT, decoupling the algorithm that > relates CPU IDs and APIC IDs from hvmloader. > > Modified the printf to also print

Re: [PATCH v3 12/24] xen/console: introduce console_{get,set}_owner()

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > +domid_t console_get_owner(void) > +{ > +return console_owner; > +} > + > +/* > + * Switch console input focus. > + * Rotates input focus among Xen, dom0 and boot-time created domUs while > + * skipping switching serial input to non existi

Re: [PATCH v3 16/24] xen/console: introduce console_write()

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > --- a/xen/drivers/char/console.c > +++ b/xen/drivers/char/console.c > @@ -40,6 +40,11 @@ > #include > #endif > > +/* Console flags. */ > +enum { > +CONSOLE_RING= BIT(0, U), > +}; These aren't console flags, but flags passed to th

Re: [PATCH v3 15/24] xen/console: make console buffer size configurable

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin > > 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..

Re: [PATCH v3 17/24] xen/console: flush console ring to physical console

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > --- a/xen/drivers/char/console.c > +++ b/xen/drivers/char/console.c > @@ -430,23 +430,36 @@ void console_serial_puts(const char *s, size_t nr) > pv_console_puts(s, nr); > } > > -static void cf_check dump_console_ring_key(unsigned char

slow start of Pod HVM domU with qemu 9.1

2025-01-28 Thread Olaf Hering
Hello, starting with qemu 9.1 a PoD HVM domU takes a long time to start. Depending on the domU kernel, it may trigger a warning, which prompted me to notice this change in behavior: [0.00] Linux version 4.12.14-120-default (geeko@buildhost) (gcc version 4.8.5 (SUSE Linux) ) #1 SMP Thu No

Re: [PATCH v3 10/24] xen/console: introduce use of 'is_console' flag

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > From: Denis Mukhin First: The title gives the impression that the field is never used (read) right now. That's not the case. > The code inspects d->is_console flag to decide whether the console focus > should move to the domain with console

Re: [PATCH v3 14/24] xen/console: simplify console owner switch hint

2025-01-28 Thread Jan Beulich
On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > --- a/xen/drivers/char/console.c > +++ b/xen/drivers/char/console.c > @@ -518,8 +518,8 @@ int console_set_owner(domid_t domid) > console_owner = domid; > > if ( switch_code ) > -printk(" (type 'CTRL-%c' three times to switc

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-28 Thread Bernhard Beschow
Am 28. Januar 2025 15:10:18 UTC schrieb "Philippe Mathieu-Daudé" : >On 28/1/25 13:57, BALATON Zoltan wrote: >> On Tue, 28 Jan 2025, Peter Maydell wrote: >>> On Tue, 28 Jan 2025 at 10:42, Gerd Hoffmann wrote: On Sat, Jan 25, 2025 at 07:13:34PM +0100, Philippe Mathieu-Daudé wrote: >>>

Re: [PATCH 2/2] tests/qtest: Make qtest_has_accel() generic

2025-01-28 Thread Akihiko Odaki
On 2025/01/28 20:18, Philippe Mathieu-Daudé wrote: Since commit b14a0b7469f ("accel: Use QOM classes for accel types") accelerators are registered as QOM objects. Use QOM as a generic API to query for available accelerators. This is in particular useful to query hardware accelerators such HFV, Xe

Re: [PATCH v3 19/24] xen/8250-uart: add missing definitions

2025-01-28 Thread Jan Beulich
On 29.01.2025 02:16, Denis Mukhin wrote: > On Tuesday, January 28th, 2025 at 2:34 PM, Jason Andryuk > wrote: > >> >> >> On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: >> >>> From: Denis Mukhin dmuk...@ford.com >>> >>> Added missing definitions needed for NS8250 UART emulator. >>> >>> Re-u

Re: [PATCH v3 15/24] xen/console: make console buffer size configurable

2025-01-28 Thread Jan Beulich
On 29.01.2025 04:04, Denis Mukhin wrote: > On Tuesday, January 28th, 2025 at 8:32 AM, Jan Beulich > wrote: >> On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: >> >>> From: Denis Mukhin dmuk...@ford.com >>> >>> Add new CONRING_SIZE Kconfig parameter to specify the boot console buffer >>> siz