On Sun, Oct 03, 2021 at 05:46:04PM +0100, Marc Zyngier wrote:
...
> @@ -1662,9 +1665,17 @@ static void virt_set_memmap(VirtMachineState *vms)
> vms->memmap[i].size = size;
> base += size;
> }
> - vms->highest_gpa = (vms->highmem ?
> - base :
> - vms->memmap[VIRT_MEM].base + ms->maxram_size) - 1;
> +
> + /*
> + * If base fits within pa_bits, all good. If it doesn't, limit it
> + * to the end of RAM, which is guaranteed to fit within pa_bits.
> + */
> + if (base <= BIT_ULL(pa_bits)) {
> + vms->highest_gpa = base -1;
^ missing space here
> + } else {
> + vms->highest_gpa = memtop - 1;
> + }
> +
> if (device_memory_size > 0) {
> ms->device_memory = g_malloc0(sizeof(*ms->device_memory));
> ms->device_memory->base = device_memory_base;
Thanks,
drew
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm