[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/29] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_add
From: |
Michael S. Tsirkin |
Subject: |
[PULL 21/29] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_addr |
Date: |
Tue, 19 Oct 2021 07:20:38 -0400 |
From: David Hildenbrand <david@redhat.com>
We end up not copying the mmap_addr of all existing regions, resulting
in a SEGFAULT once we actually try to map/access anything within our
memory regions.
Fixes: 875b9fd97b34 ("Support individual region unmap in libvhost-user")
Cc: qemu-stable@nongnu.org
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Raphael Norwitz <raphael.norwitz@nutanix.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Coiby Xu <coiby.xu@gmail.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211011201047.62587-1-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
subprojects/libvhost-user/libvhost-user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/subprojects/libvhost-user/libvhost-user.c
b/subprojects/libvhost-user/libvhost-user.c
index bf09693255..787f4d2d4f 100644
--- a/subprojects/libvhost-user/libvhost-user.c
+++ b/subprojects/libvhost-user/libvhost-user.c
@@ -816,6 +816,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
shadow_regions[j].gpa = dev->regions[i].gpa;
shadow_regions[j].size = dev->regions[i].size;
shadow_regions[j].qva = dev->regions[i].qva;
+ shadow_regions[j].mmap_addr = dev->regions[i].mmap_addr;
shadow_regions[j].mmap_offset = dev->regions[i].mmap_offset;
j++;
} else {
--
MST
- [PULL 02/29] tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator, (continued)
- [PULL 02/29] tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator, Michael S. Tsirkin, 2021/10/19
- [PULL 03/29] tests: acpi: whitelist expected tables for acpi/q35/xapic testcase, Michael S. Tsirkin, 2021/10/19
- [PULL 04/29] tests: acpi: q35: test for x2APIC entries in SRAT, Michael S. Tsirkin, 2021/10/19
- [PULL 06/29] tests: acpi: whitelist new expected table tests/data/acpi/q35/DMAR.dmar, Michael S. Tsirkin, 2021/10/19
- [PULL 11/29] tests: acpi: update expected blobs, Michael S. Tsirkin, 2021/10/19
- [PULL 07/29] tests: acpi: add testcase for intel_iommu (DMAR table), Michael S. Tsirkin, 2021/10/19
- [PULL 09/29] tests: acpi: whitelist expected blobs for new acpi/q35/ivrs testcase, Michael S. Tsirkin, 2021/10/19
- [PULL 08/29] tests: acpi: add expected blob for DMAR table, Michael S. Tsirkin, 2021/10/19
- [PULL 13/29] tests: arm-cpu-features: use qtest_has_kvm() API, Michael S. Tsirkin, 2021/10/19
- [PULL 19/29] virtio-iommu: Remove the non transitional name, Michael S. Tsirkin, 2021/10/19
- [PULL 21/29] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_addr,
Michael S. Tsirkin <=
- [PULL 14/29] tests: migration-test: use qtest_has_accel() API, Michael S. Tsirkin, 2021/10/19
- [PULL 24/29] docs: Add documentation for vhost based RNG implementation, Michael S. Tsirkin, 2021/10/19
- [PULL 05/29] tests: acpi: update expected tables blobs, Michael S. Tsirkin, 2021/10/19
- [PULL 12/29] tests: acpi: arm/virt: drop redundant test_acpi_one() in test_acpi_virt_tcg(), Michael S. Tsirkin, 2021/10/19
- [PULL 17/29] vdpa: Add vhost_vdpa_section_end, Michael S. Tsirkin, 2021/10/19
- [PULL 16/29] vdpa: Skip protected ram IOMMU mappings, Michael S. Tsirkin, 2021/10/19
- [PULL 18/29] vdpa: Check for iova range at mappings changes, Michael S. Tsirkin, 2021/10/19
- [PULL 20/29] virtio-iommu: Drop base_name and change generic_name, Michael S. Tsirkin, 2021/10/19
- [PULL 23/29] vhost-user-rng-pci: Add vhost-user-rng-pci implementation, Michael S. Tsirkin, 2021/10/19
- [PULL 22/29] vhost-user-rng: Add vhost-user-rng implementation, Michael S. Tsirkin, 2021/10/19