mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
kvm: Fix assert check
For handling HYPERV hypercalls, the exit reason needs to be checked against KVM_EXIT_HYPERV. TEST=Compiled. Change-Id: Ib11d558e25e2c5fd037e1bc6ca88a454e957a1c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3639149 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Vaibhav Nagarnaik <vnagarnaik@google.com>
This commit is contained in:
parent
7f1b94e96a
commit
b929c1e2be
1 changed files with 1 additions and 1 deletions
|
@ -1028,7 +1028,7 @@ impl Vcpu for KvmVcpu {
|
|||
// kernel told us how large it was.
|
||||
let run = unsafe { &mut *(self.run_mmap.as_ptr() as *mut kvm_run) };
|
||||
// Verify that the handler is called in the right context.
|
||||
assert!(run.exit_reason == KVM_EXIT_HYPERV_HCALL);
|
||||
assert!(run.exit_reason == KVM_EXIT_HYPERV);
|
||||
// Safe because the exit_reason (which comes from the kernel) told us which
|
||||
// union field to use.
|
||||
let hyperv = unsafe { &mut run.__bindgen_anon_1.hyperv };
|
||||
|
|
Loading…
Reference in a new issue