summaryrefslogtreecommitdiff
path: root/hw/xen/xen_pt.c
diff options
context:
space:
mode:
authorAnoob Soman <anoob.soman@citrix.com>2017-07-05 14:56:35 +0100
committerStefano Stabellini <sstabellini@kernel.org>2017-07-07 11:13:10 -0700
commit4daf62594d13dfca2ce3a74dd3bddee5f54d7127 (patch)
tree50dd98f02bd609d870d0d49460749b07a7462018 /hw/xen/xen_pt.c
parent6c808651e327388c22845700e14fe103da9b37cd (diff)
downloadqemu-4daf62594d13dfca2ce3a74dd3bddee5f54d7127.tar.gz
xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
xen_pt_pci_config_access_check checks if addr >= 0xFF. 0xFF is a valid address and should not be ignored. Signed-off-by: Anoob Soman <anoob.soman@citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'hw/xen/xen_pt.c')
-rw-r--r--hw/xen/xen_pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index b6d71bb52a..375efa68f6 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -85,7 +85,7 @@ void xen_pt_log(const PCIDevice *d, const char *f, ...)
static int xen_pt_pci_config_access_check(PCIDevice *d, uint32_t addr, int len)
{
/* check offset range */
- if (addr >= 0xFF) {
+ if (addr > 0xFF) {
XEN_PT_ERR(d, "Failed to access register with offset exceeding 0xFF. "
"(addr: 0x%02x, len: %d)\n", addr, len);
return -1;