diff --git a/hypervisor/src/kvm/mod.rs b/hypervisor/src/kvm/mod.rs index f94f2cf2d..d818ec7c6 100644 --- a/hypervisor/src/kvm/mod.rs +++ b/hypervisor/src/kvm/mod.rs @@ -1029,7 +1029,7 @@ impl cpu::Vcpu for KvmVcpu { // we can calculate the id based on the offset in the structure. reg_list.retain(|regid| *regid != 0); - reg_list.as_slice().to_vec().sort(); + reg_list.as_slice().to_vec().sort_unstable(); reg_list.retain(|regid| is_system_register(*regid));