diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-27 05:03:33 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-27 05:03:33 -0400 |
commit | e77d99d4a4ec761ad061f1ec890c71040a92efe3 (patch) | |
tree | aea6fe2ee5bb6e699045a3629b48208f3e2a26b6 /virt/kvm/kvm_main.c | |
parent | bb0ca6acd466af55c95b7ce508f29e23a24cabd9 (diff) | |
parent | 0496daa5cf99741ce8db82686b4c7446a37feabb (diff) |
Merge tag 'kvm-arm-for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-next
Changes for KVM for arm/arm64 for 3.18
This includes a bunch of changes:
- Support read-only memory slots on arm/arm64
- Various changes to fix Sparse warnings
- Correctly detect write vs. read Stage-2 faults
- Various VGIC cleanups and fixes
- Dynamic VGIC data strcuture sizing
- Fix SGI set_clear_pend offset bug
- Fix VTTBR_BADDR Mask
- Correctly report the FSC on Stage-2 faults
Conflicts:
virt/kvm/eventfd.c
[duplicate, different patch where the kvm-arm version broke x86.
The kvm tree instead has the right one]
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a1cf53ee0d28..39a02fbdb572 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1095,9 +1095,9 @@ EXPORT_SYMBOL_GPL(gfn_to_hva); | |||
1095 | * If writable is set to false, the hva returned by this function is only | 1095 | * If writable is set to false, the hva returned by this function is only |
1096 | * allowed to be read. | 1096 | * allowed to be read. |
1097 | */ | 1097 | */ |
1098 | unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable) | 1098 | unsigned long gfn_to_hva_memslot_prot(struct kvm_memory_slot *slot, |
1099 | gfn_t gfn, bool *writable) | ||
1099 | { | 1100 | { |
1100 | struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn); | ||
1101 | unsigned long hva = __gfn_to_hva_many(slot, gfn, NULL, false); | 1101 | unsigned long hva = __gfn_to_hva_many(slot, gfn, NULL, false); |
1102 | 1102 | ||
1103 | if (!kvm_is_error_hva(hva) && writable) | 1103 | if (!kvm_is_error_hva(hva) && writable) |
@@ -1106,6 +1106,13 @@ unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable) | |||
1106 | return hva; | 1106 | return hva; |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable) | ||
1110 | { | ||
1111 | struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn); | ||
1112 | |||
1113 | return gfn_to_hva_memslot_prot(slot, gfn, writable); | ||
1114 | } | ||
1115 | |||
1109 | static int kvm_read_hva(void *data, void __user *hva, int len) | 1116 | static int kvm_read_hva(void *data, void __user *hva, int len) |
1110 | { | 1117 | { |
1111 | return __copy_from_user(data, hva, len); | 1118 | return __copy_from_user(data, hva, len); |