On 12/23/2009 11:12 AM, Michael S. Tsirkin wrote:
ROM BAR can be handled same as regular BAR: load_option_roms utility will take care of copying it to RAM as appropriate. Signed-off-by: Michael S. Tsirkin<mst@xxxxxxxxxx> --- Changes from v1: made ROM BAR read-only. hw/device-assignment.c | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 000fa61..0c3c8f4 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -233,7 +233,8 @@ static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num, int m; DEBUG("slow map\n"); - m = cpu_register_io_memory(slow_bar_read, slow_bar_write, region); + m = cpu_register_io_memory(slow_bar_read, region_num == PCI_ROM_SLOT ? + NULL : slow_bar_write, region); cpu_register_physical_memory(e_phys, e_size, m);
This is really better broken out. And splitting an argument over multiple lines is confusing, when it shares a line with another argument.
-- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html