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

[Xen-changelog] [xen master] memaccess: reduce include dependencies



commit e19d3a942e4b6f6c5b19287a4a6f5020bdab2936
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Mar 10 17:06:57 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Mar 10 17:06:57 2020 +0100

    memaccess: reduce include dependencies
    
    The common header doesn't itself need to include public/vm_event.h nor
    public/memory.h. Drop their inclusion. This requires using the non-
    typedef names in two prototypes and an inline function; by not changing
    the callers and function definitions at the same time it'll remain
    certain that the build would fail if the typedef itself was changed.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
---
 xen/include/asm-arm/mem_access.h |  2 +-
 xen/include/asm-x86/mem_access.h |  4 ++--
 xen/include/xen/mem_access.h     | 11 +++++++++--
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/xen/include/asm-arm/mem_access.h b/xen/include/asm-arm/mem_access.h
index 1610635c5b..35ed0ad154 100644
--- a/xen/include/asm-arm/mem_access.h
+++ b/xen/include/asm-arm/mem_access.h
@@ -19,7 +19,7 @@
 
 static inline
 bool p2m_mem_access_emulate_check(struct vcpu *v,
-                                  const vm_event_response_t *rsp)
+                                  const struct vm_event_st *rsp)
 {
     /* Not supported on ARM. */
     return false;
diff --git a/xen/include/asm-x86/mem_access.h b/xen/include/asm-x86/mem_access.h
index a25e3c62df..18091610ae 100644
--- a/xen/include/asm-x86/mem_access.h
+++ b/xen/include/asm-x86/mem_access.h
@@ -36,12 +36,12 @@
  */
 bool p2m_mem_access_check(paddr_t gpa, unsigned long gla,
                           struct npfec npfec,
-                          vm_event_request_t **req_ptr);
+                          struct vm_event_st **req_ptr);
 
 /* Check for emulation and mark vcpu for skipping one instruction
  * upon rescheduling if required. */
 bool p2m_mem_access_emulate_check(struct vcpu *v,
-                                  const vm_event_response_t *rsp);
+                                  const struct vm_event_st *rsp);
 
 /* Sanity check for mem_access hardware support */
 bool p2m_mem_access_sanity_check(const struct domain *d);
diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h
index 0effa0caad..4e4811680d 100644
--- a/xen/include/xen/mem_access.h
+++ b/xen/include/xen/mem_access.h
@@ -24,8 +24,15 @@
 
 #include <xen/types.h>
 #include <xen/mm.h>
-#include <public/memory.h>
-#include <public/vm_event.h>
+
+/*
+ * asm/mem_access.h has functions taking pointers to this as arguments,
+ * and we want to avoid having to include public/vm_event.h here (which
+ * would provide the full struct definition as well as its
+ * vm_event_{request,response}_t typedefs.
+ */
+struct vm_event_st;
+
 #include <asm/mem_access.h>
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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