From patchwork Fri Mar 24 23:19:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Baumann X-Patchwork-Id: 9644143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 651AB60327 for ; Fri, 24 Mar 2017 23:20:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56F2B27317 for ; Fri, 24 Mar 2017 23:20:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BC79279E0; Fri, 24 Mar 2017 23:20:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD4A627317 for ; Fri, 24 Mar 2017 23:20:53 +0000 (UTC) Received: from localhost ([::1]:35260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crYVo-0003KU-4d for patchwork-qemu-devel@patchwork.kernel.org; Fri, 24 Mar 2017 19:20:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crYUw-0003KJ-4T for qemu-devel@nongnu.org; Fri, 24 Mar 2017 19:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crYUs-0006mT-Vw for qemu-devel@nongnu.org; Fri, 24 Mar 2017 19:19:58 -0400 Received: from mail-bn3nam01on0106.outbound.protection.outlook.com ([104.47.33.106]:2746 helo=NAM01-BN3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crYUs-0006mG-Or for qemu-devel@nongnu.org; Fri, 24 Mar 2017 19:19:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=40/JI6/251b1N8CyVj1jGb46ClcNi+rqwq4oNNv+HRg=; b=iIrxWhitt51hdEOnYOfp/XBZIPedy47SKmmRZ88lsh1OSMz87H0lwmry7ijI/qYkGBqbx/ht7JFdYXEFg9IOEh8InoAMUJCUIb1trJsKrQ8whEAjYiavJO84gQ9Ob9v7Ly2XyMbf9bX6FyKixzBrANW8+ff94sX8aK6Dj79unZU= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=microsoft.com; Received: from vroomfondel.redmond.corp.microsoft.com (2001:4898:80e8:5::202) by DM2PR21MB0057.namprd21.prod.outlook.com (10.161.140.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.1; Fri, 24 Mar 2017 23:19:50 +0000 From: Andrew Baumann To: Date: Fri, 24 Mar 2017 16:19:43 -0700 Message-ID: <20170324231943.18768-1-Andrew.Baumann@microsoft.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 X-Originating-IP: [2001:4898:80e8:5::202] X-ClientProxiedBy: BN6PR05CA0016.namprd05.prod.outlook.com (10.174.92.157) To DM2PR21MB0057.namprd21.prod.outlook.com (10.161.140.23) X-MS-Office365-Filtering-Correlation-Id: e6a7ca2a-467f-4f47-e235-08d4730c4585 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423014)(201703031133020); SRVR:DM2PR21MB0057; X-Microsoft-Exchange-Diagnostics: 1; DM2PR21MB0057; 3:1GbeFkg3LDoxG0BfsOUW5KBnFgG0gPiy1KZjAI0yX0thkdP6/n3qiXLdyKBQN4Et55lTk4ixoZMN9LY1O8XrDbunNuY0Jk9//btbFsqAaJophMYA2YF8dGv1HZ9SOsrrNxlfiEt6XRNN4XuJmrbDYtDnWjaJQKtJZR8w3MiOejgImCTVwyKlSDxqhGhrDFvARr7rWo4u5LjbbDN5zlVYIQXJL6wiRSYEXGuSYbuiH11b8MENShWhRukrpxY1A4kD0R30yhvoZxaOd4Wh0/XlVHTWp07V5ml4acIJziOsfzuckof+xlJptIkSSEeHRWPEMmmpgrYmwc0++oIJfcYPRiI1ephflvMKQAqjeeXxB7o=; 25:2zKLyDLTC2KQXrYALC6FSXA7wxHdMczctoPQJ7/kbbYF55UL6CJzFzZKJECm16DHheFYNesvyecBoeox9bskVu7pTDkVQ1ESHGku3aOCbl6sujNIjYiz4W301/QA/Ve3YVe8sE/K26Mt9QRzBoXuIdIgZ7n1iEIKCDLK4TtKaxGAmq0l1yes3awZd+hNnVcbWP/U/y2ec4+KvI2K4VO254AdEJ9nGiPOZPMygrB2kd2vCd9D2ZdSrTw2lf3IbtQnNv8b8V5wIjEVP6dzdZz0PVqKc5SfZmag1Q68bMj3QIXnIeYQ3kCAWi4JKiPGidPBXLqbVFG/SDmyrd9w9JUYUhBtoFe+1rtK4+9rxKtxWFl/T5uyoalUDe7hreg76OcY9ZuDJ7gXTZLFq0FmS0frFt7yNmeFHLFTdnyh1NDNZrNKRaPrtufE1oOax7MXN8qHkdNuqEOOzYOK327vzUoDjA== X-Microsoft-Exchange-Diagnostics: 1; DM2PR21MB0057; 31:MMAYjNN+utE5N5iKQmgadiPUf5m+HVsZrGN/EigBZEaWZQVoai9I+1EKBBRNOis7jMkeh5cnG25eDVI2pjPSzk+s9LpdTTruJUHEl0dSOACnn/UUYeLgkOx28GjjKzvb1begfdcvyBgc1nutJCqQ8kFMbjISrDy9nMKhMnlsRa5MwOSwgblT1y0jYSpF6suHT7Tr3H3JvZi95zEHm/oqVV6819GbLcFGaoljqB8IwrAvKt+dnqd7Ljm94hHk10pyezGhbNCoBfsDn2RbHMdaRlJAsC84+afk5BC3/wNETNA=; 20:cocfqU5MtWNZEZ7NI8yU69YyXlmbaz2xyZZeZQIJkeUQtE0inyTijk7L5kq1ml54UGE396ZfeJuTrXZVBHBBv/b01QaZvImSDAY7gSIsh2CQNqIjg5AmHFY9nTJa0iIRm2TuLG2wxzLmhhVJ29oD+x0iOI7Difdv5Ro3807bS/rHj+MnmLCYW4Y9a9jpMBNQnkMkAKt/qrTXSceSE5uWQqJX/eF1LUYP4uRDQSYT/Y2zgST2o5zYJsiMwxgVXoxiRGR/wTaXPP5DQwT+MT+zOHLe4CthhaI7xwkxdtApi1WI06qqA0QwRIoi9j4IJaYm0G17KYBXPqZ2Jzp7QVWhjiySHzZ98A4uHE0j+bkAJmxXSI6i9dO7gut7tWhqQzRCLMjUatp6I91NBgsYLpZwDmdw60KDsOdLhhz5+PMb/bxTZJtKcFUPr1TcXhC4fOQDNvVtiXNkh23xdF4MCIdyzpt/72MEnLvyVBcmykbNKJelpzH9TZodsVh8Vdbr5P29 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040391)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006021)(93001021)(6055026)(6041248)(20161123564025)(201703131423016)(201702281528016)(201703061421016)(201703061406016)(20161123555025)(20161123558025)(20161123560025)(20161123562025)(6072148); SRVR:DM2PR21MB0057; BCL:0; PCL:0; RULEID:; SRVR:DM2PR21MB0057; X-Microsoft-Exchange-Diagnostics: 1; DM2PR21MB0057; 4:I4d/zubEr2RA5xN7cFkDDxnDqrJpb3Cqqn5ukMfLqO0B5zvWX9RLxzZZPmSm7kiIYa35x/3If9x1tMfICn/eQv7ydg+4oT1GUx/oGtRLr2kDe8zPQq7DsEvnrj/7sJ9WGNFpP9626IRnCv+ua+jCQIDWXZEQhFznKxD5Bj2KW3pTVaOAshnMgkUASonfZgpE5M6ezXMjwTcSTKbDaoSB8WbfcMNwQWOha4na783rVqdCd10lMmp7GyzWrAECDXQ+O9HpxFp/WUZvJEE/ecAdiwOmZ1nhppx34vs+diFpNHUGC4JucpJAFwqxrog02KVQX/y1SLESR7BbeO0ggzE7MmqKrFBTudfKqClcIrDhrCdnQ41NeWMeIGCniYVJPArXi1fRTepAT7xt2FaoHh7ZzIzDRe77uxCKCQUnmmLcXdKa7Edtu3Sp+NQefZVULBpcAwf503mh1jVo9RCgWLVW4RqOi6KSl52kCv3h7GyGKyCaifVXGMRlG187unY+DsM9EaNbQgMo2rbZGkseUkl8Suto3fJJ07hAcmaurg4cbdgq5LEmV3UTcZjuM5X5i2InPBTiYC53UKu5dRzj5IxVZeIDzF4+iwCen8OrPh7r5joSoTD+GfkYRaH+drJE3liSH18R0UYvPPH9r1Z2ugJuaalcyEJIps7VHqgknWK6mj2hS7MD1jj1kmRaa4z5iDHgWe7EHnG08DzqZsvyRN298qkdfIn1MoH3U+FNE3OGii+OWltW+h9sac7J/gYS4JFB4Hwjix6Qb5U8fvi6vaCagijNYWlfdFOPqqLHx3ouYJX6GasR744y6mWKrq5LAxBh X-Forefront-PRVS: 0256C18696 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39840400002)(39860400002)(39850400002)(39410400002)(39450400003)(25786009)(1076002)(6116002)(2906002)(6666003)(36756003)(50226002)(48376002)(86612001)(5005710100001)(86362001)(81166006)(8676002)(50466002)(10290500002)(4326008)(6916009)(2351001)(42186005)(5003940100001)(53936002)(10090500001)(5660300001)(47776003)(110136004)(7736002)(305945005)(54906002)(107886003)(50986999)(38730400002)(189998001)(6486002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR21MB0057; H:vroomfondel.redmond.corp.microsoft.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR21MB0057; 23:axxHGWaFMhdl2riSQZHah6griRwsOWS/Jjed3Q+Qx?= =?us-ascii?Q?LtCA3HxXDmWwgcx5L3sTnbRTVV411wHMITEDff1iu4t0wD48AriRw572J43n?= =?us-ascii?Q?hPLvYQkfPHxqatZv2HYuBPPly+4m0ZPhbSioHySHZfQ7fOimoQwZLBwzrS17?= =?us-ascii?Q?t4MIvo5+b066j+dPpfzDqPEkv5ehtokFnECRtWH9zMFiHlRNIVqkv8si0chu?= =?us-ascii?Q?V7/HMgptC6783w15t72R3WERw10dp5ytFO0PDZwNEOJO2Rc8LooVTlhZlQl3?= =?us-ascii?Q?9Ro8hn+kzAdVdCacr/7oUSlaQz7vXhVIGkvN8rWaCXMWxyleC2kQdLraBnug?= =?us-ascii?Q?hLqpcMv9s0HQyUdqexh4vjqlheJzThN2kNAzr8qcKqjYNeTziQrf8HzIrW5x?= =?us-ascii?Q?6MHaL2koVJ/9TNZWCKGjEgEs73PXtvWR0+mWcsLe6WPvjYew9vrCCXgyk2Wa?= =?us-ascii?Q?15roqlRoV9QPCLhw/hIZ5o1MwWniFYKnI0HjPmFn8atM4w4OoetzvCGh47dr?= =?us-ascii?Q?zecxnMksi3lz59/l9ekIW9D4H5ZT3DAP5Hu5fZnIGqE4vBTwEZuDMYjgGb+n?= =?us-ascii?Q?R7WG7fneaBuiVGFcD7QDy6kjjLpB5msJZqs0xE0OOtCCbU42C0NLaY799oNx?= =?us-ascii?Q?Qd9EViaduVPgleitUf9zzhvrTyaqUUORD//6YFEVcXZaDgOQFl1qCm7eCebC?= =?us-ascii?Q?3dM92Y9v+x43gNE3ftxNsMyIu0+BJWFhEiOQkz+j9dTbClGNdFWmcs1IJhUp?= =?us-ascii?Q?k3gEZp0X46KA/YsF596jphC+WK4T1aRS6X/lzY1sWu4v5vRMwRbenTmIDa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: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR21MB0057; 7:M0PZUDqrdFjRXyszVXQhpYtjf9uYdIKPqhmKQLF9tkG1YSj2Pi9F3EWegts9ngO0tnPXEkmoe9NfnTE0F5b21aEEfHJM+U0LuhAExBKINwZzyDeNMnpzxFClGDUgg6/AuYfp8tnSx7MdrObquPRBKO70hMnLdBBmQFcv1FbpEeXxU4+aE6iQfHVj4tP6agVkAo0nS0nzQR7Kq/e9YGiFTDuyJtmwm8uYxl0EWpFx+afrmZ46Cky8eBzL+fL/Gz054nJ3uSRLRCOq12aBZy2Jz+n5gleykyI30OiiaNrlfVCEiMAsfIuiw8Hm3ObjXJuX2qXPMvGz6Dttr6EqLu0fPg== X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2017 23:19:50.1317 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR21MB0057 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.33.106 Subject: [Qemu-devel] [PATCH v3] virtio: fix vring_align() on 64-bit windows X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , Andrew Baumann , "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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: Philippe Mathieu-Daudé Reviewed-by: Stefan Weil Reviewed-by: Michael S. Tsirkin --- 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); } typedef struct VirtQueue VirtQueue;