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

Shan, Haitao
2008-12-31T02:06:47Z

Hi, Avi,

Option ROM already has its own BAR at 0x30h. I think the devices assignment code now already handles this register.

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.

I don't understand why this makes differences compared to scanning and copying Option ROMs in QEMU, 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.

Thanks!

Best Regards
Haitao Shan

Avi Kivity wrote:
> Shan, Haitao wrote:
>>> Well, it may make sense to provide the ROMs as virtual PCI BARs, and
>>> have the bios do the work. This way, if some driver relies on
>>> remapping the BAR (graphic cards?), it can still work.
>>>
>>
>> I do not quite understand this. Can you elaborate?
>>
>
> Which part?
>
> I propose not to copy the card option rom to the bios. Instead,
> present the bios as a virtual PCI BAR. The loop that scans the ROMs
> can then be moved to the bios.
>
> The advantage is that if a driver needs something in the ROM (mode
> tables for graphics), they will be available.
>
> I don't know if any card actually requires this. Maybe all the
> information is in the driver.