Skip to contentSkip to conversation

[6018] Initialize msr list size properly in KVM

Qemu-devel Anthony Liguori 1 participant 1 message Dec 13, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 6018

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6018
Author:   aliguori
Date:     2008-12-13 20:49:31 +0000 (Sat, 13 Dec 2008)

Log Message:
-----------
Initialize msr list size properly in KVM

Hollis Blanchard noticed that the last commit was not sufficient. We also need to initialize the msr size in our newly allocated list.

Modified Paths:
--------------

    trunk/target-i386/kvm.c

Modified: trunk/target-i386/kvm.c
===================================================================

target-i386/kvm.c +1 -0
@@ -100,6 +100,7 @@
         if (kvm_msr_list == NULL)
             return 0;
 
+        kvm_msr_list->nmsrs = msr_list.nmsrs;
         ret = kvm_ioctl(env->kvm_state, KVM_GET_MSR_INDEX_LIST, kvm_msr_list);
         if (ret >= 0) {
             int i;