virtmgr: Fix vm_id and pas_id types
The vm_id is supposed to be 2 bytes and the pas_id is supposed to be 4
bytes.
Bug: 380912007
Change-Id: I4e0f1c72e2efbecf75b11dcd0bcfec55653ee86c
diff --git a/android/virtmgr/src/crosvm.rs b/android/virtmgr/src/crosvm.rs
index 00858cb..e13eb61 100644
--- a/android/virtmgr/src/crosvm.rs
+++ b/android/virtmgr/src/crosvm.rs
@@ -1041,8 +1041,8 @@
// When this mode is enabled, two hypervisor specific IDs are expected to be packed
// into the instance ID. We extract them here and pass along to crosvm so they can be
// given to the hypervisor driver via an ioctl.
- let vm_id = u32::from_le_bytes(config.instance_id[60..64].try_into().unwrap());
- let pas_id = u16::from_le_bytes(config.instance_id[58..60].try_into().unwrap());
+ let pas_id = u32::from_le_bytes(config.instance_id[60..64].try_into().unwrap());
+ let vm_id = u16::from_le_bytes(config.instance_id[58..60].try_into().unwrap());
command.arg("--hypervisor").arg(
format!("gunyah[device=/dev/gunyah,qcom_trusted_vm_id={vm_id},qcom_trusted_vm_pas_id={pas_id}]"),
);