[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/HVM: drop .complete hook for intercept handling



commit 40f5c7e1389c2c047656f0ed3cc9ed4e194883f2
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Sep 12 09:17:43 2024 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Sep 12 09:17:43 2024 +0200

    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@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/hvm/intercept.c      | 24 +++---------------------
 xen/arch/x86/include/asm/hvm/io.h |  2 --
 2 files changed, 3 insertions(+), 23 deletions(-)

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,
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.