From patchwork Thu Jan 7 12:36:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 7976691 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 48F51BEEE5 for ; Thu, 7 Jan 2016 12:40:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 600382017D for ; Thu, 7 Jan 2016 12:40:04 +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 8013E2014A for ; Thu, 7 Jan 2016 12:40:03 +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 1aH9oV-0004dS-Fk; Thu, 07 Jan 2016 12:37:11 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aH9oT-0004cv-Tt for xen-devel@lists.xen.org; Thu, 07 Jan 2016 12:37:10 +0000 Received: from [193.109.254.147] by server-6.bemta-14.messagelabs.com id DB/91-16618-5FB5E865; Thu, 07 Jan 2016 12:37:09 +0000 X-Env-Sender: jgross@suse.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1452170225!14343543!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21902 invoked from network); 7 Jan 2016 12:37:05 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-4.tower-27.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 7 Jan 2016 12:37:05 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7587FABE5; Thu, 7 Jan 2016 12:37:04 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xen.org, Ian.Campbell@citrix.com, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com, andrew.cooper3@citrix.com Date: Thu, 7 Jan 2016 13:36:54 +0100 Message-Id: <1452170214-17821-5-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1452170214-17821-1-git-send-email-jgross@suse.com> References: <1452170214-17821-1-git-send-email-jgross@suse.com> Cc: Juergen Gross Subject: [Xen-devel] [PATCH v4 4/4] libxc: set flag for support of linear p2m list in domain builder 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: , MIME-Version: 1.0 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 Set the SIF_VIRT_P2M_4TOOLS flag for pv-domUs in the domain builder to indicate the Xen tools have full support for the virtual mapped linear p2m list. This will enable pv-domUs to drop support of the 3 level p2m tree and use the linear list only. Without setting this flag some kernels might limit themselves to 512 GB memory size in order not to break migration. Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper Acked-by: Wei Liu Acked-by: Ian Campbell --- docs/features/migration.pandoc | 7 ++++--- tools/libxc/xc_dom_compat_linux.c | 2 +- tools/libxc/xc_dom_core.c | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/features/migration.pandoc b/docs/features/migration.pandoc index 9852a19..151c50d 100644 --- a/docs/features/migration.pandoc +++ b/docs/features/migration.pandoc @@ -1,5 +1,5 @@ % Migration -% Revision 1 +% Revision 2 \clearpage @@ -95,7 +95,6 @@ scenarios, which will involve starting with VMs from Xen 4.5 # Areas for improvement * Arm support -* Linear P2M support for x86 PV * Live looping parameters # Known issues @@ -105,7 +104,8 @@ scenarios, which will involve starting with VMs from Xen 4.5 * x86 HVM with nested-virt (no relevant information included in the stream) * x86 PV ballooning (P2M marked dirty, target frame not marked) -* x86 PV P2M structure changes (not noticed, stale mappings used) +* x86 PV P2M structure changes (not noticed, stale mappings used) for + guests not using the linear p2m layout # References @@ -120,4 +120,5 @@ for Migration v2 Date Revision Version Notes ---------- -------- -------- ------------------------------------------- 2015-10-24 1 Xen 4.6 Document written +2015-12-11 2 Xen 4.7 Support of linear p2m list ---------- -------- -------- ------------------------------------------- diff --git a/tools/libxc/xc_dom_compat_linux.c b/tools/libxc/xc_dom_compat_linux.c index abbc09f..c922c61 100644 --- a/tools/libxc/xc_dom_compat_linux.c +++ b/tools/libxc/xc_dom_compat_linux.c @@ -59,7 +59,7 @@ int xc_linux_build(xc_interface *xch, uint32_t domid, ((rc = xc_dom_ramdisk_file(dom, initrd_name)) != 0) ) goto out; - dom->flags = flags; + dom->flags |= flags; dom->console_evtchn = console_evtchn; dom->xenstore_evtchn = store_evtchn; diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c index 2061ba6..55c779d 100644 --- a/tools/libxc/xc_dom_core.c +++ b/tools/libxc/xc_dom_core.c @@ -777,6 +777,8 @@ struct xc_dom_image *xc_dom_allocate(xc_interface *xch, dom->parms.elf_paddr_offset = UNSET_ADDR; dom->parms.p2m_base = UNSET_ADDR; + dom->flags = SIF_VIRT_P2M_4TOOLS; + dom->alloc_malloc += sizeof(*dom); return dom;