[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [QEMU][RFC PATCH 5/6] xen-io: Handle the new ioreq type IOR
From: |
Julien Grall |
Subject: |
[Qemu-devel] [QEMU][RFC PATCH 5/6] xen-io: Handle the new ioreq type IOREQ_TYPE_PCI_CONFIG |
Date: |
Thu, 22 Mar 2012 16:01:57 +0000 |
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 <address@hidden>
---
xen-all.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/xen-all.c b/xen-all.c
index 2f5405c..2d001b8 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -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);
}
--
Julien Grall
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, (continued)
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Jan Kiszka, 2012/03/22
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Anthony Liguori, 2012/03/22
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Stefano Stabellini, 2012/03/23
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Avi Kivity, 2012/03/25
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Stefano Stabellini, 2012/03/26
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Avi Kivity, 2012/03/26
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Stefano Stabellini, 2012/03/26
- Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen, Avi Kivity, 2012/03/26
[Qemu-devel] [QEMU][RFC PATCH 2/6] xen: Add functions to register PCI and IO in Xen, Julien Grall, 2012/03/22
[Qemu-devel] [QEMU][RFC PATCH 5/6] xen-io: Handle the new ioreq type IOREQ_TYPE_PCI_CONFIG,
Julien Grall <=