diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c index a949419cbe..8f82b82b07 100644 --- a/xen/arch/x86/hvm/intercept.c +++ b/xen/arch/x86/hvm/intercept.c @@ -240,21 +240,13 @@ static const struct hvm_io_handler *hvm_find_io_handler(const ioreq_t *p) int hvm_io_intercept(ioreq_t *p) { const struct hvm_io_handler *handler; - const struct hvm_io_ops *ops; - int rc; handler = hvm_find_io_handler(p); if ( handler == NULL ) return X86EMUL_UNHANDLEABLE; - rc = hvm_process_io_intercept(handler, p); - - ops = handler->ops; - if ( ops->complete != NULL ) - ops->complete(handler); - - return rc; + return hvm_process_io_intercept(handler, p); } struct hvm_io_handler *hvm_next_io_handler(struct domain *d) @@ -326,25 +318,15 @@ bool relocate_portio_handler(struct domain *d, unsigned int old_port, bool hvm_mmio_internal(paddr_t gpa) { - const struct hvm_io_handler *handler; - const struct hvm_io_ops *ops; ioreq_t p = { .type = IOREQ_TYPE_COPY, .addr = gpa, .count = 1, .size = 1, + .dir = IOREQ_WRITE, /* for stdvga */ }; - handler = hvm_find_io_handler(&p); - - if ( handler == NULL ) - return 0; - - ops = handler->ops; - if ( ops->complete != NULL ) - ops->complete(handler); - - return 1; + return hvm_find_io_handler(&p); } /* diff --git a/xen/arch/x86/include/asm/hvm/io.h b/xen/arch/x86/include/asm/hvm/io.h index d72b29f73f..f2b8431fac 100644 --- a/xen/arch/x86/include/asm/hvm/io.h +++ b/xen/arch/x86/include/asm/hvm/io.h @@ -56,13 +56,11 @@ typedef int (*hvm_io_write_t)(const struct hvm_io_handler *handler, uint64_t data); typedef bool (*hvm_io_accept_t)(const struct hvm_io_handler *handler, const ioreq_t *p); -typedef void (*hvm_io_complete_t)(const struct hvm_io_handler *handler); struct hvm_io_ops { hvm_io_accept_t accept; hvm_io_read_t read; hvm_io_write_t write; - hvm_io_complete_t complete; }; int hvm_process_io_intercept(const struct hvm_io_handler *handler,