aboutsummaryrefslogtreecommitdiff
path: root/hw/msix.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-12-15 20:26:04 +0900
committerMichael S. Tsirkin <mst@redhat.com>2009-12-23 16:35:00 +0200
commit98a3cb024b0e4d5a4b1458946a82ea9b9619ba1c (patch)
tree5bc90b9b170c5029ca3f052f9d33762deac5a83a /hw/msix.c
parenta40e3411d199c43ea1eb837da642829d6a2d0148 (diff)
downloadqemu-98a3cb024b0e4d5a4b1458946a82ea9b9619ba1c.zip
qemu-98a3cb024b0e4d5a4b1458946a82ea9b9619ba1c.tar.gz
qemu-98a3cb024b0e4d5a4b1458946a82ea9b9619ba1c.tar.bz2
msix: use range helper function.
use range helper function in msix_write_config(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/msix.c')
-rw-r--r--hw/msix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/msix.c b/hw/msix.c
index 0baedef..2ca0900 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -175,7 +175,7 @@ void msix_write_config(PCIDevice *dev, uint32_t addr,
unsigned enable_pos = dev->msix_cap + MSIX_CONTROL_OFFSET;
int vector;
- if (addr + len <= enable_pos || addr > enable_pos) {
+ if (!range_covers_byte(addr, len, enable_pos)) {
return;
}