[Qemu-devel] [PATCHv3 0/2] pci: allow PCI bus slots to be marked as reserved

Mark Cave-Ayland posted 2 patches 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1500236854-28271-1-git-send-email-mark.cave-ayland@ilande.co.uk
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
hw/pci/pci.c             |   26 ++++++++++++++++++++++----
include/hw/pci/pci_bus.h |    1 +
2 files changed, 23 insertions(+), 4 deletions(-)
[Qemu-devel] [PATCHv3 0/2] pci: allow PCI bus slots to be marked as reserved
Posted by Mark Cave-Ayland 6 years, 9 months ago
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


Re: [Qemu-devel] [PATCHv3 0/2] pci: allow PCI bus slots to be marked as reserved
Posted by Mark Cave-Ayland 6 years, 7 months ago
On 16/07/17 21:27, Mark Cave-Ayland wrote:

> 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(-)

Ping? Is there any chance to get this in soon, as I ended up having to
drop a couple of sun4u patch series for 2.10 that were dependent upon
this :(

I have R-B tags from Marcel, however my understanding is that this patch
still needs review from Michael?

Here is the link to the patch that depends upon this:
https://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg03041.html


Many thanks,

Mark.

Re: [Qemu-devel] [PATCHv3 0/2] pci: allow PCI bus slots to be marked as reserved
Posted by Marcel Apfelbaum 6 years, 7 months ago
On 31/08/2017 9:54, Mark Cave-Ayland wrote:
> On 16/07/17 21:27, Mark Cave-Ayland wrote:
> 
>> 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(-)
> 
> Ping? Is there any chance to get this in soon, as I ended up having to
> drop a couple of sun4u patch series for 2.10 that were dependent upon
> this :(
> 
> I have R-B tags from Marcel, however my understanding is that this patch
> still needs review from Michael?
> 

Hi Mark,
I think Michael did not start yet to pick patches for 2.11 .

Thanks,
Marcel

> Here is the link to the patch that depends upon this:
> https://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg03041.html
> 
> 
> Many thanks,
> 
> Mark.
>