Skip to content

RFC ioemu: use devfn instead of slots as the unit for passthrough

Simon Horman xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest18 patches 43 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18Make register_real_device() and unregister_real_device() statichw/pass-through.c+2 -20 replies
2/18Make dpci_infos statichw/pass-through.c+1 -10 replies
3/18ioemu: vslots needs to be freed on error in power_off_php_slot()hw/pass-through.c+5 -50 replies
4/18ioemu: Remove lsi_scsi_init()s devfn parameter as it is always passed as -1hw/lsi53c895a.c hw/pc.c hw/pci.h +2 more+6 -60 replies
5/18ioemu: Remove lsi_scsi_init()s devfn parameter as it is always passed as -1hw/pc.c hw/pc.h hw/piix_pci.c+4 -40 replies
6/18ioemu: Remove usb_ohci_init*()s devfn parameter as they are always passed as -1hw/pci.h hw/ppc_chrp.c hw/ppc_oldworld.c +6 more+15 -180 replies
7/18iommu: Define PCI_DEVFN_AUTO and use ithw/ac97.c hw/cirrus_vga.c hw/eepro100.c +24 more+32 -300 replies
8/18iommu: Use PCI_DEVFN to create devfn numbershw/apb_pci.c hw/mips_malta.c hw/pass-through.c +1 more+12 -110 replies
9/18ioemu: piix4acpi.c: make various variables statichw/piix4acpi.c+3 -30 replies
10/18ioemu: piix4acpi.c: Simplfy PHPSlots structurehw/piix4acpi.c+7 -90 replies
11/18ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlotshw/piix4acpi.c+6 -60 replies
12/18ioemu: piix4acpi.c: remove unnecessary assignment of pci_slots to local variableshw/piix4acpi.c+11 -110 replies
13/18ioemu: piix4acpi.c: remove ACPI_PHP_SLOT_NUMhw/piix4acpi.c+5 -70 replies
14/18ioemu: use devfn instead of slots as the unit for passthroughhw/pass-through.c hw/pc.h hw/pci.c +3 more+164 -1470 replies
15/18ioemu: use struct php_dev to pass around PCI pass-through assignment parametershw/pass-through.c+99 -740 replies
16/18ioemu: non-destructive parsing of PCI assignement stringshw/pass-through.c hw/pci.h vl.c+221 -1210 replies
17/18ioemu: sort pass-through PCI devices before insertinghw/pass-through.c+6 -00 replies
18/18ioemu: Allow virtual function to be speficied for PCI pass-throughhw/pass-through.c xenstore.c+29 -50 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [rfc 00/18] ioemu: use devfn instead of slots as the unit for passthrough

This series starts of with servaral cleanup patches.

The meat of the changes start with the patch
"ioemu: use devfn instead of slots as the unit for passthrough"

This allows multi-function cards to be appear in guets as multi-function cards, with the restriction that function 0 must be passed through. Otherwise each function is allocated its own slot, as before.

e.g.

1. Function 0 and two other functions of a multi-function card are passed through, and the function numbers are maintained in the guest.

Physical                     Guest
0:1b.0    - pass through ->  0:6.0
0:1b.1    - pass through ->  0:6.1
0:1b.2    - pass through ->  0:6.2

2. Two functions other than zero of a multi-function card are passed through. Each function is represent as function 0 of a slot in the guest.

Physical                     Guest
0:1b.1    - pass through ->  0:6.0
0:1b.2    - pass through ->  0:7.0

Patches are also supplied to allow the virtual slot and device to be supplied in the domain's configuration file. Amongst other things this allows the existing assignment behaviour to be specified.

Currently hotplug is not working with this scheme. I am unsure of why, but am working towards a fix.

These patches are against qemu-xen-unstable.git 3f23188224b7ce69fcf13f52cb1c7977a5372900 as subsequent revisions do not seem to work for me.

http://lists.xensource.com/archives/html/xen-devel/2009-02/msg00580.html

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en