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@amd.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
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;
}
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;
}