diff options
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 93927bd93b..1762c2e184 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1655,7 +1655,10 @@ static int kvm_get_msrs(X86CPU *cpu) } } - msr_data.info.nmsrs = n; + msr_data.info = (struct kvm_msrs) { + .nmsrs = n, + }; + ret = kvm_vcpu_ioctl(CPU(cpu), KVM_GET_MSRS, &msr_data); if (ret < 0) { return ret; |