From patchwork Tue Feb 17 05:17:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 7564 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1H5InMW021950 for ; Tue, 17 Feb 2009 05:18:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479AbZBQFSF (ORCPT ); Tue, 17 Feb 2009 00:18:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754431AbZBQFSE (ORCPT ); Tue, 17 Feb 2009 00:18:04 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:53474 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752507AbZBQFSD (ORCPT ); Tue, 17 Feb 2009 00:18:03 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 5951D170143; Tue, 17 Feb 2009 13:24:01 +0800 (CST) Received: from fnst.cn.fujitsu.com (localhost.localdomain [127.0.0.1]) by tang.cn.fujitsu.com (8.13.1/8.13.1) with ESMTP id n1H5HrPs031052; Tue, 17 Feb 2009 13:17:53 +0800 Received: from [127.0.0.1] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTP id 457D1D44B1; Tue, 17 Feb 2009 13:17:08 +0800 (CST) Message-ID: <499A486E.7040209@cn.fujitsu.com> Date: Tue, 17 Feb 2009 13:17:34 +0800 From: Wei Yongjun User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Avi Kivity , kvm@vger.kernel.org, yjwei@cn.fujitsu.com Subject: [PATCH] kvm: fix typo of || to && in arch/x86/kvm/vmx.c Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Fix the typo of || to &&. Signed-off-by: Wei Yongjun --- 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;