[Xen-devel] [PATCH] x86/mem_sharing: move mem_sharing_domain declaration

Tamas K Lengyel posted 1 patch 4 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20200318153106.118281-1-tamas@tklengyel.com
xen/include/asm-x86/hvm/domain.h  | 13 +++++++++++++
xen/include/asm-x86/mem_sharing.h | 11 -----------
2 files changed, 13 insertions(+), 11 deletions(-)
[Xen-devel] [PATCH] x86/mem_sharing: move mem_sharing_domain declaration
Posted by Tamas K Lengyel 4 years ago
Due to recent reshuffling of header include paths mem_sharing no longer
compiles. Fix it by moving mem_sharing_domain declaration to location it
is used in.

Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
---
 xen/include/asm-x86/hvm/domain.h  | 13 +++++++++++++
 xen/include/asm-x86/mem_sharing.h | 11 -----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h
index 624a67d0dd..95fe18cddc 100644
--- a/xen/include/asm-x86/hvm/domain.h
+++ b/xen/include/asm-x86/hvm/domain.h
@@ -64,6 +64,19 @@ struct hvm_ioreq_server {
     uint8_t                bufioreq_handling;
 };
 
+#ifdef CONFIG_MEM_SHARING
+struct mem_sharing_domain
+{
+    bool enabled;
+
+    /*
+     * When releasing shared gfn's in a preemptible manner, recall where
+     * to resume the search.
+     */
+    unsigned long next_shared_gfn_to_relinquish;
+};
+#endif
+
 /*
  * This structure defines function hooks to support hardware-assisted
  * virtual interrupt delivery to guest. (e.g. VMX PI and SVM AVIC).
diff --git a/xen/include/asm-x86/mem_sharing.h b/xen/include/asm-x86/mem_sharing.h
index 53760a2896..53b7929d0e 100644
--- a/xen/include/asm-x86/mem_sharing.h
+++ b/xen/include/asm-x86/mem_sharing.h
@@ -26,17 +26,6 @@
 
 #ifdef CONFIG_MEM_SHARING
 
-struct mem_sharing_domain
-{
-    bool enabled;
-
-    /*
-     * When releasing shared gfn's in a preemptible manner, recall where
-     * to resume the search.
-     */
-    unsigned long next_shared_gfn_to_relinquish;
-};
-
 #define mem_sharing_enabled(d) ((d)->arch.hvm.mem_sharing.enabled)
 
 /* Auditing of memory sharing code? */
-- 
2.20.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH] x86/mem_sharing: move mem_sharing_domain declaration
Posted by Andrew Cooper 4 years ago
On 18/03/2020 15:31, Tamas K Lengyel wrote:
> Due to recent reshuffling of header include paths mem_sharing no longer
> compiles. Fix it by moving mem_sharing_domain declaration to location it
> is used in.
>
> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel