Commit b8adbc65 authored by Andrew Baumann's avatar Andrew Baumann Committed by Michael S. Tsirkin
Browse files

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: default avatarAndrew Baumann <Andrew.Baumann@microsoft.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarStefan Weil <sw@weilnetz.de>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
parent c53598ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;