Commit 36c1ed82 authored by Marc Zyngier's avatar Marc Zyngier Committed by Marcelo Tosatti

KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER

In order to avoid compilation failure when KVM is not compiled in,
guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER
and KVM_ARCH_WANT_MMU_NOTIFIER, like it is being done in the rest of
the KVM code.
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarChristoffer Dall <c.dall@virtualopensystems.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 2106a548
...@@ -306,7 +306,7 @@ struct kvm { ...@@ -306,7 +306,7 @@ struct kvm {
struct hlist_head irq_ack_notifier_list; struct hlist_head irq_ack_notifier_list;
#endif #endif
#ifdef KVM_ARCH_WANT_MMU_NOTIFIER #if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER)
struct mmu_notifier mmu_notifier; struct mmu_notifier mmu_notifier;
unsigned long mmu_notifier_seq; unsigned long mmu_notifier_seq;
long mmu_notifier_count; long mmu_notifier_count;
...@@ -780,7 +780,7 @@ struct kvm_stats_debugfs_item { ...@@ -780,7 +780,7 @@ struct kvm_stats_debugfs_item {
extern struct kvm_stats_debugfs_item debugfs_entries[]; extern struct kvm_stats_debugfs_item debugfs_entries[];
extern struct dentry *kvm_debugfs_dir; extern struct dentry *kvm_debugfs_dir;
#ifdef KVM_ARCH_WANT_MMU_NOTIFIER #if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER)
static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_seq) static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_seq)
{ {
if (unlikely(vcpu->kvm->mmu_notifier_count)) if (unlikely(vcpu->kvm->mmu_notifier_count))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment