pci-assign: Fix multifunction support
commit289a1056a2b902e25f8d6ec5e17984aa48d201c1
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 16 Jan 2012 17:11:51 +0000 (16 10:11 -0700)
committerMarcelo Tosatti <mtosatti@redhat.com>
Wed, 18 Jan 2012 10:17:14 +0000 (18 08:17 -0200)
tree4a85b7d1adbcf47a4c535b6a9d54d8f43fb9e113
parent72bfa6f565fab3e060af147bf8cc8644405ab375
pci-assign: Fix multifunction support

The core PCI code sets the multifunction bit in the header before
calling the device initfn.  For device assignment, we're blasting
that value with the actual hardware value, so nobody sees the
additional functions if the devices isn't physically multifunction.
Switch the HEADER_TYPE to a fully emulated field (all read-only
anyway) and add setting and clearing of the multifunction bit to
match qemu directive.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
hw/device-assignment.c