Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] PCI: Expose resource resizing through sysfs
@ 2022-08-16 19:39 Alex Williamson
  2022-08-16 19:40 ` [PATCH 1/3] PCI: Fix double-free in resource attribute error path Alex Williamson
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Alex Williamson @ 2022-08-16 19:39 UTC (permalink / raw)
  To: linux-pci, bhelgaas; +Cc: Christian König, linux-kernel

We have a couple graphics drivers making use of PCIe Resizable BARs
now, but I've been trying to figure out how we can make use of such
features for devices assigned to a VM.  This is a proposal for a
rather basic interface in sysfs such that we have the ability to
pre-enable larger BARs before we bind devices to vfio-pci and
attach them to a VM.

Along the way I found a double-free in the error path of creating
resource attributes, that can certainly be pulled separately (1/).

I'm using an RTX6000 for testing, which unexpectedly only supports
REBAR with smaller than default sizes, which led me to question
why we have such heavy requirements for shrinking resources (2/).

The final patch proposes the sysfs interface and I'll leave the
discussion there for whether this is a good approach.  Thanks,

Alex
---

Alex Williamson (3):
      PCI: Fix double-free in resource attribute error path
      PCI: Skip reassigning bridge resources if reducing BAR size
      PCI: Expose PCIe Resizable BAR support via sysfs


 Documentation/ABI/testing/sysfs-bus-pci |  27 +++++
 drivers/pci/pci-sysfs.c                 | 126 +++++++++++++++++++++++-
 drivers/pci/setup-res.c                 |   2 +-
 include/linux/pci.h                     |   1 +
 4 files changed, 154 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-18 11:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 19:39 [PATCH 0/3] PCI: Expose resource resizing through sysfs Alex Williamson
2022-08-16 19:40 ` [PATCH 1/3] PCI: Fix double-free in resource attribute error path Alex Williamson
2022-08-16 19:40 ` [RFC PATCH 2/3] PCI: Skip reassigning bridge resources if reducing BAR size Alex Williamson
2022-08-16 19:41 ` [RFC PATCH 3/3] PCI: Expose PCIe Resizable BAR support via sysfs Alex Williamson
2022-08-17 10:10 ` [PATCH 0/3] PCI: Expose resource resizing through sysfs Christian König
2022-08-17 14:02   ` Alex Williamson
2022-08-18 11:16     ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox