public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: ||/&& typo
@ 2009-02-17 14:49 Roel Kluin
  2009-02-17 15:16 ` Roel Kluin
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2009-02-17 14:49 UTC (permalink / raw)
  To: avi; +Cc: kvm, jvpeetz, Andrew Morton

This was also reported by Jörg-Volker Peetz here:
http://lkml.org/lkml/2009/2/16/325
------------------->8---------------------8<-----------------------
Since ss.type is always either not 3 or not 7.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6259d74..7c4cca1 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;

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

* Re: [PATCH] kvm: ||/&& typo
  2009-02-17 14:49 [PATCH] kvm: ||/&& typo Roel Kluin
@ 2009-02-17 15:16 ` Roel Kluin
  2009-02-17 18:16   ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2009-02-17 15:16 UTC (permalink / raw)
  To: avi; +Cc: kvm, jvpeetz, Andrew Morton

Roel Kluin wrote:
> This was also reported by Jörg-Volker Peetz here:
> http://lkml.org/lkml/2009/2/16/325

Please use this one, It gives Jörg-Volker Peetz credits, and I
missed another issue just below.

------------------->8---------------------8<-----------------------
Since ss.type is always either not 3 or not 7.

Reported-by: Jörg-Volker Peetz <jvpeetz@web.de>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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;

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

* Re: [PATCH] kvm: ||/&& typo
  2009-02-17 15:16 ` Roel Kluin
@ 2009-02-17 18:16   ` Avi Kivity
  0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-02-17 18:16 UTC (permalink / raw)
  To: Roel Kluin; +Cc: kvm, jvpeetz, Andrew Morton

Roel Kluin wrote:
> Roel Kluin wrote:
>   
>> This was also reported by Jörg-Volker Peetz here:
>> http://lkml.org/lkml/2009/2/16/325
>>     
>
> Please use this one, It gives Jörg-Volker Peetz credits, and I
> missed another issue just below.
>
>   

This is already fixed in kvm.git.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17 14:49 [PATCH] kvm: ||/&& typo Roel Kluin
2009-02-17 15:16 ` Roel Kluin
2009-02-17 18:16   ` Avi Kivity

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