diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-09-17 17:56:18 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-10-10 07:07:37 -0400 |
commit | c40f2f8ff833eddc02cb599ef6e5a162223449ba (patch) | |
tree | a2ec51729aae4cc741dca4c264a723362b32db14 /virt | |
parent | 37b544087ef3f65ca68465ba39291a07195dac26 (diff) |
arm/arm64: KVM: add 'writable' parameter to kvm_phys_addr_ioremap
Add support for read-only MMIO passthrough mappings by adding a
'writable' parameter to kvm_phys_addr_ioremap. For the moment,
mappings will be read-write even if 'writable' is false, but once
the definition of PAGE_S2_DEVICE gets changed, those mappings will
be created read-only.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/vgic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 862967852d5a..382fb5a88b9c 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c | |||
@@ -1899,7 +1899,8 @@ int kvm_vgic_init(struct kvm *kvm) | |||
1899 | } | 1899 | } |
1900 | 1900 | ||
1901 | ret = kvm_phys_addr_ioremap(kvm, kvm->arch.vgic.vgic_cpu_base, | 1901 | ret = kvm_phys_addr_ioremap(kvm, kvm->arch.vgic.vgic_cpu_base, |
1902 | vgic->vcpu_base, KVM_VGIC_V2_CPU_SIZE); | 1902 | vgic->vcpu_base, KVM_VGIC_V2_CPU_SIZE, |
1903 | true); | ||
1903 | if (ret) { | 1904 | if (ret) { |
1904 | kvm_err("Unable to remap VGIC CPU to VCPU\n"); | 1905 | kvm_err("Unable to remap VGIC CPU to VCPU\n"); |
1905 | goto out; | 1906 | goto out; |