Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp610697ybe; Wed, 4 Sep 2019 05:12:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6dIt4es/B6HbHisghWcQ6/lXzuH/kBEQOzLAOm+yLMMfv+1ofdI3YxngQQM4T79SfggnG X-Received: by 2002:a17:90a:148:: with SMTP id z8mr4617566pje.96.1567599137788; Wed, 04 Sep 2019 05:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567599137; cv=none; d=google.com; s=arc-20160816; b=wKqaCD8KTAYKC7gQsPDPNA4HI1SgUBEQsqqns+1/kRDT5+Mpq1lK7/+3xwoJRCt3vb Z0YoEy68NqEuTXm8lW0Z9Jwg8dlmQDxZzBqVbEX+ERs06OcmaNxujZqQPizw5PHATGdP aI0c2hFkWnLKX5HS4Ry3aLPHSbOp3Sf5Wv8P2/p174L/A8F/WnZmQapKWiUmIvV+5koZ ub6tPlo0MgWe53MkZ0WG1inC7p0qta3n6rzYFjIqvSda/vdbriEOIfzBNFmpUBSoE+MX bKzgXhNADJsixzEPBSB7L0zqvHtmCJCrDyS+sd6mOBusssu3lobP8jP9+0Fl/7EKx4n7 V1Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=k95XYrrD6LzuHWkd8GWfkm77D7oGZqyDBb8suO95uJg=; b=gJgXbkfd4AC1mTCFkwITToPB68xEA7sHO+iVaoPi/FIv0rZeXejETnQGwvw5MQdCaM JgsxL6djR04TB9e6rvpNxe4KoIZBDsK80XjhXViPQa3EWcDqhnJjwsfvTZbxMPj4aCyS nsxt2A4WJYx5FNTDlVJDzGfuPD+nqO2JhNjtWjffAlZ4ndrdoTx8i+cQ+viFXVNMiuPu 6L+bFyL9lxsSQCGgq8ICtskkvf+Ea4NAHZ4PevfnYYF7Z51GwSJjRPcxZj6ry0qJhsed 6cbTXEQgcqRcxYixks4kQWU7cdON2ssekM7+vy+c2UGkOprQzwn+J2vcWsTwI7YpXiT2 HJ5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b21si495759pls.157.2019.09.04.05.12.01; Wed, 04 Sep 2019 05:12:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729877AbfIDMJc (ORCPT + 99 others); Wed, 4 Sep 2019 08:09:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:37686 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729316AbfIDMJc (ORCPT ); Wed, 4 Sep 2019 08:09:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 15384B66A; Wed, 4 Sep 2019 12:09:31 +0000 (UTC) Subject: Re: [PATCH] xen/pci: try to reserve MCFG areas earlier To: Igor Druzhinin Cc: Andrew Cooper , xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, Juergen Gross , linux-kernel@vger.kernel.org References: <1567556431-9809-1-git-send-email-igor.druzhinin@citrix.com> <52fe7f67-ffd0-2d22-90fb-f3462ea059cd@suse.com> From: Jan Beulich Message-ID: Date: Wed, 4 Sep 2019 14:09:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.09.2019 13:36, Igor Druzhinin wrote: > On 04/09/2019 10:08, Jan Beulich wrote: >> On 04.09.2019 02:20, Igor Druzhinin wrote: >>> If MCFG area is not reserved in E820, Xen by default will defer its usage >>> until Dom0 registers it explicitly after ACPI parser recognizes it as >>> a reserved resource in DSDT. Having it reserved in E820 is not >>> mandatory according to "PCI Firmware Specification, rev 3.2" (par. 4.1.2) >>> and firmware is free to keep a hole E820 in that place. Xen doesn't know >>> what exactly is inside this hole since it lacks full ACPI view of the >>> platform therefore it's potentially harmful to access MCFG region >>> without additional checks as some machines are known to provide >>> inconsistent information on the size of the region. >> >> Irrespective of this being a good change, I've had another thought >> while reading this paragraph, for a hypervisor side control: Linux >> has a "memopt=" command line option allowing fine grained control >> over the E820 map. We could have something similar to allow >> inserting an E820_RESERVED region into a hole (it would be the >> responsibility of the admin to guarantee no other conflicts, i.e. >> it should generally be used only if e.g. the MCFG is indeed known >> to live at the specified place, and being properly represented in >> the ACPI tables). Thoughts? > > What other use cases can you think of in case we'd have this option? > From the top of my head, it might be providing a memmap for a second Xen > after doing kexec from Xen to Xen. > > What benefits do you think it might have over just accepting a hole > using "mcfg=relaxed" option from admin perspective? It wouldn't be MCFG-specific, i.e. it could also be used to e.g. convert holes to E820_RESERVED to silence VT-d's respective RMRR warning. Plus by inserting the entry into our own E820 we'd also propagate it to users of XENMEM_machine_memory_map. Jan