From patchwork Wed Jan 13 12:32:14 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: 8024611 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 4C9E19F744 for ; Wed, 13 Jan 2016 12:36:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1E6F2047B for ; Wed, 13 Jan 2016 12:36:15 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5610220454 for ; Wed, 13 Jan 2016 12:36:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aJKc0-00055O-Is; Wed, 13 Jan 2016 12:33:16 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aJKby-00054U-VJ for xen-devel@lists.xenproject.org; Wed, 13 Jan 2016 12:33:15 +0000 Received: from [85.158.139.211] by server-1.bemta-5.messagelabs.com id EB/F6-32615-A0446965; Wed, 13 Jan 2016 12:33:14 +0000 X-Env-Sender: prvs=81391bf32=roger.pau@citrix.com X-Msg-Ref: server-8.tower-206.messagelabs.com!1452688392!15338231!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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12165 invoked from network); 13 Jan 2016 12:33:13 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-8.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 13 Jan 2016 12:33:13 -0000 X-IronPort-AV: E=Sophos;i="5.22,288,1449532800"; d="scan'208";a="324707617" From: Roger Pau Monne To: Date: Wed, 13 Jan 2016 13:32:14 +0100 Message-ID: <1452688338-70075-2-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.9.5 (Apple Git-50.3) In-Reply-To: <1452688338-70075-1-git-send-email-roger.pau@citrix.com> References: <1452688338-70075-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Wei Liu , Ian Jackson , Ian Campbell , Roger Pau Monne Subject: [Xen-devel] [PATCH 1/5] xen/elfnotes: initialise phys_entry to UNSET_ADDR32 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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 And introduce UNSET_ADDR32. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Ian Campbell Cc: Wei Liu --- tools/libxc/xc_dom_elfloader.c | 2 +- xen/common/libelf/libelf-dominfo.c | 1 + xen/include/xen/libelf.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xc_dom_elfloader.c index 2ae575e..5039f3f 100644 --- a/tools/libxc/xc_dom_elfloader.c +++ b/tools/libxc/xc_dom_elfloader.c @@ -57,7 +57,7 @@ static char *xc_dom_guest_type(struct xc_dom_image *dom, uint64_t machine = elf_uval(elf, elf->ehdr, e_machine); if ( dom->container_type == XC_DOM_HVM_CONTAINER && - dom->parms.phys_entry != UNSET_ADDR ) + dom->parms.phys_entry != UNSET_ADDR32 ) return "hvm-3.0-x86_32"; switch ( machine ) diff --git a/xen/common/libelf/libelf-dominfo.c b/xen/common/libelf/libelf-dominfo.c index 02d6cfb..ec69449 100644 --- a/xen/common/libelf/libelf-dominfo.c +++ b/xen/common/libelf/libelf-dominfo.c @@ -503,6 +503,7 @@ elf_errorstatus elf_xen_parse(struct elf_binary *elf, parms->virt_hv_start_low = UNSET_ADDR; parms->p2m_base = UNSET_ADDR; parms->elf_paddr_offset = UNSET_ADDR; + parms->phys_entry = UNSET_ADDR32; /* Find and parse elf notes. */ count = elf_phdr_count(elf); diff --git a/xen/include/xen/libelf.h b/xen/include/xen/libelf.h index 6da4cc0..95b5370 100644 --- a/xen/include/xen/libelf.h +++ b/xen/include/xen/libelf.h @@ -386,6 +386,7 @@ elf_errorstatus elf_reloc(struct elf_binary *elf); /* xc_libelf_dominfo.c */ #define UNSET_ADDR ((uint64_t)-1) +#define UNSET_ADDR32 ((uint32_t)-1) enum xen_elfnote_type { XEN_ENT_NONE = 0,