target-i386: kvm: Allocate kvm_msrs struct once per VCPU
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 16 Dec 2015 19:06:42 +0000 (17:06 -0200)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 23 May 2016 22:47:37 +0000 (19:47 -0300)
commitd71b62a165b6af463f376bd398cfc1aec4e2f213
treedf812ef1df50f2340f2df90094ceebcfbfe8a174
parent42ecabaae16c0054dde6d8b0fdf90a8c7cce270d
target-i386: kvm: Allocate kvm_msrs struct once per VCPU

Instead of using 2400 bytes in the stack for 150 MSR entries in
kvm_get_msrs() and kvm_put_msrs(), allocate a buffer once for
each VCPU.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target-i386/cpu.h
target-i386/kvm.c