|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] tools/libxl: Skip missing PCI GSIs
commit d3ac8fdce26476d148fb2a8f18c7e5b0c153be0a
Author: Jason Andryuk <jason.andryuk@xxxxxxx>
AuthorDate: Thu Mar 13 10:23:52 2025 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Mar 13 10:23:52 2025 +0100
tools/libxl: Skip missing PCI GSIs
A PCI device may not have a legacy IRQ. In that case, we don't need to
do anything, so don't fail in libxl__arch_hvm_map_gsi() and
libxl__arch_hvm_unmap_gsi().
Requires an updated pciback to return -ENOENT.
Fixes: f97f885c7198 ("tools: Add new function to do PIRQ (un)map on PVH
dom0")
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
tools/libs/light/libxl_x86.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/libs/light/libxl_x86.c b/tools/libs/light/libxl_x86.c
index a3164a3077..0a7f64ad46 100644
--- a/tools/libs/light/libxl_x86.c
+++ b/tools/libs/light/libxl_x86.c
@@ -901,7 +901,10 @@ int libxl__arch_hvm_map_gsi(libxl__gc *gc, uint32_t sbdf,
uint32_t domid)
int pirq = -1, gsi, r;
gsi = xc_pcidev_get_gsi(CTX->xch, sbdf);
- if (gsi < 0) {
+ if (gsi < 0 && errno == ENOENT) {
+ LOGD(DEBUG, domid, "xc_pcidev_get_gsi no gsi");
+ return 0;
+ } else if (gsi < 0) {
return ERROR_FAIL;
}
@@ -925,7 +928,10 @@ int libxl__arch_hvm_unmap_gsi(libxl__gc *gc, uint32_t
sbdf, uint32_t domid)
int pirq = -1, gsi, r;
gsi = xc_pcidev_get_gsi(CTX->xch, sbdf);
- if (gsi < 0) {
+ if (gsi < 0 && errno == ENOENT) {
+ LOGD(DEBUG, domid, "xc_pcidev_get_gsi no gsi");
+ return 0;
+ } else if (gsi < 0) {
return ERROR_FAIL;
}
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |