summaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2013-04-03 09:15:11 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2013-04-19 10:44:17 +0200
commitaf60314291af3cabda18d27f928b0e0ff899cc76 (patch)
treeef62ae93c48f58def7e756fba12833c8c27d8026 /include/hw
parent881d588a98bf0dce98ddb65c15aa0854c0ac41ed (diff)
downloadqemu-af60314291af3cabda18d27f928b0e0ff899cc76.tar.gz
qemu-af60314291af3cabda18d27f928b0e0ff899cc76.tar.bz2
qemu-af60314291af3cabda18d27f928b0e0ff899cc76.zip
vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping
This patch follows MST's recommendation to move checks for vhost_verify_ring_mappings() -> cpu_physical_memory_map() operations from MemoryListener->region_[add,del]() -> vhost_set_memory() into final MemoryListener->commit() -> vhost_commit() callback. It addresses the case where virtio-scsi vq ioport RAM re-mapping to read-only SeaBIOS ROM triggers a cpu_physical_memory_map() NIL MemoryRegionSection pointer failure. Also save vhost_dev->mem_changed_[start,end]_addr values in vhost_set_memory() for final ranges_overlap checks. (Thanks Paolo!) Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Asias He <asias@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/virtio/vhost.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index b373be0387..de24746c7e 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -45,6 +45,9 @@ struct vhost_dev {
vhost_log_chunk_t *log;
unsigned long long log_size;
bool force;
+ bool memory_changed;
+ hwaddr mem_changed_start_addr;
+ hwaddr mem_changed_end_addr;
};
int vhost_dev_init(struct vhost_dev *hdev, int devfd, const char *devpath,