From patchwork Thu Nov 21 13:28:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 293136 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1E0C42C00E7 for ; Fri, 22 Nov 2013 00:29:49 +1100 (EST) Received: from localhost ([::1]:33177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjUKI-0000pt-Ii for incoming@patchwork.ozlabs.org; Thu, 21 Nov 2013 08:29:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjUJb-0000MB-N3 for qemu-devel@nongnu.org; Thu, 21 Nov 2013 08:29:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjUJR-0003PX-20 for qemu-devel@nongnu.org; Thu, 21 Nov 2013 08:29:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjUJQ-0003OF-QL for qemu-devel@nongnu.org; Thu, 21 Nov 2013 08:28:52 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALDSngV015335 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Nov 2013 08:28:50 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-4-228.tlv.redhat.com [10.35.4.228]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rALDSmOJ001573; Thu, 21 Nov 2013 08:28:48 -0500 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id CB3DF18D475; Thu, 21 Nov 2013 15:28:47 +0200 (IST) From: Gleb Natapov To: Anthony Liguori Date: Thu, 21 Nov 2013 15:28:38 +0200 Message-Id: <0fd53fec92c5b636ef4774fe130f6029fde9fc3c.1385040432.git.gleb@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 1/3] KVM: x86: fix typo in KVM_GET_XCRS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Paolo Bonzini Only the first item of the array was ever looked at. No practical effect, but still worth fixing. Signed-off-by: Paolo Bonzini Signed-off-by: Gleb Natapov --- target-i386/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 749aa09..27071e3 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1314,8 +1314,8 @@ static int kvm_get_xcrs(X86CPU *cpu) for (i = 0; i < xcrs.nr_xcrs; i++) { /* Only support xcr0 now */ - if (xcrs.xcrs[0].xcr == 0) { - env->xcr0 = xcrs.xcrs[0].value; + if (xcrs.xcrs[i].xcr == 0) { + env->xcr0 = xcrs.xcrs[i].value; break; } }