From 15f3e46e3b1aead875119bd2cd16850450a428b1 Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Wed, 5 Jul 2023 06:40:49 -0700 Subject: [PATCH] Mark can_dma page in virtqueue --- services/comps/virtio/src/queue.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/comps/virtio/src/queue.rs b/services/comps/virtio/src/queue.rs index 083e0c057..0e1a4958e 100644 --- a/services/comps/virtio/src/queue.rs +++ b/services/comps/virtio/src/queue.rs @@ -84,21 +84,21 @@ impl VirtQueue { //allocate page let desc_frame_ptr: InFramePtr = 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 = 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 = InFramePtr::new_with_vm_frame( - VmFrameVec::allocate(&VmAllocOptions::new(1)) + VmFrameVec::allocate(&VmAllocOptions::new(1).uninit(false).can_dma(true)) .unwrap() .pop() .unwrap(),