[ovmf test] 185198: all pass - PUSHED

2024-03-28 Thread osstest service owner
flight 185198 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/185198/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 7fde22823d64cb7b9f2a65bb87ffb7581f5ff84e baseline version: ovmf

Re: [PATCH v2 5/5] xen/memory, tools: Make init-dom0less consume XEN_DOMCTL_get_mem_map

2024-03-28 Thread Henry Wang
Hi Jan, On 3/12/2024 1:07 AM, Jan Beulich wrote: +/* + * Flag to force populate physmap to use pages from domheap instead of 1:1 + * or static allocation. + */ +#define XENMEMF_force_heap_alloc (1<<19) #endif If this is for populate_physmap only, then other sub-ops need to reject its use.

Re: [RFC XEN PATCH v6 4/5] libxl: Use gsi instead of irq for mapping pirq

2024-03-28 Thread Chen, Jiqian
On 2024/3/29 01:32, Anthony PERARD wrote: > On Thu, Mar 28, 2024 at 02:34:01PM +0800, Jiqian Chen wrote: >> diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c >> index 96cb4da0794e..2cec83e0b734 100644 >> --- a/tools/libs/light/libxl_pci.c >> +++

Re: [PATCH net] xen-netfront: Add missing skb_mark_for_recycle

2024-03-28 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 27 Mar 2024 13:14:56 +0100 you wrote: > Notice that skb_mark_for_recycle() is introduced later than fixes tag in > 6a5bcd84e886 ("page_pool: Allow drivers to hint on SKB recycling"). > > It is believed that fixes

Re: Linux Xen PV CPA W^X violation false-positives

2024-03-28 Thread Jason Andryuk
On Thu, Mar 28, 2024 at 9:00 AM Jürgen Groß wrote: > > Hi Jason, > > On 28.03.24 02:24, Jason Andryuk wrote: > > On Wed, Mar 27, 2024 at 7:46 AM Jürgen Groß wrote: > >> > >> On 24.01.24 17:54, Jason Andryuk wrote: > >>> + > >>> + return new; > >>> + } > >>> +

[PATCH 1/3] arm: smmu: allow SMMU to have more IRQs than context banks

2024-03-28 Thread Volodymyr Babchuk
I encountered platform, namely Qualcomm SA8155P where SMMU-compatible IO-MMU advertises more context IQRs than there are context banks. This should not be an issue, we need to relax the check in the SMMU driver to allow such configuration. Signed-off-by: Volodymyr Babchuk ---

[PATCH 2/3] drivers: serial: add Qualcomm GENI-based serial driver

2024-03-28 Thread Volodymyr Babchuk
Generic Interface (GENI) is a newer interface for low speed interfaces like UART, I2C or SPI. This patch adds the simple driver for the UART instance of GENI. Code is based on similar drivers in U-Boot and Linux kernel. This driver implements only simple synchronous mode, because although GENI

[PATCH 0/3] Add experimental support for Qualcomm SA8155P SoC

2024-03-28 Thread Volodymyr Babchuk
Hello, This three patches are all what is needed to run Xen on Qualcomm SA8155P. At the time of writing, I have a working setup with (almost) mainline Linux kernel in Dom0, where basic features like UFS and networking are working fine, but more advanced things like GPU are not supported yet.

[PATCH 3/3] arm: platform: qcom: add basic support SA8155P SoC

2024-03-28 Thread Volodymyr Babchuk
Qualcomm SA8155P is the automotive variant of SM8150 aka Snapdragon 855. This patch adds very basic support for the platform. We need to handle Qualcomm-specific SMC to workaround quirk in the QCOM SCM driver in the Linux kernel. Basically the driver tries multiple different SMCs to determine

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

2024-03-28 Thread osstest service owner
flight 185196 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185196/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH net] xen-netfront: Add missing skb_mark_for_recycle

2024-03-28 Thread Marek Marczykowski-Górecki
On Wed, Mar 27, 2024 at 01:14:56PM +0100, Jesper Dangaard Brouer wrote: > Notice that skb_mark_for_recycle() is introduced later than fixes tag in > 6a5bcd84e886 ("page_pool: Allow drivers to hint on SKB recycling"). > > It is believed that fixes tag were missing a call to

[xen-4.17-testing test] 185180: tolerable trouble: fail/pass/starved - PUSHED

2024-03-28 Thread osstest service owner
flight 185180 xen-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/185180/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185171

Re: [PATCH 2/2] x86/video: do not assume a video mode to be unconditionally present

2024-03-28 Thread Andrew Cooper
On 28/03/2024 3:35 pm, Roger Pau Monne wrote: > There's no reason to assume VGA text mode 3 to be unconditionally available. > With the addition of booting Xen itself in PVH mode there's a boot path that > explicitly short-circuits all the real-mode logic, including the VGA > detection. > > Leave

Re: [PATCH 1/2] x86/video: add boot_video_info offset generation to asm-offsets

