Skip to content
Snippets Groups Projects
Commit a888df1a authored by Avi Kivity's avatar Avi Kivity
Browse files

virtio: fix virtio-blk under debug allocator


The debug allocator can allocate non-contiguous memory for large requests,
but since b7de9871 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: default avatarAvi Kivity <avi@cloudius-systems.com>
parent 87883d8a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment