[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 1/3] x86/iommu: remove regions not to be mapped



On 25/01/2024 13:26, Roger Pau Monne wrote:
Introduce the code to remove regions not to be mapped from the rangeset
that will be used to setup the IOMMU page tables for the hardware domain.

This change also introduces two new functions: remove_xen_ranges() and
vpci_subtract_mmcfg() that copy the logic in xen_in_range() and
vpci_is_mmcfg_address() respectively and remove the ranges that would otherwise
be intercepted by the original functions.

Note that the rangeset is still not populated.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v6:
  - Fix subtraction to be done against the address, not the mfn.

Changes since v4:
  - Fix off-by-one when removing the Xen used ranges, as the rangesets are
    inclusive.

Changes since v3:
  - Remove unnecessary line wrapping.

Changes since v1:
  - Split from bigger patch.
---
  xen/arch/x86/hvm/io.c               | 16 ++++++++
  xen/arch/x86/include/asm/hvm/io.h   |  3 ++
  xen/arch/x86/include/asm/setup.h    |  1 +
  xen/arch/x86/setup.c                | 48 +++++++++++++++++++++++
  xen/drivers/passthrough/x86/iommu.c | 61 +++++++++++++++++++++++++++++
  5 files changed, 129 insertions(+)


Reviewed-by: Paul Durrant <paul@xxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.