mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-01-28 19:29:20 +00:00
virtio: Derive Clone for DescriptorChain
Allow DescriptorChain to be cloned. This will enable devices to maintain a read head and write head in the same DescriptorChain. BUG=chromium:703939 TEST=clone the DescriptorChain in a method Change-Id: I1d775a9e0b7ed42052272f22a9b308ad4d108e45 Signed-off-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1065171 Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
72fa671f6c
commit
6452eaf902
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ const VIRTQ_DESC_F_WRITE: u16 = 0x2;
|
|||
const VIRTQ_DESC_F_INDIRECT: u16 = 0x4;
|
||||
|
||||
/// A virtio descriptor chain.
|
||||
#[derive(Clone)]
|
||||
pub struct DescriptorChain<'a> {
|
||||
mem: &'a GuestMemory,
|
||||
desc_table: GuestAddress,
|
||||
|
|
Loading…
Reference in a new issue