Re: [Qemu-devel] [PATCH] kernel vfio: PCI ROM size calculation

2012-05-13 Thread Alex Williamson
On Sat, 2012-05-12 at 16:50 +1000, Alexey Kardashevskiy wrote: The original code calculated the real size of the ROM and passed it to QEMU which tried to do pci_register_bar and failed with error message ERROR: PCI region size must be pow2. The example card is PCIe Intel E1000E with the ROM

Re: [Qemu-devel] [PATCH] kernel vfio: PCI ROM size calculation

2012-05-13 Thread Alexey Kardashevskiy
On 14/05/12 12:55, Alex Williamson wrote: On Sat, 2012-05-12 at 16:50 +1000, Alexey Kardashevskiy wrote: The original code calculated the real size of the ROM and passed it to QEMU which tried to do pci_register_bar and failed with error message ERROR: PCI region size must be pow2. The

Re: [Qemu-devel] [PATCH] kernel vfio: PCI ROM size calculation

2012-05-13 Thread Alex Williamson
On Mon, 2012-05-14 at 13:24 +1000, Alexey Kardashevskiy wrote: On 14/05/12 12:55, Alex Williamson wrote: On Sat, 2012-05-12 at 16:50 +1000, Alexey Kardashevskiy wrote: The original code calculated the real size of the ROM and passed it to QEMU which tried to do pci_register_bar and failed

[PATCH] kernel vfio: PCI ROM size calculation

2012-05-12 Thread Alexey Kardashevskiy
The original code calculated the real size of the ROM and passed it to QEMU which tried to do pci_register_bar and failed with error message ERROR: PCI region size must be pow2. The example card is PCIe Intel E1000E with the ROM size 0x9c00. pci_resource_len seems to be a proper solution.