mmu: separate lock for vpopulate and friends

When the debug allocator is active, it will call vpopulate() to manage the
page table.  This causes a deadlock, as vpopulate() takes vma_list_mutex,
while other operations that hold vma_list_mutex may allocate memory.

Fix by using a separate mutex for the debug range.  This is safe since the
page table root is pre-allocated, and any lower page tables will be either
in the vma list range, or the debug range, but not both.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
virtio: fix virtio-blk under debug allocator

The debug allocator can allocate non-contiguous memory for large requests,
but since b7de9871b31 it uses only one sg entry for the entire buffer.

One possible fix is to allocate contiguous memory even under the debug
allocator, but in the future we may wish to allow discontiguous allocation
when not enough contiguous space is available.  So instead we implement
a virt_to_phys() variant that takes a range, and outputs the physical
segments that make it up, and use that to construct a minimal sg list
depending on the input.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Merge tag 'v2p-debug-v1' of https://github.com/avikivity/osv

This patchset fixes bad interaction between the debug allocator and virtio.

After this patchset, 'make check' still fails, but this is due to genuine
use-after-free problems in the vfs, so will be fixed later.

Fixes #240.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>