Add TryFrom implementation for PciClassCode

This is useful for example when parsing numeric PCI class code values
from the command line.

BUG=b:167947780
TEST=None

Change-Id: I55515af2fa7e38bc26f4c2eebb083f1e45aebf22
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3245496
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
1 file changed
tree: a846bd4ba205a0ea10410b14d568ae7c7ef2fb71
  1. .cargo/
  2. .devcontainer/
  3. .github/
  4. aarch64/
  5. acpi_tables/
  6. arch/
  7. assertions/
  8. audio_streams/
  9. base/
  10. bin/
  11. bit_field/
  12. ci/
  13. common/
  14. cros_async/
  15. crosvm_plugin/
  16. data_model/
  17. devices/
  18. disk/
  19. docs/
  20. enumn/
  21. fuse/
  22. fuzz/
  23. gpu_display/
  24. hypervisor/
  25. integration_tests/
  26. io_uring/
  27. kernel_cmdline/
  28. kernel_loader/
  29. kvm/
  30. kvm_sys/
  31. libcras_stub/
  32. libcrosvm_control/
  33. libvda/
  34. linux_input_sys/
  35. net_sys/
  36. net_util/
  37. power_monitor/
  38. protos/
  39. qcow_utils/
  40. resources/
  41. rutabaga_gfx/
  42. seccomp/
  43. src/
  44. sync/
  45. sys_util/
  46. system_api_stub/
  47. tests/
  48. third_party/
  49. tools/
  50. tpm2/
  51. tpm2-sys/
  52. usb_sys/
  53. usb_util/
  54. vfio_sys/
  55. vhost/
  56. virtio_sys/
  57. vm_control/
  58. vm_memory/
  59. x86_64/
  60. .dockerignore
  61. .gitignore
  62. .gitmodules
  63. .rustfmt.toml
  64. ARCHITECTURE.md
  65. Cargo.toml
  66. CONTRIBUTING.md
  67. LICENSE
  68. logo.svg
  69. navbar.md
  70. OWNERS
  71. README.md
  72. run_tests
  73. rust-toolchain
  74. setup_cros_cargo.sh
  75. test_all
  76. unblocked_terms.txt
README.md

crosvm - The Chrome OS Virtual Machine Monitor

Logo

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 devies, such as the virtio standard.

crosvm is currently used to run Linux/Android guests on Chrome OS devices.