From: Julien Grall <julien.grall@citrix.com> To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, julian.pidancet@citrix.com, Stefano.Stabellini@eu.citrix.com 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 [thread overview] Message-ID: <6a755e1583a988ce9906385bcdf5812fde78cdbc.1332430835.git.julien.grall@citrix.com> (raw) In-Reply-To: <cover.1332430834.git.julien.grall@citrix.com> 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(-) 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
WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@citrix.com> To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, julian.pidancet@citrix.com, Stefano.Stabellini@eu.citrix.com Subject: [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 [thread overview] Message-ID: <6a755e1583a988ce9906385bcdf5812fde78cdbc.1332430835.git.julien.grall@citrix.com> (raw) In-Reply-To: <cover.1332430834.git.julien.grall@citrix.com> 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(-) 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
next prev parent reply other threads:[~2012-03-22 16:05 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-22 16:01 [Qemu-devel] [QEMU][RFC PATCH 0/6] QEMU disaggregation Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 1/6] option: Add -xen-dmid Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 17:36 ` [Qemu-devel] " Jan Kiszka 2012-03-22 17:36 ` Jan Kiszka 2012-03-23 10:42 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 10:42 ` Stefano Stabellini 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 2/6] xen: Add functions to register PCI and IO in Xen Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-23 10:44 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 10:44 ` Stefano Stabellini 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 3/6] memory: Add xen memory hook Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 17:44 ` [Qemu-devel] " Jan Kiszka 2012-03-22 17:44 ` Jan Kiszka 2012-03-23 15:08 ` [Qemu-devel] " Julien Grall 2012-03-23 15:08 ` Julien Grall 2012-03-23 16:37 ` [Qemu-devel] " Jan Kiszka 2012-03-23 16:37 ` Jan Kiszka 2012-03-25 10:44 ` [Qemu-devel] " Avi Kivity 2012-03-25 10:44 ` Avi Kivity 2012-03-26 11:01 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 11:01 ` Stefano Stabellini 2012-03-26 11:02 ` [Qemu-devel] " Avi Kivity 2012-03-26 11:02 ` Avi Kivity 2012-03-26 11:24 ` [Qemu-devel] " Julien Grall 2012-03-26 11:24 ` Julien Grall 2012-03-26 13:13 ` [Qemu-devel] " Avi Kivity 2012-03-26 13:13 ` Avi Kivity 2012-03-23 16:47 ` [Qemu-devel] " Anthony Liguori 2012-03-23 16:47 ` Anthony Liguori 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-22 17:47 ` [Qemu-devel] " Jan Kiszka 2012-03-22 17:47 ` Jan Kiszka 2012-03-22 19:58 ` [Qemu-devel] " Anthony Liguori 2012-03-22 19:58 ` Anthony Liguori 2012-03-23 11:02 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 11:02 ` Stefano Stabellini 2012-03-25 12:09 ` [Qemu-devel] " Avi Kivity 2012-03-25 12:09 ` Avi Kivity 2012-03-26 11:45 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 11:45 ` Stefano Stabellini 2012-03-26 11:57 ` [Qemu-devel] " Avi Kivity 2012-03-26 11:57 ` Avi Kivity 2012-03-26 12:20 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 12:20 ` Stefano Stabellini 2012-03-26 12:33 ` [Qemu-devel] " Avi Kivity 2012-03-26 12:33 ` Avi Kivity 2012-03-26 13:56 ` [Qemu-devel] " Stefano Stabellini 2012-03-26 13:56 ` Stefano Stabellini 2012-03-22 16:01 ` Julien Grall [this message] 2012-03-22 16:01 ` [QEMU][RFC PATCH 5/6] xen-io: Handle the new ioreq type IOREQ_TYPE_PCI_CONFIG Julien Grall 2012-03-22 16:01 ` [Qemu-devel] [QEMU][RFC PATCH 6/6] xen: handle qemu disaggregation Julien Grall 2012-03-22 16:01 ` Julien Grall 2012-03-23 11:07 ` [Qemu-devel] " Stefano Stabellini 2012-03-23 11:07 ` Stefano Stabellini
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=6a755e1583a988ce9906385bcdf5812fde78cdbc.1332430835.git.julien.grall@citrix.com \ --to=julien.grall@citrix.com \ --cc=Stefano.Stabellini@eu.citrix.com \ --cc=julian.pidancet@citrix.com \ --cc=qemu-devel@nongnu.org \ --cc=xen-devel@lists.xensource.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.