All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.14] mm: fix public declaration of struct xen_mem_acquire_resource
@ 2020-06-23 13:52 Roger Pau Monne
  2020-06-23 13:59 ` Paul Durrant
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Roger Pau Monne @ 2020-06-23 13:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, paul, Andrew Cooper,
	Ian Jackson, George Dunlap, Jan Beulich, Roger Pau Monne

XENMEM_acquire_resource and it's related structure is currently inside
a __XEN__ or __XEN_TOOLS__ guarded section to limit it's scope to the
hypervisor or the toolstack only. This is wrong as the hypercall is
already being used by the Linux kernel at least, and as such needs to
be public.

Also switch the usage of uint64_aligned_t to plain uint64_t, as
uint64_aligned_t is only to be used by the toolstack. Note that the
layout of the structure will be the same, as the field is already
naturally aligned to a 8 byte boundary.

No functional change expected.

Fixes: 3f8f12281dd20 ('x86/mm: add HYPERVISOR_memory_op to acquire guest resources')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Would be good to get this fixed before the release in order to avoid
shipping bogus headers. Should also be backported.
---
 xen/include/public/memory.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index dbd35305df..1767d7d5f5 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -607,6 +607,8 @@ struct xen_reserved_device_memory_map {
 typedef struct xen_reserved_device_memory_map xen_reserved_device_memory_map_t;
 DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t);
 
+#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
+
 /*
  * Get the pages for a particular guest resource, so that they can be
  * mapped directly by a tools domain.
@@ -645,7 +647,7 @@ struct xen_mem_acquire_resource {
      * IN - the index of the initial frame to be mapped. This parameter
      *      is ignored if nr_frames is 0.
      */
-    uint64_aligned_t frame;
+    uint64_t frame;
 
 #define XENMEM_resource_ioreq_server_frame_bufioreq 0
 #define XENMEM_resource_ioreq_server_frame_ioreq(n) (1 + (n))
@@ -666,8 +668,6 @@ struct xen_mem_acquire_resource {
 typedef struct xen_mem_acquire_resource xen_mem_acquire_resource_t;
 DEFINE_XEN_GUEST_HANDLE(xen_mem_acquire_resource_t);
 
-#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
-
 /*
  * XENMEM_get_vnumainfo used by guest to get
  * vNUMA topology from hypervisor.
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2020-06-26 15:25 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 13:52 [PATCH for-4.14] mm: fix public declaration of struct xen_mem_acquire_resource Roger Pau Monne
2020-06-23 13:59 ` Paul Durrant
2020-06-23 14:27 ` Julien Grall
2020-06-23 15:02 ` Jan Beulich
2020-06-23 15:56   ` Roger Pau Monné
2020-06-23 16:18     ` Jan Beulich
2020-06-23 17:26       ` Roger Pau Monné
2020-06-24 10:12         ` Jan Beulich
2020-06-24 13:41           ` Julien Grall
2020-06-24 14:01             ` Jan Beulich
2020-06-25  9:05               ` Roger Pau Monné
2020-06-25 16:10                 ` Roger Pau Monné
2020-06-26 13:40                   ` Jan Beulich
2020-06-26 14:19                     ` Jan Beulich
2020-06-26 15:03                       ` Roger Pau Monné
2020-06-26 15:25                         ` Jan Beulich
2020-06-25  9:24               ` Julien Grall
2020-06-23 15:04 ` Jan Beulich
2020-06-23 17:32   ` Roger Pau Monné
2020-06-24 10:05     ` Jan Beulich
2020-06-24 10:52       ` Julien Grall
2020-06-24 12:08         ` Jan Beulich
2020-06-24 12:47           ` Julien Grall
2020-06-24 12:52             ` Jan Beulich
2020-06-24 12:53               ` Paul Durrant
2020-06-24 13:07                 ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.