diff options
| author | Andrew Baumann | 2017-03-25 00:19:43 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2017-03-29 01:35:24 +0200 |
| commit | b8adbc657802482e4da1767bf983ebfdf9bfe9fc (patch) | |
| tree | 52c8f0366555877974a9d6264bfb02f979ac0908 /include | |
| parent | pci: Add missing drop of bus master AS reference (diff) | |
| download | qemu-b8adbc657802482e4da1767bf983ebfdf9bfe9fc.tar.gz qemu-b8adbc657802482e4da1767bf983ebfdf9bfe9fc.tar.xz qemu-b8adbc657802482e4da1767bf983ebfdf9bfe9fc.zip | |
virtio: fix vring_align() on 64-bit windows
long is 32-bits on 64-bit windows, which caused the top half of the
address to be truncated; this patch changes it to use the
QEMU_ALIGN_UP macro which does not suffer the same problem
Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/virtio/virtio.h | 2 |
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; |
