kvm: x86: Avoid runtime allocation of xsave buffer

Keep a per-VCPU xsave buffer for kvm_put/get_xsave instead of
continuously allocating and freeing it on state sync.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Jan Kiszka 2011-10-27 19:25:58 +02:00 committed by Marcelo Tosatti
parent 6b42494b21
commit fabacc0f79
2 changed files with 9 additions and 9 deletions

View file

@ -751,7 +751,8 @@ typedef struct CPUX86State {
uint32_t cpuid_svm_features;
bool tsc_valid;
int tsc_khz;
void *kvm_xsave_buf;
/* in order to simplify APIC support, we leave this pointer to the
user */
struct DeviceState *apic_state;