KVM: PPC: Enable napping only for Book3s_64
authorAlexander Graf <agraf@suse.de>
Tue, 17 Aug 2010 20:08:39 +0000 (22:08 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:52:19 +0000 (10:52 +0200)
Before I incorrectly enabled napping also for BookE, which would result in
needless dcache flushes. Since we only need to force enable napping on
Book3s_64 because it doesn't go into MSR_POW otherwise, we can just #ifdef
that code to this particular platform.

Reported-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kernel/kvm.c

index 669d989be1d60762f18e520603a88d1d99fb22d4..428d0e538aec50880f23b8b097698572a2d2a01a 100644 (file)
@@ -582,8 +582,10 @@ static int __init kvm_guest_init(void)
        if (kvm_para_has_feature(KVM_FEATURE_MAGIC_PAGE))
                kvm_use_magic_page();
 
+#ifdef CONFIG_PPC_BOOK3S_64
        /* Enable napping */
        powersave_nap = 1;
+#endif
 
 free_tmp:
        kvm_free_tmp();