summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-04-01 16:34:31 +0300
committerAvi Kivity <avi@qumranet.com>2007-05-03 10:52:28 +0300
commitb8836737d92c139be770eae3d6574e33d1224caf (patch)
tree9c03b429fda12e6fbdc97469eb039076aa397744 /include/linux/kvm.h
parente8207547d2f7b2f557bdb73015c1f74c32474438 (diff)
downloadlinux-b8836737d92c139be770eae3d6574e33d1224caf.tar.gz
linux-b8836737d92c139be770eae3d6574e33d1224caf.tar.bz2
linux-b8836737d92c139be770eae3d6574e33d1224caf.zip
KVM: Add fpu get/set operations
These are really helpful when migrating an floating point app to another machine. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index da9b23fa4b6c..07bf353eeb6f 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -126,6 +126,21 @@ struct kvm_regs {
__u64 rip, rflags;
};
+/* for KVM_GET_FPU and KVM_SET_FPU */
+struct kvm_fpu {
+ __u8 fpr[8][16];
+ __u16 fcw;
+ __u16 fsw;
+ __u8 ftwx; /* in fxsave format */
+ __u8 pad1;
+ __u16 last_opcode;
+ __u64 last_ip;
+ __u64 last_dp;
+ __u8 xmm[16][16];
+ __u32 mxcsr;
+ __u32 pad2;
+};
+
struct kvm_segment {
__u64 base;
__u32 limit;
@@ -285,5 +300,7 @@ struct kvm_signal_mask {
#define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs)
#define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid)
#define KVM_SET_SIGNAL_MASK _IOW(KVMIO, 0x8b, struct kvm_signal_mask)
+#define KVM_GET_FPU _IOR(KVMIO, 0x8c, struct kvm_fpu)
+#define KVM_SET_FPU _IOW(KVMIO, 0x8d, struct kvm_fpu)
#endif