Lines Matching full:bytes
19 use vm_memory::{Bytes, GuestAddress, GuestMemoryAtomic, MmapRegion};
35 // Guest physical address for used ring (requires to 4-bytes aligned)
38 fuzz_target!(|bytes: &[u8]| -> Corpus {
39 if bytes.len() < QUEUE_DATA_SIZE || bytes.len() > (QUEUE_DATA_SIZE + MEM_SIZE) {
44 let queue_data = &bytes[..QUEUE_DATA_SIZE];
45 let mem_bytes = &bytes[QUEUE_DATA_SIZE..];
47 // Setup the virt queue with the input bytes
50 // Setup the guest memory with the input bytes
138 fn setup_virt_queue(bytes: &[u8; QUEUE_DATA_SIZE]) -> Queue { in setup_virt_queue()
140 q.set_next_avail(bytes[0] as u16); // 'u8' is enough given the 'QUEUE_SIZE' is small
141 q.set_next_used(bytes[1] as u16);
142 q.set_event_idx(bytes[2] % 2 != 0);
143 q.set_size(bytes[3] as u16 % QUEUE_SIZE);