summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ring0
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-11 01:54:24 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-11 01:54:24 +0000
commit75e892c80dce1be97d1a98a368e6e0ae47768e86 (patch)
tree2d46d2eea2e1e1675473c06eedaf8ccba094fcbd /pkg/sentry/platform/ring0
parenta210c0fa92431d8cc1af544ccb7cbf2c7dd19866 (diff)
parentb436b9717eab8b0b5c39c931bca5f000df079836 (diff)
Merge release-20200522.0-127-gb436b9717 (automated)
Diffstat (limited to 'pkg/sentry/platform/ring0')
-rw-r--r--pkg/sentry/platform/ring0/entry_impl_arm64.s14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkg/sentry/platform/ring0/entry_impl_arm64.s b/pkg/sentry/platform/ring0/entry_impl_arm64.s
index ea202219a..2a19337d0 100644
--- a/pkg/sentry/platform/ring0/entry_impl_arm64.s
+++ b/pkg/sentry/platform/ring0/entry_impl_arm64.s
@@ -426,9 +426,17 @@ mmio_exit:
MOVD R1, CPU_LAZY_VFP(RSV_REG)
VFP_DISABLE
- // MMIO_EXIT.
- MOVD $0, R9
- MOVD R0, 0xffff000000001000(R9)
+ // Trigger MMIO_EXIT/_KVM_HYPERCALL_VMEXIT.
+ //
+ // To keep it simple, I used the address of exception table as the
+ // MMIO base address, so that I can trigger a MMIO-EXIT by forcibly writing
+ // a read-only space.
+ // Also, the length is engough to match a sufficient number of hypercall ID.
+ // Then, in host user space, I can calculate this address to find out
+ // which hypercall.
+ MRS VBAR_EL1, R9
+ MOVD R0, 0x0(R9)
+
RET
// HaltAndResume halts execution and point the pointer to the resume function.