diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-11-10 03:33:56 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2014-11-25 08:57:26 -0500 |
commit | bf4bea8e9a9058319a19f8c2710a6f0ef2459983 (patch) | |
tree | 192e21f7d1509b7ea3303ac64bc21f9123bffcd4 /include/linux/kvm_host.h | |
parent | 07a9748c78cfc39b54f06125a216b67b9c8f09ed (diff) |
kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
This reverts commit 85c8555ff0 ("KVM: check for !is_zero_pfn() in
kvm_is_mmio_pfn()") and renames the function to kvm_is_reserved_pfn.
The problem being addressed by the patch above was that some ARM code
based the memory mapping attributes of a pfn on the return value of
kvm_is_mmio_pfn(), whose name indeed suggests that such pfns should
be mapped as device memory.
However, kvm_is_mmio_pfn() doesn't do quite what it says on the tin,
and the existing non-ARM users were already using it in a way which
suggests that its name should probably have been 'kvm_is_reserved_pfn'
from the beginning, e.g., whether or not to call get_page/put_page on
it etc. This means that returning false for the zero page is a mistake
and the patch above should be reverted.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ea53b04993f2..a6059bdf7b03 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -703,7 +703,7 @@ void kvm_arch_sync_events(struct kvm *kvm); | |||
703 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); | 703 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); |
704 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); | 704 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); |
705 | 705 | ||
706 | bool kvm_is_mmio_pfn(pfn_t pfn); | 706 | bool kvm_is_reserved_pfn(pfn_t pfn); |
707 | 707 | ||
708 | struct kvm_irq_ack_notifier { | 708 | struct kvm_irq_ack_notifier { |
709 | struct hlist_node link; | 709 | struct hlist_node link; |