Blame 0044-vhost-fix-log-base.patch
|
Justin M. Forbes |
eff942 |
From d42430f94c77a653da486e6f96f6695818f3e81b Mon Sep 17 00:00:00 2001
|
|
Justin M. Forbes |
eff942 |
From: Michael S. Tsirkin <mst@redhat.com>
|
|
Justin M. Forbes |
eff942 |
Date: Wed, 24 Feb 2010 21:10:04 +0200
|
|
Justin M. Forbes |
eff942 |
Subject: [PATCH] vhost: fix log base
|
|
Justin M. Forbes |
eff942 |
|
|
Justin M. Forbes |
eff942 |
LOG_BASE ioctl gets a pointer to a 64 bit value, not
|
|
Justin M. Forbes |
eff942 |
a pointer cast to 64 bit value.
|
|
Justin M. Forbes |
eff942 |
|
|
Justin M. Forbes |
eff942 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Justin M. Forbes |
eff942 |
---
|
|
Justin M. Forbes |
eff942 |
hw/vhost.c | 5 +++--
|
|
Justin M. Forbes |
eff942 |
1 files changed, 3 insertions(+), 2 deletions(-)
|
|
Justin M. Forbes |
eff942 |
|
|
Justin M. Forbes |
eff942 |
diff --git a/hw/vhost.c b/hw/vhost.c
|
|
Justin M. Forbes |
eff942 |
index 019afc2..b63eafa 100644
|
|
Justin M. Forbes |
eff942 |
--- a/hw/vhost.c
|
|
Justin M. Forbes |
eff942 |
+++ b/hw/vhost.c
|
|
Justin M. Forbes |
eff942 |
@@ -241,14 +241,15 @@ static uint64_t vhost_get_log_size(struct vhost_dev *dev)
|
|
Justin M. Forbes |
eff942 |
static inline void vhost_dev_log_resize(struct vhost_dev* dev, uint64_t size)
|
|
Justin M. Forbes |
eff942 |
{
|
|
Justin M. Forbes |
eff942 |
vhost_log_chunk_t *log;
|
|
Justin M. Forbes |
eff942 |
+ uint64_t log_base;
|
|
Justin M. Forbes |
eff942 |
int r;
|
|
Justin M. Forbes |
eff942 |
if (size) {
|
|
Justin M. Forbes |
eff942 |
log = qemu_mallocz(size * sizeof *log);
|
|
Justin M. Forbes |
eff942 |
} else {
|
|
Justin M. Forbes |
eff942 |
log = NULL;
|
|
Justin M. Forbes |
eff942 |
}
|
|
Justin M. Forbes |
eff942 |
- r = ioctl(dev->control, VHOST_SET_LOG_BASE,
|
|
Justin M. Forbes |
eff942 |
- (uint64_t)(unsigned long)log);
|
|
Justin M. Forbes |
eff942 |
+ log_base = (uint64_t)(unsigned long)log;
|
|
Justin M. Forbes |
eff942 |
+ r = ioctl(dev->control, VHOST_SET_LOG_BASE, &log_base);
|
|
Justin M. Forbes |
eff942 |
assert(r >= 0);
|
|
Justin M. Forbes |
eff942 |
vhost_client_sync_dirty_bitmap(&dev->client, 0,
|
|
Justin M. Forbes |
eff942 |
(target_phys_addr_t)~0x0ull);
|
|
Justin M. Forbes |
eff942 |
--
|
|
Justin M. Forbes |
eff942 |
1.6.6.1
|
|
Justin M. Forbes |
eff942 |
|