Skip to content

Commit 8d4cd3d

Browse files
Reinoud Zandijkbonzini
authored andcommitted
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 <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 5fd0711 commit 8d4cd3d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

target/i386/nvmm/nvmm-all.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,13 +1132,14 @@ static MemoryListener nvmm_memory_listener = {
11321132
};
11331133

11341134
static void
1135-
nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size)
1135+
nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size,
1136+
size_t max_size)
11361137
{
11371138
struct nvmm_machine *mach = get_nvmm_mach();
11381139
uintptr_t hva = (uintptr_t)host;
11391140
int ret;
11401141

1141-
ret = nvmm_hva_map(mach, hva, size);
1142+
ret = nvmm_hva_map(mach, hva, max_size);
11421143

11431144
if (ret == -1) {
11441145
error_report("NVMM: Failed to map HVA, HostVA:%p "

0 commit comments

Comments
 (0)