hypervisor: whpx: fix Arc::as_ptr usage

Arc::as_ptr() is only available as an associated function.

Fixes compile error:

  error[E0599]: no method named `as_ptr` found for struct
  `Arc<bindings::WHV_RUN_VP_EXIT_CONTEXT>` in the current scope

BUG=b:213151419
TEST=tools/run_tests --target=host --arch=win64 --build-only

Change-Id: Icc6753e4109b54ca507bb91bc89abd80fae098b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3707626
Reviewed-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Daniel Verkamp 2022-06-15 18:20:17 -07:00 committed by Chromeos LUCI
parent bc3204c738
commit 7afb3be9ca

View file

@ -713,7 +713,7 @@ impl Vcpu for WhpxVcpu {
}
// safe because we own this whpx virtual processor index, and assume the vm partition is still valid
let exit_context_ptr = self.last_exit_context.as_ptr();
let exit_context_ptr = Arc::as_ptr(&self.last_exit_context);
check_whpx!(unsafe {
WHvRunVirtualProcessor(
self.vm_partition.partition,