Mark can_dma page in virtqueue

This commit is contained in:
Yuke Peng
2023-07-05 06:40:49 -07:00
committed by Tate, Hongliang Tian
parent 9bce8b879b
commit 15f3e46e3b

View File

@ -84,21 +84,21 @@ impl VirtQueue {
//allocate page
let desc_frame_ptr: InFramePtr<Descriptor> = InFramePtr::new_with_vm_frame(
VmFrameVec::allocate(&VmAllocOptions::new(1))
VmFrameVec::allocate(&VmAllocOptions::new(1).uninit(false).can_dma(true))
.unwrap()
.pop()
.unwrap(),
)
.unwrap();
let avail_frame_ptr: InFramePtr<AvailRing> = InFramePtr::new_with_vm_frame(
VmFrameVec::allocate(&VmAllocOptions::new(1))
VmFrameVec::allocate(&VmAllocOptions::new(1).uninit(false).can_dma(true))
.unwrap()
.pop()
.unwrap(),
)
.unwrap();
let used_frame_ptr: InFramePtr<UsedRing> = InFramePtr::new_with_vm_frame(
VmFrameVec::allocate(&VmAllocOptions::new(1))
VmFrameVec::allocate(&VmAllocOptions::new(1).uninit(false).can_dma(true))
.unwrap()
.pop()
.unwrap(),