mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
vmm: allow vmm_getphysical to return a page held
This commit is contained in:
@@ -121,11 +121,13 @@ static int vioblk_rw(vioblkdev_t *blkdev, void *buffer, uintmax_t lba, size_t co
|
||||
size_t docount = (done == 0) ? (PAGE_SIZE - pageoffset) / 512 : PAGE_SIZE / 512;
|
||||
docount = min(docount, count - done);
|
||||
|
||||
void *bufferphys = vmm_getphysical((void *)((uintptr_t)buffer + done * 512));
|
||||
void *bufferphys = vmm_getphysical((void *)((uintptr_t)buffer + done * 512), true);
|
||||
__assert(bufferphys);
|
||||
|
||||
vioblk_enqueue(blkdev, header, bufferphys, docount * 512, status, write);
|
||||
|
||||
pmm_release(bufferphys);
|
||||
|
||||
if (*statushhdm) {
|
||||
err = EIO;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user