[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V5 24/38] physmem: qemu_ram_get_fd_offset
From: |
Steve Sistare |
Subject: |
[PATCH V5 24/38] physmem: qemu_ram_get_fd_offset |
Date: |
Tue, 10 Jun 2025 08:39:37 -0700 |
Define qemu_ram_get_fd_offset, so CPR can map a memory region using
IOMMU_IOAS_MAP_FILE in a subsequent patch.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
include/exec/cpu-common.h | 1 +
system/physmem.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index a684855..9b658a3 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -85,6 +85,7 @@ void qemu_ram_unset_idstr(RAMBlock *block);
const char *qemu_ram_get_idstr(RAMBlock *rb);
void *qemu_ram_get_host_addr(RAMBlock *rb);
ram_addr_t qemu_ram_get_offset(RAMBlock *rb);
+ram_addr_t qemu_ram_get_fd_offset(RAMBlock *rb);
ram_addr_t qemu_ram_get_used_length(RAMBlock *rb);
ram_addr_t qemu_ram_get_max_length(RAMBlock *rb);
bool qemu_ram_is_shared(RAMBlock *rb);
diff --git a/system/physmem.c b/system/physmem.c
index a8a9ca3..18684a4 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -1593,6 +1593,11 @@ ram_addr_t qemu_ram_get_offset(RAMBlock *rb)
return rb->offset;
}
+ram_addr_t qemu_ram_get_fd_offset(RAMBlock *rb)
+{
+ return rb->fd_offset;
+}
+
ram_addr_t qemu_ram_get_used_length(RAMBlock *rb)
{
return rb->used_length;
--
1.8.3.1
- [PATCH V5 00/38] Live update: vfio and iommufd, Steve Sistare, 2025/06/10
- [PATCH V5 01/38] migration: cpr helpers, Steve Sistare, 2025/06/10
- [PATCH V5 09/38] pci: export msix_is_pending, Steve Sistare, 2025/06/10
- [PATCH V5 17/38] vfio/pci: export MSI functions, Steve Sistare, 2025/06/10
- [PATCH V5 20/38] migration: close kvm after cpr, Steve Sistare, 2025/06/10
- [PATCH V5 34/38] vfio/iommufd: reconstruct hwpt, Steve Sistare, 2025/06/10
- [PATCH V5 05/38] vfio/container: discard old DMA vaddr, Steve Sistare, 2025/06/10
- [PATCH V5 08/38] vfio/container: recover from unmap-all-vaddr failure, Steve Sistare, 2025/06/10
- [PATCH V5 11/38] vfio-pci: skip reset during cpr, Steve Sistare, 2025/06/10
- [PATCH V5 24/38] physmem: qemu_ram_get_fd_offset,
Steve Sistare <=
- [PATCH V5 31/38] vfio/iommufd: cpr state, Steve Sistare, 2025/06/10
- [PATCH V5 25/38] vfio/iommufd: use IOMMU_IOAS_MAP_FILE, Steve Sistare, 2025/06/10
- [PATCH V5 35/38] vfio/iommufd: change process, Steve Sistare, 2025/06/10
- [PATCH V5 26/38] vfio/iommufd: invariant device name, Steve Sistare, 2025/06/10
- [PATCH V5 29/38] vfio/iommufd: register container for cpr, Steve Sistare, 2025/06/10
- [PATCH V5 30/38] migration: vfio cpr state hook, Steve Sistare, 2025/06/10