From patchwork Thu Oct 5 18:23:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 9987741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1138E6029B for ; Thu, 5 Oct 2017 18:26:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02BDD28D36 for ; Thu, 5 Oct 2017 18:26:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB8A428D38; Thu, 5 Oct 2017 18:26:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id C72F528D36 for ; Thu, 5 Oct 2017 18:26:20 +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 1e0AoJ-0006ZL-Pj; Thu, 05 Oct 2017 18:23:51 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0AoI-0006Yn-FO for xen-devel@lists.xen.org; Thu, 05 Oct 2017 18:23:50 +0000 Received: from [85.158.137.68] by server-2.bemta-3.messagelabs.com id A3/0E-02045-5B876D95; Thu, 05 Oct 2017 18:23:49 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRWlGSWpSXmKPExsXitHSDve7Wimu RBjNmc1gs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBk7bjazF/QIV1zf95e1gfE2fxcjJ4eEgL/E kluz2UBsNgF9id0vPjGB2CIC6hKnOy6ydjFycTALzGGU2HhlMzNIQljAS6L5cR8LiM0ioCJxd O1CoAYODl4BT4mGBlmImXIS54//BCvnBCrfumwOWLkQUMm6tm2sELaaxLX+S+wgNq+AoMTJmU /AapgFJCQOvnjBPIGRdxaS1CwkqQWMTKsYNYpTi8pSi3QNDfWSijLTM0pyEzNzdA0NjPVyU4u LE9NTcxKTivWS83M3MQKDhwEIdjCu/u10iFGSg0lJlFer4FqkEF9SfkplRmJxRnxRaU5q8SFG GQ4OJQnepnKgnGBRanpqRVpmDjCMYdISHDxKIrwdIGne4oLE3OLMdIjUKUZjjmObLv9h4ui4e fcPkxBLXn5eqpQ4bxpIqQBIaUZpHtwgWHxdYpSVEuZlBDpNiKcgtSg3swRV/hWjOAejkjCvGD BahXgy80rg9r0COoUJ6JQ5TVdATilJREhJNTDuK9TS1jxmZNU616G1OrV69p8r934Fal1k/pR U1fnIy7V86f/Zc3drWbzWO1hue99itgTf0sK0xIZXU+57vNu/vdYlYqd1Rnl8QLDzajX3NR27 zztX222aYaYhLKxgc0rzwf2EO+e7T5WoXd96LOigzoGb3Ow2Ibc/K9+peBHG9+HGDLG7z0qVW IozEg21mIuKEwGr4rVqqgIAAA== X-Env-Sender: prvs=444660210=Andrew.Cooper3@citrix.com X-Msg-Ref: server-3.tower-31.messagelabs.com!1507227827!118107891!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21517 invoked from network); 5 Oct 2017 18:23:48 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 5 Oct 2017 18:23:48 -0000 X-IronPort-AV: E=Sophos;i="5.42,481,1500940800"; d="scan'208";a="450646848" From: Andrew Cooper To: Xen-devel Date: Thu, 5 Oct 2017 19:23:39 +0100 Message-ID: <1507227824-11744-2-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507227824-11744-1-git-send-email-andrew.cooper3@citrix.com> References: <1507227824-11744-1-git-send-email-andrew.cooper3@citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Julien Grall , Ian Jackson , Wei Liu Subject: [Xen-devel] [PATCH for-4.10 1/5] tools/dombuilder: Drop more PVH v1 leftovers 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-Virus-Scanned: ClamAV using ClamSMTP alloc_magic_pages() is renamed to alloc_magic_pages_pv() to mirror its alloc_magic_pages_hvm() counterpart. Delete a redundant comment, introduce some newlines clarity, and remove a logically dead allocation of shared info. Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Julien Grall --- tools/libxc/xc_dom_x86.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c index cb68efc..885ca1b 100644 --- a/tools/libxc/xc_dom_x86.c +++ b/tools/libxc/xc_dom_x86.c @@ -534,24 +534,20 @@ static int alloc_p2m_list_x86_64(struct xc_dom_image *dom) /* ------------------------------------------------------------------------ */ -static int alloc_magic_pages(struct xc_dom_image *dom) +static int alloc_magic_pages_pv(struct xc_dom_image *dom) { - /* allocate special pages */ dom->start_info_pfn = xc_dom_alloc_page(dom, "start info"); if ( dom->start_info_pfn == INVALID_PFN ) return -1; + dom->xenstore_pfn = xc_dom_alloc_page(dom, "xenstore"); if ( dom->xenstore_pfn == INVALID_PFN ) return -1; + dom->console_pfn = xc_dom_alloc_page(dom, "console"); if ( dom->console_pfn == INVALID_PFN ) return -1; - if ( xc_dom_translated(dom) ) - { - dom->shared_info_pfn = xc_dom_alloc_page(dom, "shared info"); - if ( dom->shared_info_pfn == INVALID_PFN ) - return -1; - } + dom->alloc_bootstack = 1; return 0; @@ -1756,7 +1752,7 @@ static struct xc_dom_arch xc_dom_32_pae = { .sizeof_pfn = 4, .p2m_base_supported = 0, .arch_private_size = sizeof(struct xc_dom_image_x86), - .alloc_magic_pages = alloc_magic_pages, + .alloc_magic_pages = alloc_magic_pages_pv, .alloc_pgtables = alloc_pgtables_x86_32_pae, .alloc_p2m_list = alloc_p2m_list_x86_32, .setup_pgtables = setup_pgtables_x86_32_pae, @@ -1775,7 +1771,7 @@ static struct xc_dom_arch xc_dom_64 = { .sizeof_pfn = 8, .p2m_base_supported = 1, .arch_private_size = sizeof(struct xc_dom_image_x86), - .alloc_magic_pages = alloc_magic_pages, + .alloc_magic_pages = alloc_magic_pages_pv, .alloc_pgtables = alloc_pgtables_x86_64, .alloc_p2m_list = alloc_p2m_list_x86_64, .setup_pgtables = setup_pgtables_x86_64,