summary refs log tree commit diff stats
path: root/ui/sdl2-2d.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-09-26 18:37:09 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-10-10 08:01:36 +0200
commitb266f1d1123396f9f5df865508f7555ab0c9582a (patch)
tree6490da983849564fdc73ff7c5efbca01eeadeb03 /ui/sdl2-2d.c
parent70b1105930e71813a22f40e4139adcc5d540a5f0 (diff)
downloadfocaccia-qemu-b266f1d1123396f9f5df865508f7555ab0c9582a.tar.gz
focaccia-qemu-b266f1d1123396f9f5df865508f7555ab0c9582a.zip
ivshmem: Fix unplug of device "ivshmem-plain"
Commit 2aece63c8a "hostmem: detect host backend memory is being used
properly" fixed "ivshmem-plain" to reject memory backends that are
already in use, and to block their deletion while in use.  Two bugs
escaped review:

* New ivshmem_plain_exit() fails to call ivshmem_exit().  This breaks
  unplug.  Reproducer: migration after unplug still fails with
  "Migration is disabled when using feature 'peer mode' in device
  'ivshmem'".

* It failed to update legacy "ivshmem".  Harmless, because it creates
  the memory backend itself, and nothing else should use it.

Fix by moving the two host_memory_backend_set_mapped() calls into
ivshmem_common_realize() and ivshmem_exit(), guarded by s->hostmem.

Fixes: 2aece63c8a9d2c3a8ff41d2febc4cdeff2633331
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180926163709.22876-1-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ui/sdl2-2d.c')
0 files changed, 0 insertions, 0 deletions