[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 7/8] vpci: introduce a helper to check MMCFG ranges
The helpers returns whether a given memory address belongs to a domain MMCFG range. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Changes since v4: - New in this version. --- Cc: Paul Durrant <paul.durrant@xxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/hvm/io.c | 5 +++++ xen/include/asm-x86/hvm/io.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index bf4d8748d3..1f8fe36168 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -404,6 +404,11 @@ static const struct hvm_mmcfg *vpci_mmcfg_find(const struct domain *d, return NULL; } +bool vpci_is_mmcfg_address(const struct domain *d, paddr_t addr) +{ + return vpci_mmcfg_find(d, addr); +} + static unsigned int vpci_mmcfg_decode_addr(const struct hvm_mmcfg *mmcfg, paddr_t addr, pci_sbdf_t *sbdf) { diff --git a/xen/include/asm-x86/hvm/io.h b/xen/include/asm-x86/hvm/io.h index e6b6ed0b92..83431b44f2 100644 --- a/xen/include/asm-x86/hvm/io.h +++ b/xen/include/asm-x86/hvm/io.h @@ -180,6 +180,9 @@ int register_vpci_mmcfg_handler(struct domain *d, paddr_t addr, /* Destroy tracked MMCFG areas. */ void destroy_vpci_mmcfg(struct domain *d); +/* Check if an address is between a MMCFG region for a domain. */ +bool vpci_is_mmcfg_address(const struct domain *d, paddr_t addr); + #endif /* __ASM_X86_HVM_IO_H__ */ -- 2.18.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |