Skip to content

Commit e602ead

Browse files
committed
main, block: Remove device.reset()
There is no need to reset the device as Cloud Hypervisor supports device reset itself (so the booted kernel will correctly reset the device on boot.) In particular resetting the block device prior to booting via EFI breaks the EFI boot. Fixes: #35 Signed-off-by: Rob Bradford <[email protected]>
1 parent 7bb1d31 commit e602ead

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/block.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ impl<'a> VirtioBlockDevice<'a> {
123123
}
124124
}
125125

126-
pub fn reset(&self) {
127-
self.transport.reset()
128-
}
129-
130126
pub fn init(&mut self) -> Result<(), VirtioError> {
131127
const VIRTIO_SUBSYSTEM_BLOCK: u32 = 0x2;
132128
const VIRTIO_F_VERSION_1: u64 = 1 << 32;

src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ fn boot_from_device(device: &mut block::VirtioBlockDevice, info: &dyn boot::Info
105105

106106
match loader::load_default_entry(&f, info) {
107107
Ok(mut kernel) => {
108-
device.reset();
109108
log!("Jumping to kernel");
110109
kernel.boot();
111110
return true;
@@ -133,7 +132,6 @@ fn boot_from_device(device: &mut block::VirtioBlockDevice, info: &dyn boot::Info
133132
}
134133
};
135134

136-
device.reset();
137135
log!("Executable loaded");
138136
efi::efi_exec(entry_addr, 0x20_0000, size, info, &f, device);
139137
true

0 commit comments

Comments
 (0)