diff options
author | Avi Kivity <avi@qumranet.com> | 2007-04-01 09:34:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-05-03 03:52:28 -0400 |
commit | b8836737d92c139be770eae3d6574e33d1224caf (patch) | |
tree | 9c03b429fda12e6fbdc97469eb039076aa397744 /include/linux | |
parent | e8207547d2f7b2f557bdb73015c1f74c32474438 (diff) |
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')
-rw-r--r-- | include/linux/kvm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index da9b23fa4b6..07bf353eeb6 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -126,6 +126,21 @@ struct kvm_regs { | |||
126 | __u64 rip, rflags; | 126 | __u64 rip, rflags; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | /* for KVM_GET_FPU and KVM_SET_FPU */ | ||
130 | struct kvm_fpu { | ||
131 | __u8 fpr[8][16]; | ||
132 | __u16 fcw; | ||
133 | __u16 fsw; | ||
134 | __u8 ftwx; /* in fxsave format */ | ||
135 | __u8 pad1; | ||
136 | __u16 last_opcode; | ||
137 | __u64 last_ip; | ||
138 | __u64 last_dp; | ||
139 | __u8 xmm[16][16]; | ||
140 | __u32 mxcsr; | ||
141 | __u32 pad2; | ||
142 | }; | ||
143 | |||
129 | struct kvm_segment { | 144 | struct kvm_segment { |
130 | __u64 base; | 145 | __u64 base; |
131 | __u32 limit; | 146 | __u32 limit; |
@@ -285,5 +300,7 @@ struct kvm_signal_mask { | |||
285 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) | 300 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) |
286 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) | 301 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) |
287 | #define KVM_SET_SIGNAL_MASK _IOW(KVMIO, 0x8b, struct kvm_signal_mask) | 302 | #define KVM_SET_SIGNAL_MASK _IOW(KVMIO, 0x8b, struct kvm_signal_mask) |
303 | #define KVM_GET_FPU _IOR(KVMIO, 0x8c, struct kvm_fpu) | ||
304 | #define KVM_SET_FPU _IOW(KVMIO, 0x8d, struct kvm_fpu) | ||
288 | 305 | ||
289 | #endif | 306 | #endif |