From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved before PCI enumeration Date: Tue, 22 Sep 2015 09:39:52 -0400 Message-ID: <20150922133952.GE24845@l.oracle.com> References: <1442359786-18270-1-git-send-email-eswierk@skyportsystems.com> <5600F35C02000078000D92EF@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ed Swierk Cc: Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Sep 22, 2015 at 06:26:11AM -0700, Ed Swierk wrote: > On Tue, Sep 22, 2015 at 5:35 AM, Ed Swierk wrote: > > So if the contract is that Dom0 tells Xen about mmcfgs before the > > devices they cover, then Linux ought to call pci_mmcfg_reserved from > > (or immediately after) both pci_mmcfg_early_init() and > > pci_mmcfg_late_init(). > > Brainstorming possible approaches: > > I don't see an obvious way to hook into those functions (or their > callers) without injecting Xen-specific code. Is there a precedent to > follow? No. > > Alternatively, we could just call the equivalent of xen_mcfg_late() > from the existing xen_{add,remove}_device() notifiers. This would > generate a lot of useless pci_mmcfg_reserved hypercalls (number of > devices times number of mmcfg areas), but pci_mmcfg_arch_enable() in > Xen should happily ignore the redundant ones. The advantage of this > approach other than simplicity is that it makes the mmcfg -> device > setup ordering very explicit. While that will update the Xen's view of MMCFG it won't update the existing configuration that Xen has slurped up during bootup. As in, you will still get warnings. > > Any other ideas? I like it - as it will update it right away. However we would need some extra smarts in Xen to reconfigure its view of the PCI device now that the extended configuration space has become available. > > --Ed > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel