diff options
author | lubinszARM <34124929+lubinszARM@users.noreply.github.com> | 2019-10-30 15:51:42 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-30 15:53:31 -0700 |
commit | ca933329fa46ce219b39f4cf8cba1754b36cc2c2 (patch) | |
tree | f9bf28a63dbe2dfb48e9d38be8d84d0cbfac9235 /test | |
parent | ca90dad0e21c758925968d217ad15a05015bd82c (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 'test')
0 files changed, 0 insertions, 0 deletions