All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv3 0/2] pci: allow PCI bus slots to be marked as reserved
@ 2017-07-16 20:27 Mark Cave-Ayland
  2017-07-16 20:27 ` [Qemu-devel] [PATCHv3 1/2] pci: move check for existing devfn into new pci_bus_devfn_available() helper Mark Cave-Ayland
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Mark Cave-Ayland @ 2017-07-16 20:27 UTC (permalink / raw)
  To: qemu-devel, mst, armbru, marcel

For some machines it is impossible to plug devices into a particular PCI bus
slot, e.g. for a real Ultra 5 there are 2 PCI bridges attached to the root
bus behind which all devices must be plugged. Ignoring this rule will cause
problems with interrupt routing since the interrupt numbers are calculated
based upon PCI bridge id and secondary PCI bus slot id.

This patchset adds a new slot_reserved_mask property to PCIBus which is a
bitmask used to indicate whether PCI bus slots are reserved, i.e. they cannot
be used for hot or cold plugging on a particular PCI bus.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

v3:
- Rebase onto master
- Simplify pci_bus_devfn_available() as suggested by Marcel
- Also simplify pci_bus_devfn_reserved() in a similar manner

v2:
- Rename dev_reserved_mask to slot_reserved_mask as suggested by Marcel
- Squash patches 2 and 3 together


Mark Cave-Ayland (2):
  pci: move check for existing devfn into new pci_bus_devfn_available()
    helper
  pci: add reserved slot check to do_pci_register_device()

 hw/pci/pci.c             |   26 ++++++++++++++++++++++----
 include/hw/pci/pci_bus.h |    1 +
 2 files changed, 23 insertions(+), 4 deletions(-)

-- 
1.7.10.4

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

end of thread, other threads:[~2017-09-06 19:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-16 20:27 [Qemu-devel] [PATCHv3 0/2] pci: allow PCI bus slots to be marked as reserved Mark Cave-Ayland
2017-07-16 20:27 ` [Qemu-devel] [PATCHv3 1/2] pci: move check for existing devfn into new pci_bus_devfn_available() helper Mark Cave-Ayland
2017-07-17  8:21   ` Marcel Apfelbaum
2017-09-04 10:01   ` Yi Min Zhao
2017-09-06 19:02     ` Mark Cave-Ayland
2017-07-16 20:27 ` [Qemu-devel] [PATCHv3 2/2] pci: add reserved slot check to do_pci_register_device() Mark Cave-Ayland
2017-07-17  8:23   ` Marcel Apfelbaum
2017-08-31  6:54 ` [Qemu-devel] [PATCHv3 0/2] pci: allow PCI bus slots to be marked as reserved Mark Cave-Ayland
2017-09-04  9:50   ` Marcel Apfelbaum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.