lkml.org 
[lkml]   [2011]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] KVM: x86: Apply required parentheses in __check_direct_spte_mmio_pf
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(-)

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;

\
 
 \ /
  Last update: 2011-07-12 22:03    [W:0.166 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site