]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
memaccess: reduce include dependencies
authorJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2020 16:06:57 +0000 (17:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2020 16:06:57 +0000 (17:06 +0100)
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@suse.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/include/asm-arm/mem_access.h
xen/include/asm-x86/mem_access.h
xen/include/xen/mem_access.h

index 1610635c5b35a750840e3d4b0669bbd8df252703..35ed0ad15471c3a4e2eddc5810668c3ef152619b 100644 (file)
@@ -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;
index a25e3c62df98289e492a026591fd3723f588470d..18091610aea0439f7ad7bd60b2f205a3404aa99b 100644 (file)
  */
 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);
index 0effa0caad63423d2518bac7c6f4f272ca5ab4d9..4e4811680dc96fc40928f1b21208c6dc3f5f49ec 100644 (file)
 
 #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>
 
 /*