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

Avi Kivity
2008-12-29T09:49:29Z

Liu, Kechao wrote:
>> How is the last bit performed on real hardware? Obviously the ROM can't
>> have devfn embedded.
>>
>
> On a real hardware, BIOS scans PCI devices, loads ROMs and it can get devices' devfns. Here, in an easier way, we load option ROMs in QEMU and thus need to
> store and pass the devfns.
>

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.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.