device assignment: Add PCI option ROM support
commit5ad4826b6fc62823b333407ac5ebbfd37b0e7d49
authorAlex Williamson <alex.williamson@hp.com>
Mon, 15 Jun 2009 16:29:17 +0000 (15 10:29 -0600)
committerAvi Kivity <avi@redhat.com>
Wed, 24 Jun 2009 16:07:04 +0000 (24 19:07 +0300)
tree3036030fb8a238039dfb10fdd9096c699fb6ba3c
parent82ca90548fcd4b7f7f5e541a751f8f82f09b7890
device assignment: Add PCI option ROM support

The PCI code already knows about option ROMs, so we just need to
mmap some space for it, load it with a copy of the contents, and
complete the plubming to the generic code.

With this a Linux guest can get access to the ROM contents via
/sys/bus/pci/devices/<dev>/rom.  This might also enable the BIOS
to execute ROMs by loading them dynamically from the device
rather than hoping they all fit into RAM.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/device-assignment.c
hw/device-assignment.h