]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
vmevent: reduce include dependencies
authorJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2020 14:38:25 +0000 (15:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2020 14:38:25 +0000 (15:38 +0100)
There's no need for virtually everything to include public/vm_event.h.
Move its inclusion out of sched.h. This requires using the non-typedef
name in p2m_mem_paging_resume()'s prototype; by not changing the
function definition 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: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Alexandru Isaila <aisaila@bitdefender.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/x86/livepatch.c
xen/include/asm-x86/p2m.h
xen/include/asm-x86/vm_event.h
xen/include/xen/sched.h
xen/include/xen/vm_event.h

index 513b0f3841c081a2cc0b13c81d7a8ceb7f92934c..901fad96bf489506938e1c46183ec817e0302163 100644 (file)
@@ -11,6 +11,7 @@
 #include <xen/livepatch_elf.h>
 #include <xen/livepatch.h>
 #include <xen/sched.h>
+#include <xen/vm_event.h>
 
 #include <asm/fixmap.h>
 #include <asm/nmi.h>
index 0cf531abb72beb6129a066c853f7147bb6305b78..a2c60498344f2cc69c0c6f7b8e61c9536ce9fb64 100644 (file)
@@ -743,7 +743,8 @@ void p2m_mem_paging_populate(struct domain *d, unsigned long gfn);
 /* Prepare the p2m for paging a frame in */
 int p2m_mem_paging_prep(struct domain *d, unsigned long gfn, uint64_t buffer);
 /* Resume normal operation (in case a domain was paused) */
-void p2m_mem_paging_resume(struct domain *d, vm_event_response_t *rsp);
+struct vm_event_st;
+void p2m_mem_paging_resume(struct domain *d, struct vm_event_st *rsp);
 
 /* 
  * Internal functions, only called by other p2m code
index 66db9e1e2587f299b515b32922568ac11b68a306..785e741fba256c6f39d8296748ec642c6659d923 100644 (file)
@@ -20,6 +20,7 @@
 #define __ASM_X86_VM_EVENT_H__
 
 #include <xen/sched.h>
+#include <public/vm_event.h>
 
 /*
  * Should we emulate the next matching instruction on VCPU resume
index 3a4f43098c39e0032e67a4edf2c0415dcf58f9fa..739fa6854109b64aee1d0463f4b1351a880ef2b7 100644 (file)
@@ -27,7 +27,6 @@
 #include <public/domctl.h>
 #include <public/sysctl.h>
 #include <public/vcpu.h>
-#include <public/vm_event.h>
 #include <public/event_channel.h>
 
 #ifdef CONFIG_COMPAT
@@ -313,30 +312,6 @@ struct sched_unit {
 #define domain_lock(d) spin_lock_recursive(&(d)->domain_lock)
 #define domain_unlock(d) spin_unlock_recursive(&(d)->domain_lock)
 
-/* VM event */
-struct vm_event_domain
-{
-    spinlock_t lock;
-    /* The ring has 64 entries */
-    unsigned char foreign_producers;
-    unsigned char target_producers;
-    /* shared ring page */
-    void *ring_page;
-    struct page_info *ring_pg_struct;
-    /* front-end ring */
-    vm_event_front_ring_t front_ring;
-    /* event channel port (vcpu0 only) */
-    int xen_port;
-    /* vm_event bit for vcpu->pause_flags */
-    int pause_flag;
-    /* list of vcpus waiting for room in the ring */
-    struct waitqueue_head wq;
-    /* the number of vCPUs blocked */
-    unsigned int blocked;
-    /* The last vcpu woken up */
-    unsigned int last_vcpu_wake_up;
-};
-
 struct evtchn_port_ops;
 
 struct domain
index 3cc2b204e5e2081d93bc92784aa2c5ab4102203f..92811d9110e5509009aaa47278d63643412bd0ee 100644 (file)
 #include <xen/sched.h>
 #include <public/vm_event.h>
 
+struct vm_event_domain
+{
+    spinlock_t lock;
+    /* The ring has 64 entries */
+    unsigned char foreign_producers;
+    unsigned char target_producers;
+    /* shared ring page */
+    void *ring_page;
+    struct page_info *ring_pg_struct;
+    /* front-end ring */
+    vm_event_front_ring_t front_ring;
+    /* event channel port (vcpu0 only) */
+    int xen_port;
+    /* vm_event bit for vcpu->pause_flags */
+    int pause_flag;
+    /* list of vcpus waiting for room in the ring */
+    struct waitqueue_head wq;
+    /* the number of vCPUs blocked */
+    unsigned int blocked;
+    /* The last vcpu woken up */
+    unsigned int last_vcpu_wake_up;
+};
+
 /* Clean up on domain destruction */
 void vm_event_cleanup(struct domain *d);