From: Hans-Jörg Höxer Subject: Re: [EXT] Reworking VMM's nested paging & guest memory (de-vmspace-ification) To: Date: Mon, 28 Apr 2025 10:50:44 +0200 Hi, On Fri, Apr 25, 2025 at 01:05:27PM -0400, Dave Voutila wrote: >... > >> @@ -487,13 +527,13 @@ vm_create_check_mem_ranges(struct vm_create_params *vc > >> * Calling uvm_share() when creating the VM will take care of > >> * further checks. > >> */ > >> - if (vmr->vmr_va < VM_MIN_ADDRESS || > >> +/* if (vmr->vmr_va < VM_MIN_ADDRESS || > >> vmr->vmr_va >= VM_MAXUSER_ADDRESS || > >> vmr->vmr_size >= VM_MAXUSER_ADDRESS - vmr->vmr_va) { > >> DPRINTF("guest va not within range or wraps\n"); > >> return (0); > >> } > >> - > >> +*/ > > > > Why remove this check? Shouldn't these constraints still hold? > > > > I'm shifting to a model where the userland process no longer dictates > the virtual address layout of the guest memory in the vmd process. The > vm_create() and vm_share_mem() functions should be determining the va > ranges in the vmd proess via uvm_map and now communicating them to the > calling process. > > In other words, it's turning into an output from the ioctl and not an > input. > > I'll be sending out a revised diff now that I've iterated on the uvm > portion with mpi that should make it clear. I see, thanks!