summaryrefslogtreecommitdiff
path: root/xen
diff options
context:
space:
mode:
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>2020-11-30 12:31:18 +0200
committerAlex Bennée <alex.bennee@linaro.org>2020-11-30 15:12:46 +0000
commita8a0c7c9acfbd5e9cf90ccb2ec1d056445907dd0 (patch)
tree9da7c4412a3faaf592df79078d50ed5da20b9be8 /xen
parent4ad33ad5b22a33b929b4c799798b39fa31c6a841 (diff)
x86/ioreq: Provide out-of-line wrapper for the handle_mmio()
The IOREQ is about to be common feature and Arm will have its own implementation. But the name of the function is pretty generic and can be confusing on Arm (we already have a try_handle_mmio()). In order not to rename the function (which is used for a varying set of purposes on x86) globally and get non-confusing variant on Arm provide a wrapper ioreq_complete_mmio() to be used on common and Arm code. Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> CC: Julien Grall <julien.grall@arm.com> Message-Id: <1606732298-22107-4-git-send-email-olekstysh@gmail.com>
Diffstat (limited to 'xen')
-rw-r--r--xen/arch/x86/hvm/ioreq.c7
-rw-r--r--xen/include/asm-x86/hvm/ioreq.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c
index 952555454b..36b1e4e19b 100644
--- a/xen/arch/x86/hvm/ioreq.c
+++ b/xen/arch/x86/hvm/ioreq.c
@@ -36,6 +36,11 @@
#include <public/hvm/ioreq.h>
#include <public/hvm/params.h>
+bool ioreq_complete_mmio(void)
+{
+ return handle_mmio();
+}
+
static void set_ioreq_server(struct domain *d, unsigned int id,
struct hvm_ioreq_server *s)
{
@@ -226,7 +231,7 @@ bool handle_hvm_io_completion(struct vcpu *v)
break;
case HVMIO_mmio_completion:
- return handle_mmio();
+ return ioreq_complete_mmio();
case HVMIO_pio_completion:
return handle_pio(vio->io_req.addr, vio->io_req.size,
diff --git a/xen/include/asm-x86/hvm/ioreq.h b/xen/include/asm-x86/hvm/ioreq.h
index e9c8b2dd95..c7563e1f2a 100644
--- a/xen/include/asm-x86/hvm/ioreq.h
+++ b/xen/include/asm-x86/hvm/ioreq.h
@@ -74,6 +74,8 @@ unsigned int hvm_broadcast_ioreq(ioreq_t *p, bool buffered);
void hvm_ioreq_init(struct domain *d);
+bool ioreq_complete_mmio(void);
+
#define IOREQ_STATUS_HANDLED X86EMUL_OKAY
#define IOREQ_STATUS_UNHANDLED X86EMUL_UNHANDLEABLE
#define IOREQ_STATUS_RETRY X86EMUL_RETRY