]> git.proxmox.com Git - qemu.git/commitdiff
KVM: x86: fix typo in KVM_GET_XCRS
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Oct 2013 14:47:52 +0000 (16:47 +0200)
committerGleb Natapov <gleb@redhat.com>
Tue, 5 Nov 2013 07:34:34 +0000 (09:34 +0200)
Only the first item of the array was ever looked at.  No
practical effect, but still worth fixing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
target-i386/kvm.c

index 749aa09a21a69951ac6647ac9595279ac68a18f2..27071e3342fe5e4cb6aa309d93d40be775249a11 100644 (file)
@@ -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;
         }
     }