From patchwork Thu Feb 23 16:31:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9588571 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 9CEB660210 for ; Thu, 23 Feb 2017 16:37:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D1E42893D for ; Thu, 23 Feb 2017 16:37:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81ABD2893F; Thu, 23 Feb 2017 16:37:51 +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 F36D02893D for ; Thu, 23 Feb 2017 16:37:50 +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 1cgwMS-0003Mr-3G; Thu, 23 Feb 2017 16:35:20 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgwMQ-0003Mg-KT for xen-devel@lists.xenproject.org; Thu, 23 Feb 2017 16:35:18 +0000 Received: from [193.109.254.147] by server-10.bemta-6.messagelabs.com id 07/09-13192-54F0FA85; Thu, 23 Feb 2017 16:35:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMIsWRWlGSWpSXmKPExsWyU9JRQteVf32 EwcYNUhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bufXeZC1p4Kg5/ns/YwPics4uRk0NCwE9i 4pVHbCA2i4CqxOeF7UwgNpuAjsTFuTvB4iICuhLPFjwDs5kF6iT2v2xnB7GFBXwk/k7/wQxi8 wp4ShzsPArUy8UhJHCISeLj3yXsEAlBiZMzn7BANOtILNj9CWgQB5AtLbH8HwdImFPATmLpyQ tg80UFVCR6D/wBKxcSUJTon/eADeLOdImtf38xT2Dkn4Vk6iwkU2chTF3AyLyKUb04tagstUj XXC+pKDM9oyQ3MTNH19DATC83tbg4MT01JzGpWC85P3cTIzAAGYBgB+PMy/6HGCU5mJREeZ9d XBchxJeUn1KZkVicEV9UmpNafIhRg4NDYPPa1RcYpVjy8vNSlSR4j/KujxASLEpNT61Iy8wBx ghMqQQHj5IIrzQfUJq3uCAxtzgzHSJ1ilFRSpy3HaRPACSRUZoH1waLy0uMslLCvIxARwnxFK QW5WaWoMq/YhTnYFQS5r0DMoUnM68EbvoroMVMQIstndeCLC5JREhJNTBucgkoNu/e/u7O4kh /q7Mvdc4Zey2bUvBcUWDB7gv/lweUdwS+mJqa+DKw36F8q9tqxz85m3ULLJYeddx8uVNsq/9V 0yVzxFYtXrjEf9/OfV8uM7RznnyuG85/uNn554uLma9mhM3uYRO2d5zQWuIqzBV9edUqxn9V5 5/zzAwuioq018y/8vGyEktxRqKhFnNRcSIAIpOxucYCAAA= X-Env-Sender: prvs=220abfa14=roger.pau@citrix.com X-Msg-Ref: server-14.tower-27.messagelabs.com!1487867717!76141741!1 X-Originating-IP: [185.25.65.24] X-SpamReason: No, hits=0.0 required=7.0 tests=received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 38478 invoked from network); 23 Feb 2017 16:35:17 -0000 Received: from smtp.eu.citrix.com (HELO SMTP.EU.CITRIX.COM) (185.25.65.24) by server-14.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 23 Feb 2017 16:35:17 -0000 X-IronPort-AV: E=Sophos;i="5.35,198,1484006400"; d="scan'208";a="41324025" Date: Thu, 23 Feb 2017 16:31:31 +0000 From: Roger Pau Monne To: Andrew Cooper Message-ID: <20170223163131.vjxfco3ip3pmap2v@dhcp-3-221.uk.xensource.com> References: <20170222142459.28199-1-roger.pau@citrix.com> <20170222142459.28199-3-roger.pau@citrix.com> <58AEF439020000780013D414@prv-mh.provo.novell.com> <20170223152757.etm7mcliirqjajeh@dhcp-3-221.uk.xensource.com> <58AF1739020000780013D539@prv-mh.provo.novell.com> <1906f2b9-eb20-70fc-2b9a-cefb26be6ced@citrix.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1906f2b9-eb20-70fc-2b9a-cefb26be6ced@citrix.com> User-Agent: NeoMutt/20170206 (1.7.2) X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) Cc: xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, Jan Beulich Subject: Re: [Xen-devel] [PATCH v7 2/7] xen/x86: populate PVHv2 Dom0 physical memory map 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 On Thu, Feb 23, 2017 at 04:16:15PM +0000, Andrew Cooper wrote: > On 23/02/17 16:09, Jan Beulich wrote: > >>>> On 23.02.17 at 16:27, wrote: > >> I also don't see much benefit from deviating from what HVM does, so I would > >> just leave it as is. > > Understood. The risk is that in a couple of years time understanding > > why it is the way it is and (whether that's necessary) may take as > > much effort as did the deciphering of the (buggy) hvmloader > > setup code for this. > > In which case, just leave a short comment saying something like "Copy > HVMLoader for consistency, not that we expect a PVH domain from using > this for anything other than their AP trampoline". What about adding the chunk below. If you agree I can prepare a git branch with this and the libelf changes merged in (and the RBs), so you can pull from it. Thanks, Roger. ---8<--- diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index adc4c00..4d7f4ae 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -51,6 +51,11 @@ static long __initdata dom0_max_nrpages = LONG_MAX; * - 128 bytes I/O bitmap * - one trailing byte * or a total of 265 bytes. + * + * NB: as PVHv2 Dom0 doesn't have legacy devices (ISA), it shouldn't have any + * business in accessing the ISA port range, much less in real mode, and due to + * the lack of firmware it shouldn't also execute any INT instruction. This is + * done for consistency with what hvmloader does. */ #define HVM_VM86_TSS_SIZE 265