qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] vhost: Don't pass ram device sections


From: Dr. David Alan Gilbert (git)
Subject: [PATCH 1/2] vhost: Don't pass ram device sections
Date: Wed, 8 Jan 2020 13:53:52 +0000

From: "Dr. David Alan Gilbert" <address@hidden>

Don't pass RAM blocks that are marked as ram devices to vhost.
There's normally something special about them and they're not
normally just shared memory.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
 hw/virtio/vhost.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 4da0d5a6c5..c81f0be71b 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -402,6 +402,7 @@ static bool vhost_section(struct vhost_dev *dev, 
MemoryRegionSection *section)
     bool log_dirty = memory_region_get_dirty_log_mask(section->mr) &
                      ~(1 << DIRTY_MEMORY_MIGRATION);
     result = memory_region_is_ram(section->mr) &&
+        !memory_region_is_ram_device(section->mr) &&
         !memory_region_is_rom(section->mr);
 
     /* Vhost doesn't handle any block which is doing dirty-tracking other
-- 
2.24.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]