2024-03-28 Thread Andrew Cooper
On 28/03/2024 3:35 pm, Roger Pau Monne wrote: > Currently the offsets into the boot_video_info struct are manually encoded in > video.S, which is fragile. Generate them in asm-offsets.c and switch the > current code to use those instead. > > No functional change intended. > > Signed-off-by: Roger

Re: [RFC PATCH-for-9.1 14/29] hw/i386/pc: Move pc_system_flash_create() to pc_pci_machine_initfn()

2024-03-28 Thread BALATON Zoltan
On Thu, 28 Mar 2024, Philippe Mathieu-Daudé wrote: pc_system_flash_create() is only useful for PCI-based machines. Move the call to the PCI-based init() handler. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 2 +- hw/i386/pc_sysfw.c | 10 -- 2 files changed, 5

Re: [RFC PATCH-for-9.1 13/29] hw/i386/pc: Remove non-PCI code from pc_system_firmware_init()

2024-03-28 Thread BALATON Zoltan
On Thu, 28 Mar 2024, Philippe Mathieu-Daudé wrote: x86_bios_rom_init() is the single non-PCI-machine call from pc_system_firmware_init(). Extract it to the caller. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 6 +- hw/i386/pc_sysfw.c | 5 + 2 files changed, 6

Re: [RFC PATCH-for-9.1 09/29] hw/i386/pc: Pass PCMachineState argument to acpi_setup()

2024-03-28 Thread BALATON Zoltan
On Thu, 28 Mar 2024, Philippe Mathieu-Daudé wrote: acpi_setup() caller knows about the machine state, so pass it as argument to avoid a qdev_get_machine() call. We already resolved X86_MACHINE(pcms) as 'x86ms' so use the latter. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.h |

Re: [PATCH v7 08/14] xen/page_alloc: introduce preserved page flags macro

2024-03-28 Thread Julien Grall
Hi, Replying to myself. On 27/03/2024 13:48, Julien Grall wrote: On 27/03/2024 13:38, Jan Beulich wrote: On 27.03.2024 14:28, Julien Grall wrote: Hi Carlo, On 27/03/2024 11:10, Carlo Nonato wrote: Hi guys, Question is: How would you justify such a change? IOW I'm not convinced (yet)

Re: [PATCH v3] Input: xen-kbdfront - drop keys to shrink modalias

2024-03-28 Thread Dmitry Torokhov
Hi Jason, On Wed, Mar 20, 2024 at 01:42:27PM -0400, Jason Andryuk wrote: > Hi Dmitry, > > Do you have any feedback, or can you pick up this patch? It solves a > real issue affecting udev, which crashes the Debian installer and > breaks the mouse for Gnome. > > Or would you be okay if this

Re: [XEN PATCH 3/6] xen/arm: ffa: separate memory sharing routines

2024-03-28 Thread Julien Grall
Hi Bertrand, On 27/03/2024 13:40, Bertrand Marquis wrote: Hi Jens, On 25 Mar 2024, at 10:39, Jens Wiklander wrote: Move memory sharing routines into a separate file for easier navigation in the source code. Add ffa_shm_domain_destroy() to isolate the ffa_shm things in

Re: [OSSTEST PATCH 00/36] Switch to Debian Bookworm

2024-03-28 Thread Anthony PERARD
On Mon, Mar 18, 2024 at 04:55:09PM +, Anthony PERARD wrote: > I intend to push this series in two waves. > > First, push up to commit "Temporally switch "qemu-mainline" branch to > Bookworm". This is to test that osstest still works fine if we need to use > "buster" for a branch. Also

Re: [RFC XEN PATCH v6 4/5] libxl: Use gsi instead of irq for mapping pirq

2024-03-28 Thread Anthony PERARD
On Thu, Mar 28, 2024 at 02:34:01PM +0800, Jiqian Chen wrote: > diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c > index 96cb4da0794e..2cec83e0b734 100644 > --- a/tools/libs/light/libxl_pci.c > +++ b/tools/libs/light/libxl_pci.c > @@ -1478,8 +1478,14 @@ static void

Re: [PATCH v6 3/4] libelf: Store maximum PHDR p_align

2024-03-28 Thread Jan Beulich
On 27.03.2024 22:51, Jason Andryuk wrote: > --- a/xen/common/libelf/libelf-loader.c > +++ b/xen/common/libelf/libelf-loader.c > @@ -468,6 +468,7 @@ void elf_parse_binary(struct elf_binary *elf) > { > ELF_HANDLE_DECL(elf_phdr) phdr; > uint64_t low = -1, high = 0, paddr, memsz; > +

[PATCH v3 2/3] xen/drivers: imx-lpuart: Replace iMX8QM compatible with iMX8QXP

2024-03-28 Thread John Ernberg
Allow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM. Since the fsl,imx8qm-lpuart compatible in Linux exists in name only and is not used in the driver any iMX8QM device tree that can boot Linux must set fsl,imx8qxp-lpuart compatible as well as the QM one. Thus we

[PATCH v3 0/2] Xen: ARM: Improved NXP iMX8 platform support

2024-03-28 Thread John Ernberg
The iMX lpuart driver added at 44e17aa60d47 ("xen/arm: Add i.MX lpuart driver") is not enough to boot a Linux based dom0 when certain drivers, such as the watchdog driver, are enabled. We're also fixing compatibles in imx-lpuart to allow Xen to use the UART on the QXP variant as well. When it

[PATCH v3 3/3] MAINTAINERS: Become a reviewer of iMX8Q{M,XP} related patches

2024-03-28 Thread John Ernberg
I have experience with the IMX8QXP, and the supported parts of the IMX8QM are identical. Help review patches touching these areas. --- v3: - New patch (Bertrand Marquis) --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

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

2024-03-28 Thread John Ernberg
When using Linux for dom0 there are a bunch of drivers that need to do SMC SIP calls into the firmware to enable certain hardware bits like the watchdog. Provide a basic platform glue that implements the needed SMC forwarding. The format of these calls are as follows: - reg 0: function ID -

Re: Serious AMD-Vi(?) issue

2024-03-28 Thread Elliott Mitchell
On Thu, Mar 28, 2024 at 08:22:31AM -0700, Elliott Mitchell wrote: > On Thu, Mar 28, 2024 at 07:25:02AM +0100, Jan Beulich wrote: > > On 27.03.2024 18:27, Elliott Mitchell wrote: > > > On Mon, Mar 25, 2024 at 02:43:44PM -0700, Elliott Mitchell wrote: > > >> On Mon, Mar 25, 2024 at 08:55:56AM +0100,

[RFC PATCH-for-9.1 29/29] hw/i386/pc: Move ISA-only PC machine to pc_isa.c

2024-03-28 Thread Philippe Mathieu-Daudé
Extract the ISA-only PC machine code from pc_piix.c to a new file, pc_isa.c. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/i386/pc_isa.c| 33 + hw/i386/pc_piix.c | 23 --- hw/i386/meson.build | 1 + 4 files

[RFC PATCH-for-9.1 09/29] hw/i386/pc: Pass PCMachineState argument to acpi_setup()

2024-03-28 Thread Philippe Mathieu-Daudé
acpi_setup() caller knows about the machine state, so pass it as argument to avoid a qdev_get_machine() call. We already resolved X86_MACHINE(pcms) as 'x86ms' so use the latter. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.h | 3 ++- hw/i386/acpi-build.c | 5 ++--- hw/i386/pc.c

[RFC PATCH-for-9.1 16/29] hw/i386/pc: Move south-bridge related fields to PcPciMachine

2024-03-28 Thread Philippe Mathieu-Daudé
South bridge type is only relevant for the i440fx/piix machine, which is PCI-based. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 8 hw/i386/pc.c | 3 ++- hw/i386/pc_piix.c| 12 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git

[RFC PATCH-for-9.1 23/29] hw/i386/fw_cfg: Inline smbios_defaults()

2024-03-28 Thread Philippe Mathieu-Daudé
All PCI-based machines have the smbios_defaults field set to %true. Simplify by using an inlined helper checking whether the machine is PCI-based or not. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 7 ++- hw/i386/pc.c | 1 -

[RFC PATCH-for-9.1 22/29] hw/i386/fw_cfg: Define fw_cfg_build_smbios() stub

2024-03-28 Thread Philippe Mathieu-Daudé
We are going to refactor fw_cfg_build_smbios() in the next patches. In order to avoid too much #ifdef'ry in it, define a stub. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg-smbios-stub.c | 15 +++ hw/i386/fw_cfg.c | 4 ++-- hw/i386/meson.build | 1 +

[RFC PATCH-for-9.1 15/29] hw/i386/pc: Move FW/pflash related fields to PcPciMachineState

2024-03-28 Thread Philippe Mathieu-Daudé
Only PCI-based machines use the set of parallel flash devices. Move the fields from PCMachineState to PcPciMachineState. Directly pass a PcPciMachineState argument to the pc_system_flash/fw methods. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 10 hw/i386/pc.c

[RFC PATCH-for-9.1 24/29] hw/i386/fw_cfg: Inline smbios_legacy_mode()

2024-03-28 Thread Philippe Mathieu-Daudé
All PCI-based machines have the smbios_legacy_mode field set to %false. Simplify by using an inlined helper checking whether the machine is PCI-based or not. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 8 ++-- hw/i386/pc_piix.c| 2 -- 3

[RFC PATCH-for-9.1 17/29] hw/i386/pc: Inline gigabyte_align()

2024-03-28 Thread Philippe Mathieu-Daudé
All PCI-based machines have the gigabyte_align field set to %true. Simplify by using an inlined helper checking whether the machine is PCI-based or not. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 9 - hw/i386/pc.c | 1 - hw/i386/pc_piix.c| 16

[RFC PATCH-for-9.1 27/29] hw/i386/pc: Call fw_cfg_build_smbios_legacy() in pc_machine_done()

2024-03-28 Thread Philippe Mathieu-Daudé
Keep fw_cfg_build_smbios() for PCI-based machines, call fw_cfg_build_smbios_legacy() directly from pc_machine_done(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.c | 10 -- hw/i386/pc.c | 12 +++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git

[RFC PATCH-for-9.1 14/29] hw/i386/pc: Move pc_system_flash_create() to pc_pci_machine_initfn()

2024-03-28 Thread Philippe Mathieu-Daudé
pc_system_flash_create() is only useful for PCI-based machines. Move the call to the PCI-based init() handler. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 2 +- hw/i386/pc_sysfw.c | 10 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc.c

[xen-4.18-testing test] 185172: tolerable FAIL - PUSHED

2024-03-28 Thread osstest service owner
flight 185172 xen-4.18-testing real [real] flight 185182 xen-4.18-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185172/ http://logs.test-lab.xenproject.org/osstest/logs/185182/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

[RFC PATCH-for-9.1 19/29] hw/i386/pc: Pass PcPciMachineState argument to CXL helpers

2024-03-28 Thread Philippe Mathieu-Daudé
Since CXL helpers expect a PCI-based machine, we can directly pass them a PcPciMachineState argument. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index

[RFC PATCH-for-9.1 26/29] hw/i386/fw_cfg: Factor fw_cfg_build_smbios_legacy() out

2024-03-28 Thread Philippe Mathieu-Daudé
Factor fw_cfg_build_smbios_legacy() out of fw_cfg_build_smbios(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.h | 1 + hw/i386/fw_cfg-smbios-stub.c | 4 hw/i386/fw_cfg.c | 33 ++--- 3 files changed, 27 insertions(+), 11

[RFC PATCH-for-9.1 28/29] hw/i386/pc: Rename pc_init1() -> pc_piix_init()

2024-03-28 Thread Philippe Mathieu-Daudé
pc_init1() is specific to the isapc and i440fx/piix machines, rename it as pc_piix_init(). Expose it in "hw/i386/pc.h" to be able to call it externally (see next patch). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 + hw/i386/pc_piix.c| 8 hw/isa/piix.c

[RFC PATCH-for-9.1 21/29] hw/i386/fw_cfg: Include missing 'qapi-types-machine.h' header

2024-03-28 Thread Philippe Mathieu-Daudé
"fw_cfg.h" declares fw_cfg_build_smbios() which use SmbiosEntryPointType, itself declared in "qapi-types-machine.h". void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, SmbiosEntryPointType ep_type);

[RFC PATCH-for-9.1 18/29] hw/i386/pc: Inline has_reserved_memory()

2024-03-28 Thread Philippe Mathieu-Daudé
All PCI-based machines have the has_reserved_memory field set to %true. Simplify by using an inlined helper checking whether the machine is PCI-based or not. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i386/pc.c | 17 ++--- hw/i386/pc_piix.c

[RFC PATCH-for-9.1 20/29] hw/i386/pc: Pass PcPciMachineState argument to pc_pci_hole64_start()

2024-03-28 Thread Philippe Mathieu-Daudé
pc_pci_hole64_start() is only used by PCI-based machines. Pass it a PcPciMachineState argument, removing a qdev_get_machine() call. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 2 +- hw/i386/pc.c | 8 hw/pci-host/i440fx.c | 2 +- hw/pci-host/q35.c| 2 +-

[RFC PATCH-for-9.1 25/29] hw/i386/fw_cfg: Replace smbios_defaults() by !smbios_legacy_mode()

2024-03-28 Thread Philippe Mathieu-Daudé
smbios_defaults() and smbios_legacy_mode() are logical opposite. Simplify using the latter. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index ffa60a4a33..df05fe060c

[RFC PATCH-for-9.1 13/29] hw/i386/pc: Remove non-PCI code from pc_system_firmware_init()

2024-03-28 Thread Philippe Mathieu-Daudé
x86_bios_rom_init() is the single non-PCI-machine call from pc_system_firmware_init(). Extract it to the caller. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 6 +- hw/i386/pc_sysfw.c | 5 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c

[RFC PATCH-for-9.1 11/29] hw/i386/pc: Move acpi_setup() call to pc_pci_machine_done()

2024-03-28 Thread Philippe Mathieu-Daudé
acpi_setup() returns early if acpi_build_enabled is not set: 2752 void acpi_setup(PCMachineState *pcms) 2753 { ... 2768 if (!pcms->acpi_build_enabled) { 2769 ACPI_BUILD_DPRINTF("ACPI build disabled. Bailing out.\n"); 2770 return; 2771 } acpi_build_enabled

[RFC PATCH-for-9.1 12/29] hw/i386/pc: Move acpi_build_enabled to PcPciMachineState

2024-03-28 Thread Philippe Mathieu-Daudé
Since only PCI-based machines use the 'acpi_build_enabled', move it to PcPciMachineState. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.h | 2 +- include/hw/i386/pc.h | 3 ++- hw/i386/acpi-build.c | 8 hw/i386/pc.c | 5 ++--- hw/i386/xen/xen-hvm.c | 3 ++- 5

[RFC PATCH-for-9.1 08/29] hw/i386/pc: Move CXLState to PcPciMachineState

2024-03-28 Thread Philippe Mathieu-Daudé
CXL depends on PCIe, which isn't available on non-PCI machines such the ISA-only PC one. Move CXLState to PcPciMachineState, and move the CXL specific calls to pc_pci_machine_initfn() and pc_pci_machine_done(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 ++-

[RFC PATCH-for-9.1 10/29] hw/i386/pc: Remove PCMachineClass::has_acpi_build field

2024-03-28 Thread Philippe Mathieu-Daudé
PCMachineClass::has_acpi_build is always %true for PCI based machines. Remove it, setting the 'acpi_build_enabled' field once in pc_pci_machine_initfn(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 6 +++--- hw/i386/pc_piix.c| 1 - 3 files

[RFC PATCH-for-9.1 06/29] hw/i386/pc: Move pci_root_uid field to PcPciMachineClass

2024-03-28 Thread Philippe Mathieu-Daudé
The 'pci_root_uid' field is irrelevant for non-PCI machines, restrict it to the PcPciMachineClass. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 4 +++- hw/i386/acpi-build.c | 9 +++-- hw/i386/pc_piix.c| 7 +-- hw/i386/pc_q35.c | 7 +-- 4 files changed, 20

[RFC PATCH-for-9.1 04/29] hw/i386/pc: Introduce PC_PCI_MACHINE QOM type

2024-03-28 Thread Philippe Mathieu-Daudé
Introduce TYPE_PC_PCI_MACHINE for machines where PCI is expected (as opposition to the ISA-only PC machine). This type inherits from the well known TYPE_PC_MACHINE. Convert I440FX/PIIX and Q35 machines to use it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 25

[RFC PATCH-for-9.1 07/29] hw/i386/pc: Call fw_cfg_add_extra_pci_roots() in pc_pci_machine_done()

2024-03-28 Thread Philippe Mathieu-Daudé
fw_cfg_add_extra_pci_roots() expects a PCI bus, which only PCI-based machines have. No need to call it on the ISA-only machine. Move it to the PCI-specific machine_done handler. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

[RFC PATCH-for-9.1 05/29] hw/i386/pc: Remove PCMachineClass::pci_enabled field

2024-03-28 Thread Philippe Mathieu-Daudé
All TYPE_PC_PCI_MACHINE-based machines have pci_enabled set to %true. By checking a TYPE_PC_MACHINE inherits the TYPE_PC_PCI_MACHINE base class, we don't need this field anymore. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i386/pc.c | 3 +--

[RFC PATCH-for-9.1 02/29] hw/i386/pc: Extract pc_machine_is_pci_enabled() helper

2024-03-28 Thread Philippe Mathieu-Daudé
Introduce the pc_machine_is_pci_enabled() helper to be able to alter PCMachineClass fields later. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 2 ++ hw/i386/pc.c | 11 +-- hw/i386/pc_piix.c| 11 ++- hw/i386/pc_q35.c | 2 +-

[RFC PATCH-for-9.1 03/29] hw/i386/pc: Pass base machine type as argument to DEFINE_PC_MACHINE()

2024-03-28 Thread Philippe Mathieu-Daudé
Currently PC machines are based on TYPE_PC_MACHINE. In preparation of being based on different types, pass the current type as argument. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 4 ++-- hw/i386/pc_piix.c| 9 + hw/i386/pc_q35.c | 3 ++- 3 files changed, 9

[RFC PATCH-for-9.1 00/29] hw/i386/pc: Decouple ISA vs PCI-based machines

2024-03-28 Thread Philippe Mathieu-Daudé
Hi Igor, This is the first steps to decouple the isapc VS q35/i440fx machines. A new TYPE_PC_PCI_MACHINE is introduced to help differentiating. Fields unrelated to the legacy isapc are moved to the new PcPciMachineState structure. More work remain in hw/i386/pc_piix.c so we can build a binary

[RFC PATCH-for-9.1 01/29] hw/i386/pc: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-28 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. In few commits we are going to add more types, so replace the type_register_static() to ease further reviews.

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

2024-03-28 Thread osstest service owner
flight 185181 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185181/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH 2/7] multiboot2: Allow 64-bit entry tags

2024-03-28 Thread Roger Pau Monné
On Thu, Mar 28, 2024 at 03:05:47PM +, Ross Lagerwall wrote: > On Tue, Mar 19, 2024 at 10:07 AM Roger Pau Monné wrote: > > > > On Wed, Mar 13, 2024 at 03:07:43PM +, Ross Lagerwall wrote: > > > Binaries may be built with entry points above 4G. While bootloaders may > > > relocate them below

[PATCH 1/2] x86/video: add boot_video_info offset generation to asm-offsets

2024-03-28 Thread Roger Pau Monne
Currently the offsets into the boot_video_info struct are manually encoded in video.S, which is fragile. Generate them in asm-offsets.c and switch the current code to use those instead. No functional change intended. Signed-off-by: Roger Pau Monné --- xen/arch/x86/boot/video.S | 83

[PATCH 2/2] x86/video: do not assume a video mode to be unconditionally present

2024-03-28 Thread Roger Pau Monne
There's no reason to assume VGA text mode 3 to be unconditionally available. With the addition of booting Xen itself in PVH mode there's a boot path that explicitly short-circuits all the real-mode logic, including the VGA detection. Leave the default user selected mode as text mode 3 in

[PATCH 0/2] x86/video: improve early video detection

2024-03-28 Thread Roger Pau Monne
Hello, The current video logic reports wrong values when booted in PVH mode, as that boot path explicitly skips real-mode logic, and thus avoids any VGA video detection. First patch is cleanup of the offset declarations in boot_video_info. Second patch attempts to fix Xen in PVH mode reporting

Re: Serious AMD-Vi(?) issue

2024-03-28 Thread Elliott Mitchell
On Thu, Mar 28, 2024 at 07:25:02AM +0100, Jan Beulich wrote: > On 27.03.2024 18:27, Elliott Mitchell wrote: > > On Mon, Mar 25, 2024 at 02:43:44PM -0700, Elliott Mitchell wrote: > >> On Mon, Mar 25, 2024 at 08:55:56AM +0100, Jan Beulich wrote: > >>> On 22.03.2024 20:22, Elliott Mitchell wrote: >

Re: [PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2024-03-28 Thread Anthony PERARD
On Tue, Nov 14, 2023 at 03:38:15PM +0100, Philippe Mathieu-Daudé wrote: > Previous commits re-organized the target-specific bits > from Xen files. We can now build the common files once > instead of per-target. > > Only 4 files call libxen API (thus its CPPFLAGS): > - xen-hvm-common.c, > -

[PATCH v2 0/3] GRUB: Supporting Secure Boot of xen

2024-03-28 Thread Ross Lagerwall
This patch series implements support for loading and verifying a signed xen binary. This would allow the same xen binary to be used for BIOS boot, UEFI boot, and UEFI boot with Secure Boot verification. There is an accompanying Xen patch series. The first patch updates the multiboot2

[PATCH v2 2/3] multiboot2: Add PE load support

2024-03-28 Thread Ross Lagerwall
Add the ability to load multiboot binaries in PE format. This allows the binaries to be signed and verified. Signed-off-by: Ross Lagerwall --- grub-core/Makefile.core.def | 1 + grub-core/loader/multiboot.c | 7 + grub-core/loader/multiboot_mbi2.c | 11 +-

[PATCH v2 3/3] efi: Allow loading multiboot modules without verification

2024-03-28 Thread Ross Lagerwall
GRUB doesn't do anything with multiboot modules except loading them and passing a pointer to the multiboot kernel. Therefore GRUB itself doesn't need to verify the module. Multiboot modules may contain code that needs to be verified. If this is the case, the expectation is that the multiboot

[PATCH v2 1/3] multiboot2: Add support for the PE binary type

2024-03-28 Thread Ross Lagerwall
Currently, multiboot2-compatible bootloaders can load ELF binaries and a.out binaries. The presence of the address header tag determines how the bootloader tries to interpret the binary (a.out if the address tag is present else ELF). In addition to the existing address and ELF load types, specify

[PATCH v2 1/2] x86: Add support for building a multiboot2 PE binary

2024-03-28 Thread Ross Lagerwall
In addition to building xen.efi and xen.gz, build xen-mbi.exe. The latter is a PE binary that can be used with a multiboot2 loader that supports loading PE binaries. Using this option allows the binary to be signed and verified by Shim. This means the same xen-mbi.exe binary can then be used for

[PATCH v2 2/2] x86: Call Shim Verify in the multiboot2 path

2024-03-28 Thread Ross Lagerwall
Now that the multiboot2 binary can be verified by Shim, ensure that the dom0 kernel is verified when using the multiboot2 path. If the Shim protocol is not available and the SecureBoot variable is not set to 0 (or the state cannot be determined), abort the boot. Signed-off-by: Ross Lagerwall ---

[PATCH v2 0/2] x86: Multiboot PE support

2024-03-28 Thread Ross Lagerwall
Hi, This patches series implements support for building a multiboot-capable PE binary in addition to the existing xen.efi and xen.gz. The purpose of this is to allow the same binary to be booted using BIOS, UEFI, and UEFI with Secure Boot verification just like it can be done with a Linux kernel.

Re: [PATCH 2/7] multiboot2: Allow 64-bit entry tags

2024-03-28 Thread Ross Lagerwall
On Tue, Mar 19, 2024 at 10:07 AM Roger Pau Monné wrote: > > On Wed, Mar 13, 2024 at 03:07:43PM +, Ross Lagerwall wrote: > > Binaries may be built with entry points above 4G. While bootloaders may > > relocate them below 4G, it should be possible for the binary to specify > > those entry

Re: [PATCH 3/7] multiboot2: Add support for the load type header tag

2024-03-28 Thread Ross Lagerwall
On Fri, Mar 15, 2024 at 7:31 AM Vladimir 'phcoder' Serbinenko wrote: > > Not a full review. Just one blocking problem > >> >> >> } >> + case MULTIBOOT_LOAD_TYPE_PE: >> + grub_fatal ("Unsupported load type: %u\n", mld.load_type); >> + default: >> +/* should be impossible */ >> +

Re: [PATCH] x86/spec-ctrl: Move __read_mostly data into __ro_after_init

2024-03-28 Thread Jan Beulich
On 28.03.2024 14:14, Andrew Cooper wrote: > These variables predate the introduction of __ro_after_init, but all qualify. > Update them to be consistent with the rest of the file. > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich

[PATCH] x86/spec-ctrl: Move __read_mostly data into __ro_after_init

2024-03-28 Thread Andrew Cooper
These variables predate the introduction of __ro_after_init, but all qualify. Update them to be consistent with the rest of the file. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/spec_ctrl.c | 20 ++-- 1 file

Re: Linux Xen PV CPA W^X violation false-positives

2024-03-28 Thread Jürgen Groß
Hi Jason, On 28.03.24 02:24, Jason Andryuk wrote: On Wed, Mar 27, 2024 at 7:46 AM Jürgen Groß wrote: On 24.01.24 17:54, Jason Andryuk wrote: + + return new; + } + } + end = start + npg * PAGE_SIZE - 1; WARN_ONCE(1, "CPA detected W^X

Re: [PATCH v2 3/3] svm/nestedsvm: Introduce nested capabilities bit

2024-03-28 Thread Jan Beulich
On 28.03.2024 11:57, George Dunlap wrote: > On Thu, Mar 28, 2024 at 6:44 AM Jan Beulich wrote: > --- a/xen/arch/x86/hvm/nestedhvm.c > +++ b/xen/arch/x86/hvm/nestedhvm.c > @@ -150,6 +150,16 @@ static int __init cf_check nestedhvm_setup(void) > __clear_bit(0x80,

Re: [PATCH v2 3/3] svm/nestedsvm: Introduce nested capabilities bit

2024-03-28 Thread George Dunlap
On Thu, Mar 28, 2024 at 6:44 AM Jan Beulich wrote: > > As to why to have each vendor independent code check for HAP -- there > > are in fact two implementations of the code; it's nice to be able to > > look in one place for each implementation to determine the > > requirements. Additionally, it

Re: [XEN PATCH v3 2/2] MISRA C Rule 20.7 states: "The features of `' shall not be used"

2024-03-28 Thread Simone Ballarin
On 28/03/24 11:31, Jan Beulich wrote: On 28.03.2024 11:29, Simone Ballarin wrote: The Xen community wants to avoid using variadic functions except for specific circumstances where it feels appropriate by strict code review. In the title, s/20.7/17.1/ I suppose? Jan Functions

[xen-4.17-testing test] 185171: tolerable FAIL - PUSHED

2024-03-28 Thread osstest service owner
flight 185171 xen-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/185171/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185012

Re: [XEN PATCH v3 2/2] MISRA C Rule 20.7 states: "The features of `' shall not be used"

2024-03-28 Thread Jan Beulich
On 28.03.2024 11:29, Simone Ballarin wrote: > The Xen community wants to avoid using variadic functions except for > specific circumstances where it feels appropriate by strict code review. In the title, s/20.7/17.1/ I suppose? Jan > Functions hypercall_create_continuation and

[XEN PATCH v3 0/2] xen: address violations of MISRA C Rule 17.1

2024-03-28 Thread Simone Ballarin
MISRA C Rule 20.7 states: "The features of `' shall not be used". The Xen community wants to avoid using variadic functions except for specific circumstances where it feels appropriate by strict code review. Functions hypercall_create_continuation and hypercall_xlat_continuation are internal

[XEN PATCH v3 2/2] MISRA C Rule 20.7 states: "The features of `' shall not be used"

2024-03-28 Thread Simone Ballarin
The Xen community wants to avoid using variadic functions except for specific circumstances where it feels appropriate by strict code review. Functions hypercall_create_continuation and hypercall_xlat_continuation are internal helper functions made to break long running hypercalls into multiple

[XEN PATCH v3 1/2] MISRA C:2012 Rule 17.1 states: The features of `' shall not be used

2024-03-28 Thread Simone Ballarin
The Xen community wants to avoid using variadic functions except for specific circumstances where it feels appropriate by strict code review. Add deviation for printf()-like functions. Signed-off-by: Simone Ballarin --- Changes in v3: - use regex to exempt all .*printk and .*printf functions,

Re: Violations of mandatory MISRA C:2012 Rule 19.1 in X86_64 build

2024-03-28 Thread Jan Beulich
On 11.07.2023 18:40, Roberto Bagnara wrote: > Mandatory Rule 19.1 (An object shall not be assigned or copied to an > overlapping object) is directly targeted at two undefined behaviors, > one of which is the subject of 6.5.16.1p3, namely: > >If the value being stored in an object is read from

Re: [PATCH v6 2/3] xen: use explicit function alignment if supported by compiler

2024-03-28 Thread Roger Pau Monné
Ping? On Wed, Feb 07, 2024 at 03:55:46PM +0100, Roger Pau Monne wrote: > Introduce a new Kconfig check for whether the compiler supports > -falign-functions and if supported use it to align functions to the per-arch > selected value, just like it's done for assembly ENTRY() and FUNC() symbols. >

Re: [PATCH 2/6] tools/misc: rework xenwatchdogd signal handling

2024-03-28 Thread Jan Beulich
On 28.03.2024 10:31, Jan Beulich wrote: > On 27.03.2024 19:13, le...@solinno.co.uk wrote: >> From: Leigh Brown >> >> Rework xenwatchdogd signal handling to do the minimum in the signal >> handler. This is a very minor enhancement. >> --- >> tools/misc/xenwatchdogd.c | 20 >>

Re: [PATCH 3/6] tools/misc: xenwatchdogd: make functions static

2024-03-28 Thread Jan Beulich
On 27.03.2024 19:13, le...@solinno.co.uk wrote: > From: Leigh Brown > > Make all functions except main() static in xenwatchdogd.c. And once at it data then too, please. Jan

Re: [PATCH 2/6] tools/misc: rework xenwatchdogd signal handling

2024-03-28 Thread Jan Beulich
On 27.03.2024 19:13, le...@solinno.co.uk wrote: > From: Leigh Brown > > Rework xenwatchdogd signal handling to do the minimum in the signal > handler. This is a very minor enhancement. > --- > tools/misc/xenwatchdogd.c | 20 > 1 file changed, 12 insertions(+), 8

[KERNEL PATCH v5 1/3] xen/pci: Add xen_reset_device_state function

2024-03-28 Thread Jiqian Chen
When device on dom0 side has been reset, the vpci on Xen side won't get notification, so that the cached state in vpci is all out of date with the real device state. To solve that problem, add a new function to clear all vpci device state when device is reset on dom0 side. And call that function

[RFC KERNEL PATCH v5 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-03-28 Thread Jiqian Chen
There is a need for some scenarios to use gsi sysfs. For example, when xen passthrough a device to dumU, it will use gsi to map pirq, but currently userspace can't get gsi number. So, add gsi sysfs for that and for other potential scenarios. Co-developed-by: Huang Rui Signed-off-by: Jiqian Chen

[RFC KERNEL PATCH v5 2/3] xen/pvh: Setup gsi for passthrough device

2024-03-28 Thread Jiqian Chen
In PVH dom0, the gsis don't get registered, but the gsi of a passthrough device must be configured for it to be able to be mapped into a domU. When assign a device to passthrough, proactively setup the gsi of the device during that process. Co-developed-by: Huang Rui Signed-off-by: Jiqian Chen

[RFC KERNEL PATCH v5 0/3] Support device passthrough when dom0 is PVH on Xen

2024-03-28 Thread Jiqian Chen
Hi All, This is v5 series to support passthrough on Xen when dom0 is PVH. patch#2 change function acpi_pci_irq_lookup from a static function to non-static, need ACPI Maintainer to give some comments. patch#3 linux internal changes, need PCI and ACPI Maintainer to give more comments. v4->v5

Re: [PATCH v2 3/3] svm/nestedsvm: Introduce nested capabilities bit

2024-03-28 Thread Jan Beulich
On 27.03.2024 18:01, George Dunlap wrote: > On Mon, Mar 18, 2024 at 2:17 PM Jan Beulich wrote: >> On 13.03.2024 13:24, George Dunlap wrote: >>> --- a/xen/arch/x86/domain.c >>> +++ b/xen/arch/x86/domain.c >>> @@ -673,6 +673,12 @@ int arch_sanitise_domain_config(struct >>> xen_domctl_createdomain

[RFC XEN PATCH v6 4/5] libxl: Use gsi instead of irq for mapping pirq

2024-03-28 Thread Jiqian Chen
In PVH dom0, it uses the linux local interrupt mechanism, when it allocs irq for a gsi, it is dynamic, and follow the principle of applying first, distributing first. And the irq number is alloced from small to large, but the applying gsi number is not, may gsi 38 comes before gsi 28, that causes

[RFC XEN PATCH v6 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi

2024-03-28 Thread Jiqian Chen
Some type of domain don't have PIRQ, like PVH, when passthrough a device to guest on PVH dom0, callstack pci_add_dm_done->XEN_DOMCTL_irq_permission will failed at domain_pirq_to_irq. So, add a new hypercall to grant/revoke gsi permission when dom0 is not PV or dom0 has not PIRQ flag.

[XEN PATCH v6 2/5] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-03-28 Thread Jiqian Chen
If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for a passthrough device by using gsi, see xen_pt_realize->xc_physdev_map_pirq and pci_add_dm_done->xc_physdev_map_pirq. Then xc_physdev_map_pirq will call into Xen, but in hvm_physdev_op, PHYSDEVOP_map_pirq is not allowed because currd is

[RFC XEN PATCH v6 0/5] Support device passthrough when dom0 is PVH on Xen

2024-03-28 Thread Jiqian Chen
Hi All, This is v6 series to support passthrough when dom0 is PVH v5->v6 changes: * patch#1: Add Reviewed-by Stefano and Stewart. Rebase code and change old function vpci_remove_device, vpci_add_handlers to vpci_deassign_device, vpci_assign_device * patch#2: Add Reviewed-by Stefano * patch#3:

  1   2   >