linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Stewart Hildebrand'" <stewart.hildebrand@amd.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Borislav Petkov" <bp@alien8.de>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Yongji Xie" <elohimes@gmail.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: RE: [PATCH v2 0/8] PCI: Align small (<4k) BARs
Date: Wed, 17 Jul 2024 13:15:29 +0000	[thread overview]
Message-ID: <0da056616de54589bc1d4b95dcdf5d3d@AcuMS.aculab.com> (raw)
In-Reply-To: <20240716193246.1909697-1-stewart.hildebrand@amd.com>

From: Stewart Hildebrand
> Sent: 16 July 2024 20:33
> 
> This series sets the default minimum resource alignment to 4k for memory
> BARs. In preparation, it makes an optimization and addresses some corner
> cases observed when reallocating BARs. I consider the prepapatory
> patches to be prerequisites to changing the default BAR alignment.

Should the BARs be page aligned on systems with large pages?
At least as an option for hypervisor pass-through and any than can be mmap()ed
into userspace.

Does any hardware actually have 'silly numbers' of small memory BARs?

I have a vague memory of some ethernet controllers having lots of (?)
virtual devices that might have separate registers than can be mapped
out to a hypervisor.
Expanding those to a large page might be problematic - but needed for security.

For more normal hardware just ensuring that two separate targets don't share
a page while allowing (eg) two 1k BAR to reside in the same 64k page would
give some security.

Aligning a small MSIX BAR is unlikely to have any effect on the address
space utilisation (for PCIe) since the bridge will assign a power of two
sized block - with a big pad (useful for generating pcie errors!)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2024-07-17 13:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 19:32 [PATCH v2 0/8] PCI: Align small (<4k) BARs Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 1/8] x86/PCI: Move some logic to new function Stewart Hildebrand
2024-07-17 19:28   ` Philipp Stanner
2024-07-18 14:54     ` Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 2/8] PCI: Don't unnecessarily disable memory decoding Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 3/8] PCI: Restore resource alignment Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 4/8] PCI: Restore memory decoding after reallocation Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 5/8] x86/PCI: Preserve IORESOURCE_STARTALIGN alignment Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 6/8] powerpc/pci: " Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 7/8] PCI: Don't reassign resources that are already aligned Stewart Hildebrand
2024-07-16 19:32 ` [PATCH v2 8/8] PCI: Align small (<4k) BARs Stewart Hildebrand
2024-07-17 13:15 ` David Laight [this message]
2024-07-17 13:21   ` [PATCH v2 0/8] " David Laight
2024-07-17 18:30   ` Stewart Hildebrand
2024-07-18 10:01     ` David Laight
2024-07-18 13:48       ` Stewart Hildebrand

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=0da056616de54589bc1d4b95dcdf5d3d@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dave.hansen@linux.intel.com \
    --cc=elohimes@gmail.com \
    --cc=hpa@zytor.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=sam@ravnborg.org \
    --cc=stewart.hildebrand@amd.com \
    --cc=tglx@linutronix.de \
    --cc=tzimmermann@suse.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).