2020-08-12 00:53:07 +02:00
|
|
|
|
From: Jon Doron <arilou@gmail.com>
|
|
|
|
|
Date: Wed, 15 Jul 2020 11:43:26 +0300
|
|
|
|
|
Subject: hw: hyperv: vmbus: Fix 32bit compilation
|
2020-09-15 23:41:42 +02:00
|
|
|
|
MIME-Version: 1.0
|
|
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
|
|
Content-Transfer-Encoding: 8bit
|
2020-08-12 00:53:07 +02:00
|
|
|
|
|
2020-09-15 23:41:42 +02:00
|
|
|
|
Git-commit: 8b39aa90e90e9c04d07b0fbb583195237f3f11fe
|
2020-08-12 00:53:07 +02:00
|
|
|
|
|
2020-09-15 23:41:42 +02:00
|
|
|
|
Fix 32-bit build error for vmbus:
|
|
|
|
|
|
|
|
|
|
hw/hyperv/vmbus.c: In function ‘gpadl_iter_io’:
|
|
|
|
|
hw/hyperv/vmbus.c:383:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
|
|
|
|
|
383 | p = (void *)(((uintptr_t)iter->map & TARGET_PAGE_MASK) | off_in_page);
|
|
|
|
|
| ^
|
|
|
|
|
cc1: all warnings being treated as errors
|
|
|
|
|
|
|
|
|
|
Fixes: 0d71f7082d7 ("vmbus: vmbus implementation")
|
2020-08-12 00:53:07 +02:00
|
|
|
|
Signed-off-by: Jon Doron <arilou@gmail.com>
|
2020-09-15 23:41:42 +02:00
|
|
|
|
Tested-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
|
|
|
|
|
Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
|
|
|
|
|
Message-Id: <20200715084326.678715-3-arilou@gmail.com>
|
|
|
|
|
[lv: updated with commit description from <20200906050113.2783642-1-richard.henderson@linaro.org>]
|
|
|
|
|
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
|
2020-08-12 00:53:07 +02:00
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
|
|
|
---
|
|
|
|
|
hw/hyperv/vmbus.c | 3 ++-
|
|
|
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
|
|
|
|
|
index 34392e892af6228f270ec327563e..c28bb4201be449eb6dae4b0e0218 100644
|
|
|
|
|
--- a/hw/hyperv/vmbus.c
|
|
|
|
|
+++ b/hw/hyperv/vmbus.c
|
|
|
|
|
@@ -383,7 +383,8 @@ static ssize_t gpadl_iter_io(GpadlIter *iter, void *buf, uint32_t len)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- p = (void *)(((uintptr_t)iter->map & TARGET_PAGE_MASK) | off_in_page);
|
|
|
|
|
+ p = (void *)(uintptr_t)(((uintptr_t)iter->map & TARGET_PAGE_MASK) |
|
|
|
|
|
+ off_in_page);
|
|
|
|
|
if (iter->dir == DMA_DIRECTION_FROM_DEVICE) {
|
|
|
|
|
memcpy(p, buf, cplen);
|
|
|
|
|
} else {
|