diff options
author | Keiichi Watanabe <keiichiw@chromium.org> | 2020-01-28 18:56:09 +0900 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-15 09:18:09 +0000 |
commit | 7c43b32a36151b23a4a84144bfca0dade4e64ade (patch) | |
tree | d6614a85e4c730942409cfe406387dcef6d99470 /devices | |
parent | a2d845a569494a3924e587b7d63487832cf55ab8 (diff) | |
download | crosvm-7c43b32a36151b23a4a84144bfca0dade4e64ade.tar crosvm-7c43b32a36151b23a4a84144bfca0dade4e64ade.tar.gz crosvm-7c43b32a36151b23a4a84144bfca0dade4e64ade.tar.bz2 crosvm-7c43b32a36151b23a4a84144bfca0dade4e64ade.tar.lz crosvm-7c43b32a36151b23a4a84144bfca0dade4e64ade.tar.xz crosvm-7c43b32a36151b23a4a84144bfca0dade4e64ade.tar.zst crosvm-7c43b32a36151b23a4a84144bfca0dade4e64ade.zip |
crosvm: virtio: Use larger IDs for crosvm-specific devices
Stop using 30 and 31 as device IDs of virtio-wl and virtio-tpm, as these numbers were reserved for virtio-video devices in the upstream [1]. Instead, use integers from 63, which is the largest number we can use for a virtio device ID. Note that this CL must be merged after kernels with CL:2024135 landed. [1]: https://github.com/oasis-tcs/virtio-spec/issues/67 BUG=chromium:1031512 TEST=Check if /dev/wl0 exists on ARCVM with CL:2024135 Change-Id: I267c7702d3c28642492f560170a0d1d9d6523c31 Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2025127 Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> Commit-Queue: Fergus Dall <sidereal@google.com>
Diffstat (limited to 'devices')
-rw-r--r-- | devices/src/virtio/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/devices/src/virtio/mod.rs b/devices/src/virtio/mod.rs index a1701f5..7716fe0 100644 --- a/devices/src/virtio/mod.rs +++ b/devices/src/virtio/mod.rs @@ -75,8 +75,9 @@ const TYPE_IOMMU: u32 = 23; const TYPE_FS: u32 = 26; const TYPE_PMEM: u32 = 27; // Additional types invented by crosvm -const TYPE_WL: u32 = 30; -const TYPE_TPM: u32 = 31; +const MAX_VIRTIO_DEVICE_ID: u32 = 63; +const TYPE_WL: u32 = MAX_VIRTIO_DEVICE_ID; +const TYPE_TPM: u32 = MAX_VIRTIO_DEVICE_ID - 1; const VIRTIO_F_VERSION_1: u32 = 32; |