linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Keith Busch <keith.busch@intel.com>
Cc: "Veal, Bryan E." <bryan.e.veal@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org, linux-pci@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Jon Derrick <jonathan.derrick@intel.com>
Subject: Re: [PATCHv8 0/5] Driver for new "VMD" device
Date: Thu, 25 Feb 2016 08:42:19 -0600	[thread overview]
Message-ID: <20160225144219.GB8726@localhost> (raw)
In-Reply-To: <20160223182359.GA20250@localhost.localdomain>

On Tue, Feb 23, 2016 at 06:24:00PM +0000, Keith Busch wrote:
> On Mon, Feb 22, 2016 at 04:10:24PM -0600, Bjorn Helgaas wrote:
> > I'm not sure how to deal with the question of a hot-added VMD.  Maybe
> > all we can do now is add a comment to the effect that we assume BIOS
> > has assigned the non-prefetchable BAR below 4GB, and if Linux assigns
> > that BAR for hot-added VMDs, that assumption will likely break.
> 
> Yes, we can assume BIOS always assigns. There are other BIOS dependencies
> in order for the host to see the h/w as a VMD endpoint.
> 
> > diff --git a/arch/x86/pci/vmd.c b/arch/x86/pci/vmd.c
> > index d57e480..7554722 100644
> > --- a/arch/x86/pci/vmd.c
> > +++ b/arch/x86/pci/vmd.c
> > @@ -532,6 +532,16 @@ static int vmd_enable_domain(struct vmd_dev *vmd)
> >  		.flags = IORESOURCE_BUS | IORESOURCE_PCI_FIXED,
> >  	};
> >  
> > +	/*
> > +	 * If the window is below 4GB, clear IORESOURCE_MEM_64 so we can
> > +	 * put 32-bit resources in the window.
> > +	 *
> > +	 * There's no hardware reason why a 64-bit window *couldn't*
> > +	 * contain a 32-bit resource, but pbus_size_mem() computes the
> > +	 * bridge window size assuming a 64-bit window will contain no
> > +	 * 32-bit resources.  __pci_assign_resource() enforces that
> > +	 * artificial restriction to make sure everything will fit.
> > +	 */
> 
> This sounds good to me. Thanks!
> 
> >  	res = &vmd->dev->resource[VMD_MEMBAR1];
> >  	upper_bits = upper_32_bits(res->end);
> >  	flags = res->flags & ~IORESOURCE_SIZEALIGN;

Can you prepare a patch, that adds both comments, please?  (The one
about how we assume BIOS assigns the BAR below 4GB, and the one I
drafted above.)

Bjorn

  reply	other threads:[~2016-02-25 14:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 20:18 [PATCHv8 0/5] Driver for new "VMD" device Keith Busch
2016-01-12 20:18 ` [PATCHv8 1/5] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains Keith Busch
2016-01-12 20:18 ` [PATCHv8 2/5] x86/IRQ: Export IRQ domain function for module use Keith Busch
2016-01-12 20:18 ` [PATCHv8 3/5] x86/PCI: Allow PCI domain specific dma ops Keith Busch
2016-01-12 20:18 ` [PATCHv8 4/5] PCI/AER: Use 32 bit int type domains Keith Busch
2016-01-12 20:18 ` [PATCHv8 5/5] x86/PCI: Initial commit for new VMD device driver Keith Busch
2016-01-15 18:19 ` [PATCHv8 0/5] Driver for new "VMD" device Bjorn Helgaas
2016-01-15 19:31   ` Veal, Bryan E.
2016-01-15 21:49     ` Bjorn Helgaas
2016-01-16 22:19       ` Veal, Bryan E.
2016-01-20 22:01         ` Bjorn Helgaas
2016-02-22 22:10           ` Bjorn Helgaas
2016-02-23 18:24             ` Keith Busch
2016-02-25 14:42               ` Bjorn Helgaas [this message]
2016-02-25 14:50                 ` Keith Busch
2016-02-26 15:29                 ` Keith Busch
2016-01-15 19:32   ` Keith Busch
2016-01-15 19:44   ` Thomas Gleixner
2016-01-15 20:03     ` Bjorn Helgaas
2016-01-15 20:14       ` Thomas Gleixner
2016-01-15 19:48   ` Derrick, Jonathan
2016-01-15 19:54     ` Keith Busch
2016-01-15 20:02       ` Jon Derrick
2016-01-15 22:06     ` Bjorn Helgaas
2016-01-19 15:38       ` Keith Busch
2016-01-19 16:02         ` Christoph Hellwig
2016-01-19 16:36           ` Keith Busch
2016-01-19 22:05             ` Veal, Bryan E.
2016-01-20 20:43           ` Bjorn Helgaas
2016-01-26 16:46             ` Christoph Hellwig
2016-01-26 18:23               ` Veal, Bryan E.
2016-01-17 17:58 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160225144219.GB8726@localhost \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=bryan.e.veal@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=jonathan.derrick@intel.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).