Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parsing multiple virtio-blk device #16

Closed
sboeuf opened this issue Sep 20, 2019 · 1 comment · Fixed by #17
Closed

Support parsing multiple virtio-blk device #16

sboeuf opened this issue Sep 20, 2019 · 1 comment · Fixed by #17

Comments

@sboeuf
Copy link
Member

sboeuf commented Sep 20, 2019

At the moment, the code looks for the first device that is a virtio-blk device, and if it cannot find an EFI partition on it, it simply fails.
This is a problem when the first block device is not the actual boot device.
In order to solve this problem, we need the firmware to loop over the entire list of virtio-block devices until it can actually find one with an EFI partition.

@sboeuf
Copy link
Member Author

sboeuf commented Sep 20, 2019

/cc @rbradford

I quickly attempted to fix this problem but I realized we cannot use Vec in Rust core. I guess the solution might be to save the last device slot that was inspected and start again from there. This way, we don't need pci::search_bus to return a list of devices.
Anyway, I prefer if you solve it the way you think is the best but I just found this issue as the cloud-hypervisor CI was failing on the PR cloud-hypervisor/cloud-hypervisor#294.

@sboeuf sboeuf changed the title Support parsing multiple block device Support parsing multiple virtio-block device Sep 20, 2019
@sboeuf sboeuf changed the title Support parsing multiple virtio-block device Support parsing multiple virtio-blk device Sep 20, 2019
rbradford added a commit to rbradford/rust-hypervisor-firmware that referenced this issue Sep 23, 2019
This requires a refactoring of the PCI device detection to take a
closure to invoke over all the devices that match the vendor/device
pair.

Fixes: cloud-hypervisor#16

Signed-off-by: Rob Bradford <[email protected]>
rbradford added a commit that referenced this issue Sep 23, 2019
This requires a refactoring of the PCI device detection to take a
closure to invoke over all the devices that match the vendor/device
pair.

Fixes: #16

Signed-off-by: Rob Bradford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant