aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinoud Zandijk <reinoud@NetBSD.org>2021-07-18 15:46:50 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-09-13 13:56:26 +0200
commit8d4cd3dd8b7091772ff0fdf84b79619cf083c98c (patch)
treedf0e51ce3ed571b8f117a1a75adf41359e31a70b
parent5fd0711b859c101876585f736ddb48721c106685 (diff)
Fix nvmm_ram_block_added() function arguments
A parameter max_size was added to the RAMBlockNotifier ram_block_added function. Use the max_size for pre allocation of hva space. Signed-off-by: Reinoud Zandijk <Reinoud@NetBSD.org> Message-Id: <20210718134650.1191-3-reinoud@NetBSD.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--target/i386/nvmm/nvmm-all.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c
index 28dee4c5ee..a488b00e90 100644
--- a/target/i386/nvmm/nvmm-all.c
+++ b/target/i386/nvmm/nvmm-all.c
@@ -1132,13 +1132,14 @@ static MemoryListener nvmm_memory_listener = {
};
static void
-nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size)
+nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size,
+ size_t max_size)
{
struct nvmm_machine *mach = get_nvmm_mach();
uintptr_t hva = (uintptr_t)host;
int ret;
- ret = nvmm_hva_map(mach, hva, size);
+ ret = nvmm_hva_map(mach, hva, max_size);
if (ret == -1) {
error_report("NVMM: Failed to map HVA, HostVA:%p "