mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/HVM: drop .complete hook for intercept handling
No user of the hook exists anymore. While touching hvm_mmio_internal() also make direction of the request explicit - it only so happens that IOREQ_WRITE is zero. Yet it being a write is imperative for stdvga.c to "accept" the request. Requested-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
b180a50326
commit
40f5c7e138
2 files changed
+3
-23
No files matched your search
@@ -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)
|
int hvm_io_intercept(ioreq_t *p)
|
||||||
{
|
{
|
||||||
const struct hvm_io_handler *handler;
|
const struct hvm_io_handler *handler;
|
||||||
const struct hvm_io_ops *ops;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
handler = hvm_find_io_handler(p);
|
handler = hvm_find_io_handler(p);
|
||||||
|
|
||||||
if ( handler == NULL )
|
if ( handler == NULL )
|
||||||
return X86EMUL_UNHANDLEABLE;
|
return X86EMUL_UNHANDLEABLE;
|
||||||
|
|
||||||
rc = hvm_process_io_intercept(handler, p);
|
return hvm_process_io_intercept(handler, p);
|
||||||
|
|
||||||
ops = handler->ops;
|
|
||||||
if ( ops->complete != NULL )
|
|
||||||
ops->complete(handler);
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct hvm_io_handler *hvm_next_io_handler(struct domain *d)
|
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)
|
bool hvm_mmio_internal(paddr_t gpa)
|
||||||
{
|
{
|
||||||
const struct hvm_io_handler *handler;
|
|
||||||
const struct hvm_io_ops *ops;
|
|
||||||
ioreq_t p = {
|
ioreq_t p = {
|
||||||
.type = IOREQ_TYPE_COPY,
|
.type = IOREQ_TYPE_COPY,
|
||||||
.addr = gpa,
|
.addr = gpa,
|
||||||
.count = 1,
|
.count = 1,
|
||||||
.size = 1,
|
.size = 1,
|
||||||
|
.dir = IOREQ_WRITE, /* for stdvga */
|
||||||
};
|
};
|
||||||
|
|
||||||
handler = hvm_find_io_handler(&p);
|
return hvm_find_io_handler(&p);
|
||||||
|
|
||||||
if ( handler == NULL )
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ops = handler->ops;
|
|
||||||
if ( ops->complete != NULL )
|
|
||||||
ops->complete(handler);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -56,13 +56,11 @@ typedef int (*hvm_io_write_t)(const struct hvm_io_handler *handler,
|
|||||||
uint64_t data);
|
uint64_t data);
|
||||||
typedef bool (*hvm_io_accept_t)(const struct hvm_io_handler *handler,
|
typedef bool (*hvm_io_accept_t)(const struct hvm_io_handler *handler,
|
||||||
const ioreq_t *p);
|
const ioreq_t *p);
|
||||||
typedef void (*hvm_io_complete_t)(const struct hvm_io_handler *handler);
|
|
||||||
|
|
||||||
struct hvm_io_ops {
|
struct hvm_io_ops {
|
||||||
hvm_io_accept_t accept;
|
hvm_io_accept_t accept;
|
||||||
hvm_io_read_t read;
|
hvm_io_read_t read;
|
||||||
hvm_io_write_t write;
|
hvm_io_write_t write;
|
||||||
hvm_io_complete_t complete;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int hvm_process_io_intercept(const struct hvm_io_handler *handler,
|
int hvm_process_io_intercept(const struct hvm_io_handler *handler,
|
||||||
|
|||||||