diff options
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/vgic.c | 6 | ||||
-rw-r--r-- | virt/kvm/eventfd.c | 1 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 11 |
3 files changed, 12 insertions, 6 deletions
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 3ee3ce06bbec..eeb23b37f87c 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c | |||
@@ -1613,7 +1613,7 @@ out: | |||
1613 | return ret; | 1613 | return ret; |
1614 | } | 1614 | } |
1615 | 1615 | ||
1616 | static bool vgic_ioaddr_overlap(struct kvm *kvm) | 1616 | static int vgic_ioaddr_overlap(struct kvm *kvm) |
1617 | { | 1617 | { |
1618 | phys_addr_t dist = kvm->arch.vgic.vgic_dist_base; | 1618 | phys_addr_t dist = kvm->arch.vgic.vgic_dist_base; |
1619 | phys_addr_t cpu = kvm->arch.vgic.vgic_cpu_base; | 1619 | phys_addr_t cpu = kvm->arch.vgic.vgic_cpu_base; |
@@ -2029,8 +2029,8 @@ static const struct of_device_id vgic_ids[] = { | |||
2029 | int kvm_vgic_hyp_init(void) | 2029 | int kvm_vgic_hyp_init(void) |
2030 | { | 2030 | { |
2031 | const struct of_device_id *matched_id; | 2031 | const struct of_device_id *matched_id; |
2032 | int (*vgic_probe)(struct device_node *,const struct vgic_ops **, | 2032 | const int (*vgic_probe)(struct device_node *,const struct vgic_ops **, |
2033 | const struct vgic_params **); | 2033 | const struct vgic_params **); |
2034 | struct device_node *vgic_node; | 2034 | struct device_node *vgic_node; |
2035 | int ret; | 2035 | int ret; |
2036 | 2036 | ||
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 3c5981c87c3f..0c712a779b44 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/seqlock.h> | 36 | #include <linux/seqlock.h> |
37 | #include <trace/events/kvm.h> | 37 | #include <trace/events/kvm.h> |
38 | 38 | ||
39 | #include "irq.h" | ||
40 | #include "iodev.h" | 39 | #include "iodev.h" |
41 | 40 | ||
42 | #ifdef CONFIG_HAVE_KVM_IRQFD | 41 | #ifdef CONFIG_HAVE_KVM_IRQFD |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index db57363cc287..278232025129 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1089,9 +1089,9 @@ EXPORT_SYMBOL_GPL(gfn_to_hva); | |||
1089 | * If writable is set to false, the hva returned by this function is only | 1089 | * If writable is set to false, the hva returned by this function is only |
1090 | * allowed to be read. | 1090 | * allowed to be read. |
1091 | */ | 1091 | */ |
1092 | unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable) | 1092 | unsigned long gfn_to_hva_memslot_prot(struct kvm_memory_slot *slot, |
1093 | gfn_t gfn, bool *writable) | ||
1093 | { | 1094 | { |
1094 | struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn); | ||
1095 | unsigned long hva = __gfn_to_hva_many(slot, gfn, NULL, false); | 1095 | unsigned long hva = __gfn_to_hva_many(slot, gfn, NULL, false); |
1096 | 1096 | ||
1097 | if (!kvm_is_error_hva(hva) && writable) | 1097 | if (!kvm_is_error_hva(hva) && writable) |
@@ -1100,6 +1100,13 @@ unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable) | |||
1100 | return hva; | 1100 | return hva; |
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable) | ||
1104 | { | ||
1105 | struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn); | ||
1106 | |||
1107 | return gfn_to_hva_memslot_prot(slot, gfn, writable); | ||
1108 | } | ||
1109 | |||
1103 | static int kvm_read_hva(void *data, void __user *hva, int len) | 1110 | static int kvm_read_hva(void *data, void __user *hva, int len) |
1104 | { | 1111 | { |
1105 | return __copy_from_user(data, hva, len); | 1112 | return __copy_from_user(data, hva, len); |