public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: fix typo of || to && in arch/x86/kvm/vmx.c
@ 2009-02-17  5:17 Wei Yongjun
  2009-02-17 18:18 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2009-02-17  5:17 UTC (permalink / raw)
  To: Avi Kivity, kvm, yjwei

Fix the typo of || to &&.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 arch/x86/kvm/vmx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6259d74..3f3cab2 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1813,7 +1813,7 @@ static bool stack_segment_valid(struct kvm_vcpu *vcpu)
 	vmx_get_segment(vcpu, &ss, VCPU_SREG_SS);
 	ss_rpl = ss.selector & SELECTOR_RPL_MASK;
 
-	if ((ss.type != 3) || (ss.type != 7))
+	if ((ss.type != 3) && (ss.type != 7))
 		return false;
 	if (!ss.s)
 		return false;
@@ -1856,7 +1856,7 @@ static bool tr_valid(struct kvm_vcpu *vcpu)
 
 	if (tr.selector & SELECTOR_TI_MASK)	/* TI = 1 */
 		return false;
-	if ((tr.type != 3) || (tr.type != 11)) /* TODO: Check if guest is in IA32e mode */
+	if ((tr.type != 3) && (tr.type != 11)) /* TODO: Check if guest is in IA32e mode */
 		return false;
 	if (!tr.present)
 		return false;
-- 
1.5.3.8





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-17 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17  5:17 [PATCH] kvm: fix typo of || to && in arch/x86/kvm/vmx.c Wei Yongjun
2009-02-17 18:18 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox