aboutsummaryrefslogtreecommitdiff
path: root/target/i386/cpu.h
diff options
context:
space:
mode:
authorLiran Alon <liran.alon@oracle.com>2018-09-14 03:38:26 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-02 19:09:12 +0200
commit5b8063c40672f19716705f1342dc32e5030c2f43 (patch)
treea2d1911c099c8bc40057e5071689daf2f344758c /target/i386/cpu.h
parentf8dc4c645ec2956a6cd97e0ca0fdd4753181f735 (diff)
i386: Compile CPUX86State xsave_buf only when support KVM or HVF
While at it, also rename var to indicate it is not used only in KVM. Reviewed-by: Nikita Leshchenko <nikita.leshchenko@oracle.com> Reviewed-by: Patrick Colp <patrick.colp@oracle.com> Signed-off-by: Liran Alon <liran.alon@oracle.com> Message-Id: <20180914003827.124570-2-liran.alon@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/cpu.h')
-rw-r--r--target/i386/cpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 6f0e4de740..730c06f80a 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1327,7 +1327,9 @@ typedef struct CPUX86State {
bool tsc_valid;
int64_t tsc_khz;
int64_t user_tsc_khz; /* for sanity check only */
- void *kvm_xsave_buf;
+#if defined(CONFIG_KVM) || defined(CONFIG_HVF)
+ void *xsave_buf;
+#endif
#if defined(CONFIG_HVF)
HVFX86EmulatorState *hvf_emul;
#endif