Skip to content

Commit

Permalink
Merge pull request #691 from hermit-os/calm-port
Browse files Browse the repository at this point in the history
fix(x86_64): don't panic on unknown port
  • Loading branch information
mkroening authored May 7, 2024
2 parents 3e6edc2 + de6956d commit 2825277
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/linux/x86_64/kvm_cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ impl VirtualCPU for KvmCpu {
let virtio_device = self.parent_vm.virtio_device.lock().unwrap();
virtio_device.read_link_status(addr);
}
_ => {
info!("Unhanded IO Exit");
port => {
warn!("guest read from unknown I/O port {port:#x}");
}
},
VcpuExit::IoOut(port, addr) => {
Expand Down Expand Up @@ -474,8 +474,8 @@ impl VirtualCPU for KvmCpu {
self.parent_vm.virtio_device.lock().unwrap();
virtio_device.write_pfn(addr, &self.parent_vm.mem);
}
_ => {
panic!("Unhandled IO exit: 0x{:x}", port);
port => {
warn!("guest wrote to unknown I/O port {port:#x}");
}
}
}
Expand Down

0 comments on commit 2825277

Please sign in to comment.