Using Xen 4.2 unstable rev. 25483. I get errors like this: pt_pci_read_config: [00:10:0] Error: Failed to read register with offset exceeding FFh. [Offset:ffh][Length:1] in my qemu log for a domU with some devices passed through to it. I investigated and found that at hw/pass-through.c line 1717 (http://xenbits.xen.org/gitweb/?p=qemu-xen-unstable.git;a=blob;f=hw/pass-through.c;h=8581253bc86391d6e348e02464f9ed5d2e579a0d;hb=HEAD#l1717) the code checks for an address >= 0xFF and then throws the above error. This seems wrong. The PCI configuration space is 256 bytes long (as far as I''ve seen anyway) so reading one byte at offset 0xFF should work and return the very last byte. pt_pci_write_config has the same code. Is the check wrong and should it be address > 0xFF? Or am I missing something?
On Mon, Jun 25, 2012 at 12:23 AM, Rolu <rolu@roce.org> wrote:> Using Xen 4.2 unstable rev. 25483. > > I get errors like this: > > pt_pci_read_config: [00:10:0] Error: Failed to read register with > offset exceeding FFh. [Offset:ffh][Length:1] > > in my qemu log for a domU with some devices passed through to it. > > I investigated and found that at hw/pass-through.c line 1717 > (http://xenbits.xen.org/gitweb/?p=qemu-xen-unstable.git;a=blob;f=hw/pass-through.c;h=8581253bc86391d6e348e02464f9ed5d2e579a0d;hb=HEAD#l1717) > the code checks for an address >= 0xFF and then throws the above > error. This seems wrong. The PCI configuration space is 256 bytes long > (as far as I''ve seen anyway) so reading one byte at offset 0xFF should > work and return the very last byte. > > pt_pci_write_config has the same code. > > Is the check wrong and should it be address > 0xFF?I tried this out and the error is gone, and nothing seems to have broken.
>>> On 25.06.12 at 00:23, Rolu <rolu@roce.org> wrote: > Using Xen 4.2 unstable rev. 25483. > > I get errors like this: > > pt_pci_read_config: [00:10:0] Error: Failed to read register with > offset exceeding FFh. [Offset:ffh][Length:1] > > in my qemu log for a domU with some devices passed through to it. > > I investigated and found that at hw/pass-through.c line 1717 > (http://xenbits.xen.org/gitweb/?p=qemu-xen-unstable.git;a=blob;f=hw/pass-throug > h.c;h=8581253bc86391d6e348e02464f9ed5d2e579a0d;hb=HEAD#l1717) > the code checks for an address >= 0xFF and then throws the above > error. This seems wrong. The PCI configuration space is 256 bytes long > (as far as I''ve seen anyway) so reading one byte at offset 0xFF should > work and return the very last byte. > > pt_pci_write_config has the same code. > > Is the check wrong and should it be address > 0xFF? > Or am I missing something?The check looks definitely wrong. Care to send a patch? Jan