Received: from eggs.gnu.org ([2001:4830:134:3::10]:41593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ct2Fu-0002uY-BN for qemu-devel@nongnu.org; Tue, 28 Mar 2017 21:18:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ct2Fr-0006LH-D3 for qemu-devel@nongnu.org; Tue, 28 Mar 2017 21:18:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51779) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ct2Fr-0006Ko-6k for qemu-devel@nongnu.org; Tue, 28 Mar 2017 21:18:31 -0400 Date: Wed, 29 Mar 2017 04:18:28 +0300 From: "Michael S. Tsirkin" Message-ID: <1490750257-19907-4-git-send-email-mst@redhat.com> References: <1490750257-19907-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1490750257-19907-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 3/3] virtio: fix vring_align() on 64-bit windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Andrew Baumann , Eric Blake , Stefan Weil , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= From: Andrew Baumann 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 Reviewed-by: Eric Blake Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/virtio/virtio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 15efcf2..7b6edba 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); } =20 typedef struct VirtQueue VirtQueue; --=20 MST