From: Xiao Guangrong <[email protected]>

Fix:
arch/x86/kvm/mmu.c: In function 'kvm_mmu_pte_write':
arch/x86/kvm/mmu.c:2908: warning: suggest parentheses around operand of '!'
or change '&' to '&&' or '!' to '~'

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 1a8f43f..0dcc95e 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2904,8 +2904,8 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
                        entry = *spte;
                        mmu_pte_write_zap_pte(vcpu, sp, spte);
                        if (gentry &&
-                             !(sp->role.word ^ vcpu->arch.mmu.base_role.word)
-                             & mask.word)
+                             !((sp->role.word ^ vcpu->arch.mmu.base_role.word)
+                             & mask.word))
                                mmu_pte_write_new_pte(vcpu, sp, spte, &gentry);
                        if (!remote_flush && need_remote_flush(entry, *spte))
                                remote_flush = true;
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to