diff mbox

KVM: x86: Apply required parentheses in __check_direct_spte_mmio_pf

Message ID 4E1CA7D6.4090203@web.de (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka July 12, 2011, 8 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Comparison takes precedence over bitwise &, but the latter needs to be
evaluated first here.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Avi, how's your 32-bit buildbot?

 arch/x86/kvm/mmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Avi Kivity July 13, 2011, 1:25 p.m. UTC | #1
On 07/12/2011 11:00 PM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> Comparison takes precedence over bitwise&, but the latter needs to be
> evaluated first here.
>

Thanks, applied.

> Avi, how's your 32-bit buildbot?

Seems to be working perfectly.
diff mbox

Patch

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d3d188e..9335e1b 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -448,7 +448,7 @@  static bool __check_direct_spte_mmio_pf(u64 spte)
 
 	/* It is valid if the spte is being zapped. */
 	if (sspte.spte_low == 0ull &&
-	      sspte.spte_high & high_mmio_mask == high_mmio_mask)
+	    (sspte.spte_high & high_mmio_mask) == high_mmio_mask)
 		return true;
 
 	return false;