Skip to content

Commit

Permalink
fix: log virtio address
Browse files Browse the repository at this point in the history
Resolve a TODO for logging the address of a descriptor chain head if
fetching it from guest memory fails.

Closes firecracker-microvm#3592

Co-Authored-By: sladynnunes <snunes@usc.edu>
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
  • Loading branch information
sladyn98 authored and roypat committed May 8, 2024
1 parent 7929302 commit d97ddb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vmm/src/devices/virtio/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ impl<'a, M: GuestMemory> DescriptorChain<'a, M> {
let desc = match mem.read_obj::<Descriptor>(desc_head) {
Ok(ret) => ret,
Err(err) => {
// TODO log address
error!("Failed to read virtio descriptor from memory: {}", err);
error!(
"Failed to read virtio descriptor from memory at address {:#x}: {}",
desc_head.0, err
);
return None;
}
};
Expand Down

0 comments on commit d97ddb1

Please sign in to comment.