diff mbox

[v2] xen: change the sizes of memory fields in the HVM start info to be 64bits

Message ID 1460476828-70142-1-git-send-email-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monné April 12, 2016, 4 p.m. UTC
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(-)

Comments

Jan Beulich April 14, 2016, 4:15 a.m. UTC | #1
>>> 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>
Wei Liu April 14, 2016, 5:38 p.m. UTC | #2
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>
Ian Jackson April 15, 2016, 11 a.m. UTC | #3
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.
diff mbox

Patch

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