summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm/BUILD
diff options
context:
space:
mode:
authorlubinszARM <34124929+lubinszARM@users.noreply.github.com>2019-10-30 15:51:42 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-30 15:53:31 -0700
commitca933329fa46ce219b39f4cf8cba1754b36cc2c2 (patch)
treef9bf28a63dbe2dfb48e9d38be8d84d0cbfac9235 /pkg/sentry/platform/kvm/BUILD
parentca90dad0e21c758925968d217ad15a05015bd82c (diff)
support using KVM_MEM_READONLY for arm64 regions
On Arm platform, "setMemoryRegion" has extra permission checks. In virt/kvm/arm/mmu.c: kvm_arch_prepare_memory_region() .... if (writable && !(vma->vm_flags & VM_WRITE)) { ret = -EPERM; break; } .... So, for Arm platform, the "flags" for kvm_memory_region is required. And on x86 platform, the "flags" can be always set as '0'. Signed-off-by: Bin Lu <bin.lu@arm.com> COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/810 from lubinszARM:pr_setregion 8c99b19cfb0c859c6630a1cfff951db65fcf87ac PiperOrigin-RevId: 277602603
Diffstat (limited to 'pkg/sentry/platform/kvm/BUILD')
-rw-r--r--pkg/sentry/platform/kvm/BUILD1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/BUILD b/pkg/sentry/platform/kvm/BUILD
index 31fa48ec5..6803d488c 100644
--- a/pkg/sentry/platform/kvm/BUILD
+++ b/pkg/sentry/platform/kvm/BUILD
@@ -23,6 +23,7 @@ go_library(
"machine.go",
"machine_amd64.go",
"machine_amd64_unsafe.go",
+ "machine_arm64.go",
"machine_unsafe.go",
"physical_map.go",
"virtual_map.go",