qemu-traditional/passthrough: fix off-by-one in PCI config space register index check
PATCH 1/1 qemu-traditional/passthrough: fix off-by-one in PCI config space register index check
Register 255 (0xff) is still valid to be accessed.
Reported-by Rolu <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
hw/pass-through.c +2 -2
@@ -1538,7 +1538,7 @@ static void pt_pci_write_config(PCIDevic#endif /* check offset range */ -if (address >=0xFF ) +if (address >0xFF ) {PT_LOG_DEV (d,"Error: Failed to write register with offset exceeding FFh. " "[Offset:%02xh][Length:%d]\n" , address, len);
@@ -1714,7 +1714,7 @@ static uint32_t pt_pci_read_config(PCIDeint ret =0 ;/* check offset range */ -if (address >=0xFF ) +if (address >0xFF ) {PT_LOG_DEV (d,"Error: Failed to read register with offset exceeding FFh. " "[Offset:%02xh][Length:%d]\n" , address, len);
qemu-traditional/passthrough: fix off-by-one in PCI config space register index check
Register 255 (0xff) is still valid to be accessed.
Reported-by Rolu <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
hw/pass-through.c +2 -2
@@ -1538,7 +1538,7 @@ static void pt_pci_write_config(PCIDevic#endif /* check offset range */ -if (address >=0xFF ) +if (address >0xFF ) {PT_LOG_DEV (d,"Error: Failed to write register with offset exceeding FFh. " "[Offset:%02xh][Length:%d]\n" , address, len);
@@ -1714,7 +1714,7 @@ static uint32_t pt_pci_read_config(PCIDeint ret =0 ;/* check offset range */ -if (address >=0xFF ) +if (address >0xFF ) {PT_LOG_DEV (d,"Error: Failed to read register with offset exceeding FFh. " "[Offset:%02xh][Length:%d]\n" , address, len);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Jan Beulich writes ("[Xen-devel] [PATCH] qemu-traditional/passthrough: fix off-by-one in PCI config space register index check"):
Quoted 4 lines
Register 255 (
0xff) is still valid to be accessed.Reported-by Rolu <[email protected]>Signed-off-by Jan Beulich <[email protected]>
Looks reasonable to me.
Acked-by Ian Jackson <[email protected]>
Committed-by Ian Jackson <[email protected]>