aboutsummaryrefslogtreecommitdiff
path: root/include/hw/virtio/virtio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/virtio/virtio.h')
-rw-r--r--include/hw/virtio/virtio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 15efcf2057..7b6edbafd7 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -34,7 +34,7 @@ struct VirtQueue;
static inline hwaddr vring_align(hwaddr addr,
unsigned long align)
{
- return (addr + align - 1) & ~(align - 1);
+ return QEMU_ALIGN_UP(addr, align);
}
typedef struct VirtQueue VirtQueue;