From patchwork Tue Apr 12 16:00:28 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: 8812371 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6E313C0553 for ; Tue, 12 Apr 2016 16:04:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 836C22034C for ; Tue, 12 Apr 2016 16:03:59 +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 8FC07201F2 for ; Tue, 12 Apr 2016 16:03:58 +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 1aq0kv-0004Hq-9m; Tue, 12 Apr 2016 16:01:33 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aq0ku-0004Hk-6i for xen-devel@lists.xenproject.org; Tue, 12 Apr 2016 16:01:32 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id 02/6D-19343-BDB1D075; Tue, 12 Apr 2016 16:01:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeJIrShJLcpLzFFi42JxWrohUveWNG+ 4wcR7xhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8akC4eYChpkKyZezG1gXC/axcjJISHgL/Hn 6Bw2EJtNQEfi4tydQDYHh4iAisTtvQZdjFwczAIHGCX27D3KCBIXFoiV+LGaE6ScRUBVYs385 SwgYV4BF4nbr1whJupKnNy9iR3E5hUQlDg58wkLiM0soCnRuv03O4QtL9G8dTYziC0koCjRP+ 8BG0Qvt8Tt01OZJzDyzkLSPgtJ+ywk7QsYmVcxqhenFpWlFuka6iUVZaZnlOQmZuboGhoY6+W mFhcnpqfmJCYV6yXn525iBAYTAxDsYFz+0ekQoyQHk5Io78H3POFCfEn5KZUZicUZ8UWlOanF hxhlODiUJHinSPGGCwkWpaanVqRl5gDDGiYtwcGjJMK7AiTNW1yQmFucmQ6ROsWoKCXOmwWSE ABJZJTmwbXBYukSo6yUMC8j0CFCPAWpRbmZJajyrxjFORiVhHnng0zhycwrgZv+CmgxE9DiZ/ 84QRaXJCKkpBoYfbVL9UR+srToHPLzYX6y03q21369qRlHuHvLM4/Y5zVM+1rerWq/dOa3+Sw VuyZy/py0/p9i3lq1s0nFui6+6sp5PyRs2drdHn74/d91yZmbL54uKbCLuOJ59UiD2jm/fZWe D15cknNpiTOO0w7e8f17bHDe2/JzlW2Fa3L51EQdE47ocrEpsRRnJBpqMRcVJwIAbXvt7qACA AA= X-Env-Sender: prvs=9034de270=roger.pau@citrix.com X-Msg-Ref: server-16.tower-31.messagelabs.com!1460476889!26910875!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 40035 invoked from network); 12 Apr 2016 16:01:30 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-16.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 12 Apr 2016 16:01:30 -0000 X-IronPort-AV: E=Sophos;i="5.24,474,1454976000"; d="scan'208";a="346524313" From: Roger Pau Monne To: Date: Tue, 12 Apr 2016 18:00:28 +0200 Message-ID: <1460476828-70142-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: MIA2 Cc: Andrew Cooper , Wei Liu , Ian Jackson , Jan Beulich , Roger Pau Monne Subject: [Xen-devel] [PATCH v2] xen: change the sizes of memory fields in the HVM start info 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: Jan Beulich --- Cc: Wei Liu Cc: Andrew Cooper Cc: Jan Beulich Cc: Ian Jackson --- 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