Re: [PATCH][v2] kvm-userspace: Load PCI option ROMs

Avi Kivity
2008-12-31T09:28:39Z

Shan, Haitao wrote:
> Hi, Avi,
>
> Option ROM already has its own BAR at 0x30h. I think the devices assignment code now already handles this register.
>

Okay good.

> Can I summary your proposals like the following: In guest BIOS, scan all the pci devices (virtual) for existance of Option ROMs. Copy them to available BIOS space in 0xC0000 - 0xDFFFF. Execute the ROM code at copied location.
>

Yes.

> I don't understand why this makes differences compared to scanning and copying Option ROMs in QEMU,

If the ROM BAR is already handled (including registering the memory when
the BAR is programmed -- I don't see that in the code), then there is no
big advantage. It's closer to how real hardware works, but that's about it.

> especially given that the VGA BIOS and etherboot ROM are also copied to BIOS space in QEMU before they execute in rom_scan loop in guest BIOS.
>

The VGA BIOS is typically present on the motherboard itself, at least on
some configurations. You're right about etherboot.

I'll apply the patch. Can you take a look at the ROM BAR?

--
error compiling committee.c: too many arguments to function