@@ -853,6 +853,17 @@ static void cpu_ioreq_move(ioreq_t *req)
}
}
+static void cpu_ioreq_config_space(ioreq_t *req)
+{
+ uint64_t addr = req->addr;
+ uint64_t cf8 = req->addr & (~0x3);
+
+ req->addr = 0xcfc + (addr & 0x3);
+ do_outp(0xcf8, 4, cf8);
+ cpu_ioreq_pio(req);
+ req->addr = addr;
+}
+
static void handle_ioreq(ioreq_t *req)
{
if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) &&
@@ -872,6 +883,9 @@ static void handle_ioreq(ioreq_t *req)
case IOREQ_TYPE_INVALIDATE:
xen_invalidate_map_cache();
break;
+ case IOREQ_TYPE_PCI_CONFIG:
+ cpu_ioreq_config_space(req);
+ break;
default:
hw_error("Invalid ioreq type 0x%x\n", req->type);
}
This ioreq type is introduced to handle easily the access to the PCI config space. Indeed, all PCI config spaces are access by the same IO ports (cf8 -> cff). Signed-off-by: Julien Grall <julien.grall@citrix.com> --- xen-all.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)