commit | 906a38fac320db548729c75ed8ff2a86b01920ba | [log] [tgz] |
---|---|---|
author | Daniel Verkamp <dverkamp@chromium.org> | Tue Feb 22 13:58:53 2022 -0800 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Mar 07 23:24:27 2022 +0000 |
tree | 13060a89913a1e9cec86e2bfc72eb5cd61ee4be3 | |
parent | ee124409536764b68158f070a011bc3b3a4aab93 [diff] |
devices: pci: return Result from PciAddress::from_string Add error checking so invalid user input does not get silently ignored and converted into bogus addresses. Also add a PciAddress::new() function that accepts numeric values and checks their ranges as a helper for the string parsing function as well as for general use in other cases. BUG=None TEST=cargo test -p devices pci_address Change-Id: I1131716bfd99e1819e7630021048482c2397b137 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3475440 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.