[PATCH v2 2/3] drivers: Change find_iommu_for_device function to take pci_sbdf_t, simplify code

2025-03-16 Thread Andrii Sultanov
Following a similar change to amd_iommu struct, change the find_iommu_for_device function to take pci_sbdf_t as a single parameter. This avoids splitting a single argument into two registers in the majority of cases. Bloat-o-meter reports (on top of the first patch in the series): add/remove: 0/0

[PATCH v2 1/3] drivers: Change amd_iommu struct to contain pci_sbdf_t, simplify code

2025-03-16 Thread Andrii Sultanov
Following on from 250d87dc3ff9 ("x86/msi: Change __msi_set_enable() to take pci_sbdf_t"), struct amd_iommu has its seg and bdf fields backwards with relation to pci_sbdf_t. Swap them around, and simplify the expressions regenerating an sbdf_t from seg+bdf. Bloat-o-meter reports: add/remove: 0/0 gr

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

2025-03-16 Thread 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 and simplifies several comparisons and assignments. Signed-off-by: Andrii Sultanov --- This parti

[PATCH v2 0/3] drivers: Simplify handling of pci_sbdf_t in passthrough/amd

2025-03-16 Thread Andrii Sultanov
Step-by-step, use pci_sbdf_t directly where appropriate instead of handling seg and bdf separately. This removes conversions, reduces code size and simplifies code in general. Andrii Sultanov (3): drivers: Change amd_iommu struct to contain pci_sbdf_t, simplify code drivers: Change find_iommu_

[PATCH v2 5/7] arm/mpu: Implement stubs for ioremap_attr on MPU

2025-03-16 Thread Luca Fancellu
Implement ioremap_attr() stub for MPU system; the implementation of ioremap() is the same between MMU and MPU system, and it relies on ioremap_attr(), so move the definition from mmu/pt.c to arm/mm.c. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2 changes: - Add R-by Michal ---

[PATCH v2 3/7] xen/arm: Introduce frame_table and virt_to_page

2025-03-16 Thread Luca Fancellu
Introduce frame_table in order to provide the implementation of virt_to_page for MPU system, move the MMU variant in mmu/mm.h. Introduce FRAMETABLE_NR that is required for 'pdx_group_valid' in pdx.c, but leave the initialisation of the frame table to a later stage. Define FRAMETABLE_SIZE for MPU t

[PATCH v2 6/7] xen: introduce Kconfig HAS_PAGING_MEMPOOL

2025-03-16 Thread Luca Fancellu
From: Penny Zheng ARM MPU system doesn't need to use paging memory pool, as MPU memory mapping table at most takes only one 4KB page, which is enough to manage the maximum 255 MPU memory regions, for all EL2 stage 1 translation and EL1 stage 2 translation. Introduce HAS_PAGING_MEMPOOL Kconfig co

[PATCH v2 7/7] arm/mpu: Create the skeleton for MPU compilation

2025-03-16 Thread Luca Fancellu
This commit introduces the skeleton for the MPU memory management subsystem that allows the compilation on Arm64. Signed-off-by: Luca Fancellu --- The implementation of setup_virt_paging() is under arm64/mpu because it will have a different implementation from arm32. v2 changes: - p2m_teardown{

[PATCH v2 0/7] MPU mm subsystem skeleton

2025-03-16 Thread Luca Fancellu
Hi all, this serie implements the skeleton for the MPU memory management subsystem, at the end of the serie it will be possible to compile the Arm64 arch using MPU. The minimum Arm Kconfig configuration is this one: CONFIG_UNSUPPORTED=y CONFIG_MPU=y CONFIG_XEN_START_ADDRESS=0x0 Luca Fancellu (

[PATCH v2 4/7] arm/mpu: Kconfig symbols for MPU build

2025-03-16 Thread Luca Fancellu
The MPU system requires static memory to work, select that when building this memory management subsystem. While there, provide a restriction for the ARM_EFI Kconfig parameter to be built only when !MPU, the EFI stub is not used as there are no implementation of UEFI services for armv8-r. Signed-

[PATCH v2 1/7] arm/mpu: Add HYPERVISOR_VIRT_START and avoid a check in xen.lds.S

2025-03-16 Thread Luca Fancellu
The define HYPERVISOR_VIRT_START is required by the common code, even if MPU system doesn't use virtual memory, define it in mpu/layout.h in order to reuse existing code. Disable a check in the linker script for arm for !MMU systems. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2

[PATCH v2 2/7] xen/arm: Implement virt/maddr conversion in MPU system

2025-03-16 Thread Luca Fancellu
From: Penny Zheng virt_to_maddr and maddr_to_virt are used widely in Xen code. So even there is no VMSA in MPU system, we keep the interface in MPU to to avoid changing the existing common code. In order to do that, move the virt_to_maddr() and maddr_to_virt() definitions to mmu/mm.h, move the i

Xen panic when shutting down ARINC653 cpupool

2025-03-16 Thread Choi, Anderson
I'd like to report xen panic when shutting down an ARINC653 domain with the following setup. Note that this is only observed when CONFIG_DEBUG is enabled. [Test environment] Yocto release : 5.05 Xen release : 4.19 (hash = 026c9fa29716b0ff0f8b7c687908e71ba29cf239) Target machine : QEMU ARM64 Numbe