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

Avi Kivity
2008-12-29T08:28:44Z

Liu, Kechao wrote:
> Hi Avi,
>
> Thanks for your comments. I've updated the patch according to them.
> Please review it. Thank you.
>
> Load assigned devices' PCI option ROMs to the RAM of
> guest OS. And pass the corresponding devfns to BIOS.
>
>

Looks good.

> +
> + /* Write ROM data and devfn to phys_addr */
> + cpu_physical_memory_write_rom(0xd0000 + offset, rom, size);
> + cpu_physical_memory_write_rom(0xd0000 + offset + size, &devfn, 1);
> +

How is the last bit performed on real hardware? Obviously the ROM can't
have devfn embedded.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.