From patchwork Fri Apr 8 15:47:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8784291 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 154AC9FBEA for ; Fri, 8 Apr 2016 15:51:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 121AA20211 for ; Fri, 8 Apr 2016 15:51:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EB71202B8 for ; Fri, 8 Apr 2016 15:51:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoYfF-0002xA-B4; Fri, 08 Apr 2016 15:49:41 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoYfF-0002x2-1W for xen-devel@lists.xenproject.org; Fri, 08 Apr 2016 15:49:41 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id FA/05-18833-413D7075; Fri, 08 Apr 2016 15:49:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRWlGSWpSXmKPExsXitHRDpK7IZfZ wg9t3GS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1owjB4+yFjxVrbgwbSZLA+MNqS5GTg4JAX+J O6t/s4PYbAI6Ehfn7mTrYuTgEBFQkbi916CLkYuDWeAAo8TJ1iYWkBphgSiJlvtL2UBsFqCay 71TWUFsXgEXiclfLzBDzNSVOLl7EztEXFDi5MwnYL3MApoSrdshdjELyEs0b50NVi8koCjRP+ 8B2F4JAW6Jv932Exh5ZyHpnoWkexaS7gWMzKsY1YtTi8pSi3QN9ZKKMtMzSnITM3N0DQ3M9HJ Ti4sT01NzEpOK9ZLzczcxAgOKAQh2MO587nSIUZKDSUmUV+cUe7gQX1J+SmVGYnFGfFFpTmrx IUYZDg4lCd7OS0A5waLU9NSKtMwcYGjDpCU4eJREeENA0rzFBYm5xZnpEKlTjLocWxbcWMskx JKXn5cqJc4rAVIkAFKUUZoHNwIWZ5cYZaWEeRmBjhLiKUgtys0sQZV/xSjOwagkzGsNMoUnM6 8EbtMroCOYgI64wM8GckRJIkJKqoEx9NNinZ2q72un6TRP25W5/e6S+l6b4i1mflsX3ztwjHX pyxf2HnwbV3x4OGeZWdu/nPTpqV2ztddNbb+kOvEyl2rd7Pr41XYcXetz9Dj2fvKJlrVfY+17 /Pw5A1OLY5xzEr411S7IU3DpNt6eNufcvNQdRk4vvObHHS3QdxPUuzJ3X/oT6anNSizFGYmGW sxFxYkA+1Qx164CAAA= X-Env-Sender: prvs=89920a859=roger.pau@citrix.com X-Msg-Ref: server-10.tower-21.messagelabs.com!1460130578!8198180!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18121 invoked from network); 8 Apr 2016 15:49:39 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-10.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 8 Apr 2016 15:49:39 -0000 X-IronPort-AV: E=Sophos;i="5.24,454,1454976000"; d="scan'208";a="345830494" From: Roger Pau Monne To: Date: Fri, 8 Apr 2016 17:47:36 +0200 Message-ID: <1460130456-23278-1-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) MIME-Version: 1.0 X-DLP: MIA1 Cc: Andrew Cooper , Ian Jackson , Wei Liu , Jan Beulich , Roger Pau Monne Subject: [Xen-devel] [PATCH] xen: change the sizes of fields in the HVM start info layout to be 64bits X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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é Requested-by: Jan Beulich Acked-by: Wei Liu Acked-by: Andrew Cooper Nacked-by: Jan Beulich --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Ian Jackson Cc: Wei Liu --- tools/libxc/include/xc_dom.h | 20 ++++++++++---------- xen/include/public/xen.h | 24 +++++++++++++----------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h index 6ebe946..746cce2 100644 --- a/tools/libxc/include/xc_dom.h +++ b/tools/libxc/include/xc_dom.h @@ -227,16 +227,16 @@ struct xc_dom_image { * be required in the future if there are alignment changes. */ struct hvm_start_info { - uint32_t magic; /* Contains the magic value 0x336ec578 */ - /* ("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 */ - /* hvm_modlist_entry. */ - uint32_t rsdp_paddr; /* Physical address of the RSDP ACPI data */ - /* structure. */ + uint64_t magic; /* Contains the magic value 0x746f6f62336ec578 */ + /* ("xEn3boot" with the 0x80 bit of the "E" set).*/ + uint64_t version; /* Version of this structure. */ + uint64_t flags; /* SIF_xxx flags. */ + uint64_t cmdline_paddr; /* Physical address of the command line. */ + uint64_t nr_modules; /* Number of modules passed to the kernel. */ + uint64_t modlist_paddr; /* Physical address of an array of */ + /* hvm_modlist_entry. */ + uint64_t rsdp_paddr; /* Physical address of the RSDP ACPI data */ + /* structure. */ } __attribute__((packed)); struct hvm_modlist_entry { diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index 435d789..59f3c2f 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -814,23 +814,23 @@ typedef struct start_info start_info_t; * * 0 +----------------+ * | magic | Contains the magic value XEN_HVM_START_MAGIC_VALUE - * | | ("xEn3" with the 0x80 bit of the "E" set). - * 4 +----------------+ + * | | ("xEn3boot" with the 0x80 bit of the "E" set). + * 8 +----------------+ * | version | Version of this structure. Current version is 0. New * | | versions are guaranteed to be backwards-compatible. - * 8 +----------------+ + * 16 +----------------+ * | flags | SIF_xxx flags. - * 12 +----------------+ + * 24 +----------------+ * | cmdline_paddr | Physical address of the command line, * | | a zero-terminated ASCII string. - * 16 +----------------+ + * 32 +----------------+ * | nr_modules | Number of modules passed to the kernel. - * 20 +----------------+ + * 40 +----------------+ * | modlist_paddr | Physical address of an array of modules * | | (layout of the structure below). - * 24 +----------------+ + * 48 +----------------+ * | rsdp_paddr | Physical address of the RSDP ACPI data structure. - * 28 +----------------+ + * 56 +----------------+ * * The layout of each entry in the module structure is the following: * @@ -845,10 +845,12 @@ 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 +#define XEN_HVM_START_MAGIC_VALUE 0x746f6f62336ec578 /* New console union for dom0 introduced in 0x00030203. */ #if __XEN_INTERFACE_VERSION__ < 0x00030203