diff options
author | David Hildenbrand | 2021-12-17 14:46:09 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2022-01-07 11:19:55 +0100 |
commit | a960d6642d39f7d255b7b2b8bda3c2ae4e4e649b (patch) | |
tree | e96bff148489aac1d0420f57311fabc5e22d6b02 /include/hw/virtio/virtio-mem.h | |
parent | util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE (diff) | |
download | qemu-a960d6642d39f7d255b7b2b8bda3c2ae4e4e649b.tar.gz qemu-a960d6642d39f7d255b7b2b8bda3c2ae4e4e649b.tar.xz qemu-a960d6642d39f7d255b7b2b8bda3c2ae4e4e649b.zip |
util/oslib-posix: Support concurrent os_mem_prealloc() invocation
Add a mutex to protect the SIGBUS case, as we cannot mess concurrently
with the sigbus handler and we have to manage the global variable
sigbus_memset_context. The MADV_POPULATE_WRITE path can run
concurrently.
Note that page_mutex and page_cond are shared between concurrent
invocations, which shouldn't be a problem.
This is a preparation for future virtio-mem prealloc code, which will call
os_mem_prealloc() asynchronously from an iothread when handling guest
requests.
Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211217134611.31172-7-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio-mem.h')
0 files changed, 0 insertions, 0 deletions