xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits
@ 2016-04-12 16:00 Roger Pau Monne
  2016-04-14  4:15 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Roger Pau Monne @ 2016-04-12 16:00 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, Wei Liu, Ian Jackson, Jan Beulich, Roger Pau Monne

At the moment the only consumer of this structure is x86, but other arches
might also use it, so make all the fields 64bits. On x86 Xen will still try
to place everything below the 4GiB boundary, but that might not be feasible
in other arches.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Requested-by: Jan Beulich <jbeulich@suse.com>
---
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Changes since v1:
 - Only convert to 64bit the fields that contain memory addresses.
 - Move the position of nr_modules so all the 32bit fields are packed
   together.
 - Move the position of modlist_paddr to it's after nr_modules.
---
 tools/libxc/include/xc_dom.h |  6 +++---
 xen/include/public/xen.h     | 16 +++++++++-------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h
index 6ebe946..6cb10c4 100644
--- a/tools/libxc/include/xc_dom.h
+++ b/tools/libxc/include/xc_dom.h
@@ -231,11 +231,11 @@ struct hvm_start_info {
                                 /* ("xEn3" with the 0x80 bit of the "E" set).*/
     uint32_t version;           /* Version of this structure.                */
     uint32_t flags;             /* SIF_xxx flags.                            */
-    uint32_t cmdline_paddr;     /* Physical address of the command line.     */
     uint32_t nr_modules;        /* Number of modules passed to the kernel.   */
-    uint32_t modlist_paddr;     /* Physical address of an array of           */
+    uint64_t modlist_paddr;     /* Physical address of an array of           */
                                 /* hvm_modlist_entry.                        */
-    uint32_t rsdp_paddr;        /* Physical address of the RSDP ACPI data    */
+    uint64_t cmdline_paddr;     /* Physical address of the command line.     */
+    uint64_t rsdp_paddr;        /* Physical address of the RSDP ACPI data    */
                                 /* structure.                                */
 } __attribute__((packed));
 
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index 97a5ae5..6ed74ef 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -829,16 +829,16 @@ typedef struct start_info start_info_t;
  *  8 +----------------+
  *    | flags          | SIF_xxx flags.
  * 12 +----------------+
- *    | cmdline_paddr  | Physical address of the command line,
- *    |                | a zero-terminated ASCII string.
- * 16 +----------------+
  *    | nr_modules     | Number of modules passed to the kernel.
- * 20 +----------------+
+ * 16 +----------------+
  *    | modlist_paddr  | Physical address of an array of modules
  *    |                | (layout of the structure below).
  * 24 +----------------+
+ *    | cmdline_paddr  | Physical address of the command line,
+ *    |                | a zero-terminated ASCII string.
+ * 32 +----------------+
  *    | rsdp_paddr     | Physical address of the RSDP ACPI data structure.
- * 28 +----------------+
+ * 40 +----------------+
  *
  * The layout of each entry in the module structure is the following:
  *
@@ -853,8 +853,10 @@ typedef struct start_info start_info_t;
  *    | reserved       |
  * 32 +----------------+
  *
- * The address and size of the modules is a 64bit unsigned integer. However
- * Xen will always try to place all modules below the 4GiB boundary.
+ * The address and sizes are always a 64bit little endian unsigned integer.
+ *
+ * NB: Xen on x86 will always try to place all the data below the 4GiB
+ * boundary.
  */
 #define XEN_HVM_START_MAGIC_VALUE 0x336ec578
 
-- 
2.6.4 (Apple Git-63)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits
  2016-04-12 16:00 [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits Roger Pau Monne
@ 2016-04-14  4:15 ` Jan Beulich
  2016-04-14 17:38   ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2016-04-14  4:15 UTC (permalink / raw)
  To: roger.pau; +Cc: andrew.cooper3, wei.liu2, Ian.Jackson, xen-devel

>>> Roger Pau Monne <roger.pau@citrix.com> 04/12/16 6:12 PM >>>
>At the moment the only consumer of this structure is x86, but other arches
>might also use it, so make all the fields 64bits. On x86 Xen will still try
>to place everything below the 4GiB boundary, but that might not be feasible
>in other arches.
>
>Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>Requested-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Jan Beulich <jbeulich@suse.com>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits
  2016-04-14  4:15 ` Jan Beulich
@ 2016-04-14 17:38   ` Wei Liu
  2016-04-15 11:00     ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-04-14 17:38 UTC (permalink / raw)
  To: Jan Beulich; +Cc: andrew.cooper3, xen-devel, wei.liu2, Ian.Jackson, roger.pau

On Wed, Apr 13, 2016 at 10:15:32PM -0600, Jan Beulich wrote:
> >>> Roger Pau Monne <roger.pau@citrix.com> 04/12/16 6:12 PM >>>
> >At the moment the only consumer of this structure is x86, but other arches
> >might also use it, so make all the fields 64bits. On x86 Xen will still try
> >to place everything below the 4GiB boundary, but that might not be feasible
> >in other arches.
> >
> >Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> >Requested-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> 

Release-acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits
  2016-04-14 17:38   ` Wei Liu
@ 2016-04-15 11:00     ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2016-04-15 11:00 UTC (permalink / raw)
  To: Wei Liu; +Cc: andrew.cooper3, xen-devel, Jan Beulich, roger.pau

Wei Liu writes ("Re: [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits"):
> On Wed, Apr 13, 2016 at 10:15:32PM -0600, Jan Beulich wrote:
>>> Roger Pau Monne <roger.pau@citrix.com> 04/12/16 6:12 PM >>>
> > >At the moment the only consumer of this structure is x86, but other arches
> > >might also use it, so make all the fields 64bits. On x86 Xen will still try
> > >to place everything below the 4GiB boundary, but that might not be feasible
> > >in other arches.
> > >
> > >Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > >Requested-by: Jan Beulich <jbeulich@suse.com>
> > 
> > Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> Release-acked-by: Wei Liu <wei.liu2@citrix.com>

Queued, thanks.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-04-15 11:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 16:00 [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits Roger Pau Monne
2016-04-14  4:15 ` Jan Beulich
2016-04-14 17:38   ` Wei Liu
2016-04-15 11:00     ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).