On 2025-07-12 06:08, Julien Grall wrote:
Hi Stefano,
On 11/07/2025 01:25, Stefano Stabellini wrote:
Up until f9f6b22ab "xen/arm: Map ITS doorbell register to IOMMU page
Everywhere in this commit message, we are using 12 characters commit ID.
tables" the only caller of iommu_map on ARM was grant_table.c which has
a specific usage model and restrictions as described by the in-code
comment in arm_iommu_map_page.
f9f6b22ab introduced a second caller to iommu_map on ARM:
vgic_v3_its_init_virtual. This specific statement in the
f9f6b22ab commit message is wrong:
"Note that the 1:1 check in arm_iommu_map_page remains for now, as
virtual ITSes are currently only created for hwdom where the doorbell
mapping is always 1:1."
Leading to crashes any time the hardware domain is not direct-mapped
(e.g. cache coloring and non-Dom0 hardware domain):
(XEN) Xen BUG at drivers/passthrough/arm/iommu_helpers.c:49
Are you using the last staging? Asking because line 49 is a blank line:
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/drivers/
passthrough/arm/
iommu_helpers.c;h=5cb19874819357b5cd58638864b56c505d07b37a;hb=HEAD#l49
This is my fault. I added some debugging code and shifted the line
numbers in my original reporting. 47 is the correct line:
BUG_ON(!is_domain_direct_mapped(d));
Regards,
Jason