Skip to content

pci: multi-function bit fixes

Isaku Yamahata qemu-devel 4 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 5 repliesApplied
  2. v46 patches 12 repliesSuperseded
  3. v33 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches14 repliesSuperseded

Changes v3 -> v4 from the cover letter

- introduced multifunction property and add validation check to catch user operation errors.
- some more clean up.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/9pci: use PCI_DEVFN() where appropriate.hw/gt64xxx.c hw/ppce500_pci.c hw/unin_pci.c +1 more+10 -91 reply
2/9pci: insert assert that auto-assigned-address function is single function device.hw/pci.c hw/pci.h+3 -12 replies
3/9pci: don't overwrite multi functio bit in pci header type.hw/ac97.c hw/acpi_piix4.c hw/apb_pci.c +17 more+0 -240 replies
4/9pci: remove PCIDeviceInfo::header_typehw/apb_pci.c hw/dec_pci.c hw/pci.c +1 more+16 -110 replies
5/9qdev: implement qdev_prop_set_bit().hw/qdev-properties.c hw/qdev.h+6 -00 replies
6/9pci: introduce multifunction property.hw/pci.c hw/pci.h+28 -30 replies
7/9pci: set multifunction property for normal device.hw/piix4.c hw/piix_pci.c+2 -20 replies
8/9pci_bridge: make pci bridge aware of pci multi function bit.hw/apb_pci.c hw/dec_pci.c hw/pci.c +1 more+8 -60 replies
9/9pci: set PCI multi-function bit appropriately.hw/apb_pci.c hw/pci.c hw/piix4.c +1 more+52 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [Qemu-devel] [PATCH v5 0/9] pci: multi-function bit fixes

Maing changes v4 -> v5:
- split up/reorder patches for bisectability and testability
- stype fixes.

patch description:

When pci devices are populated as multi-function,
OS can fail to probe function > 0. It's because multi function bit of header type register in configuration space isn't set, so OS probes only function 0 skipping function > 0 as optimization.

This patch set make qemu set multi function bit when function > 0 is populated.

Changes v3 -> v4:
- introduced multifunction property and add validation check to catch user operation errors.
- some more clean up.

Isaku Yamahata (9):
pci: use PCI_DEVFN() where appropriate.
pci: insert assert that auto-assigned-address function is single
function device.
pci: don't overwrite multi functio bit in pci header type.
pci: remove PCIDeviceInfo::header_type
qdev: implement qdev_prop_set_bit().
pci: introduce multifunction property.
pci: set multifunction property for normal device.
pci_bridge: make pci bridge aware of pci multi function bit.
pci: set PCI multi-function bit appropriately.

 hw/ac97.c            |    1 -
 hw/acpi_piix4.c      |    1 -
 hw/apb_pci.c         |   11 ++----
 hw/dec_pci.c         |    4 +-
 hw/grackle_pci.c     |    1 -
 hw/gt64xxx.c         |    2 +-
 hw/ide/cmd646.c      |    1 -
 hw/ide/piix.c        |    1 -
 hw/macio.c           |    1 -
 hw/ne2000.c          |    1 -
 hw/openpic.c         |    1 -
 hw/pci.c             |   97 +++++++++++++++++++++++++++++++++++++++++++-------
 hw/pci.h             |   21 +++++++++--
 hw/pcnet.c           |    1 -
 hw/piix4.c           |    4 +--
 hw/piix_pci.c        |    5 +--
 hw/ppce500_pci.c     |    3 +-
 hw/prep_pci.c        |    1 -
 hw/qdev-properties.c |    5 +++
 hw/qdev.h            |    1 +
 hw/rtl8139.c         |    1 -
 hw/sun4u.c           |    1 -
 hw/unin_pci.c        |   16 +++-----
 hw/usb-uhci.c        |    1 -
 hw/versatile_pci.c   |    2 +-
 hw/vga-pci.c         |    1 -
 hw/virtio-pci.c      |    1 -
 hw/vmware_vga.c      |    1 -
 hw/wdt_i6300esb.c    |    1 -
 29 files changed, 125 insertions(+), 63 deletions(-)