mbox series

[v2,0/2] xen/arm: fix iomem_ranges cfg in map_range_to_domain()

Message ID 20250218112253.3136505-1-grygorii_strashko@epam.com (mailing list archive)
Headers show
Series xen/arm: fix iomem_ranges cfg in map_range_to_domain() | expand

Message

Grygorii Strashko Feb. 18, 2025, 11:22 a.m. UTC
Hi

This series fixes incorrect calculation of iomem_range end address in
map_range_to_domain() which is then passed to iomem_permit_access() and
rangeset_add_range().
Those function expect the iomem_range end address to be inclusive
while calculations are made with incorrect assumption it's exclusive.


Output of "key 'q' (ascii '71') => dump domain (and guest debug) info"
before:
(XEN) I/O Memory { 8000-c000, 30000-40000, 47ff0-47ff8, 7ff00-7ff01, c0000-d0000, e6020-e6021, ...

after:
(XEN) I/O Memory { 8000-bfff, 30000-3ffff, 47ff0-47ff7, 7ff00, c0000-cffff, e6020, ...

Changes in v2:
 - split on two patches
 - add "fixes" tags
 - rewording of commit messages
 
v1:
https://patchew.org/Xen/20250214125505.2862809-1-grygorii._5Fstrashko@epam.com/

Grygorii Strashko (2):
  xen/arm: fix iomem permissions cfg in map_range_to_domain()
  xen/arm: fix iomem_ranges cfg in map_range_to_domain()

 xen/arch/arm/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)