mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
Check wstatus in check_raw_capability.
The winfo field is only populated with capability bits if wstatus is nonzero. If wstatus is zero, those bits are re-used and indicate why HAXM is not usable. Bug: 357064526 Test: tested locally Change-Id: I9cb0c82267095e4f89c879d48d8a3b7c00dfe36c Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5792562 Commit-Queue: Idan Raiter <idanr@google.com> Commit-Queue: Judson Powers <judsonp@google.com> Auto-Submit: Judson Powers <judsonp@google.com> Reviewed-by: Idan Raiter <idanr@google.com>
This commit is contained in:
parent
31eda0ce99
commit
b75642742d
1 changed files with 7 additions and 0 deletions
|
@ -122,6 +122,13 @@ impl HaxmVm {
|
|||
return false;
|
||||
}
|
||||
|
||||
// If wstatus is zero, HAXM is not usable.
|
||||
// In this case, the winfo bits indicate why, rather than communicating capability
|
||||
// information.
|
||||
if capability_info.wstatus == 0 {
|
||||
return false;
|
||||
}
|
||||
|
||||
(cap & capability_info.winfo as u32) != 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue