mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 16:33:24 +00:00
Mark can_dma page in virtqueue
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
9bce8b879b
commit
15f3e46e3b
@ -84,21 +84,21 @@ impl VirtQueue {
|
|||||||
//allocate page
|
//allocate page
|
||||||
|
|
||||||
let desc_frame_ptr: InFramePtr<Descriptor> = InFramePtr::new_with_vm_frame(
|
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()
|
.unwrap()
|
||||||
.pop()
|
.pop()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let avail_frame_ptr: InFramePtr<AvailRing> = InFramePtr::new_with_vm_frame(
|
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()
|
.unwrap()
|
||||||
.pop()
|
.pop()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let used_frame_ptr: InFramePtr<UsedRing> = InFramePtr::new_with_vm_frame(
|
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()
|
.unwrap()
|
||||||
.pop()
|
.pop()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
|
Reference in New Issue
Block a user