diff options
author | Izik Eidus <izike@qumranet.com> | 2008-03-24 21:14:53 (GMT) |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 09:00:39 (GMT) |
commit | 37817f2982d0f559f90cecc66e150dd9d2c2df05 (patch) | |
tree | 45114b5720d7a13bdbe48cc6a75dc6de03d6fcd2 /arch/x86/kvm/tss.h | |
parent | 2e4d2653497856b102c90153f970c9e344ba96c6 (diff) | |
download | linux-37817f2982d0f559f90cecc66e150dd9d2c2df05.tar.xz |
KVM: x86: hardware task switching support
This emulates the x86 hardware task switch mechanism in software, as it is
unsupported by either vmx or svm. It allows operating systems which use it,
like freedos, to run as kvm guests.
Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/tss.h')
-rw-r--r-- | arch/x86/kvm/tss.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/arch/x86/kvm/tss.h b/arch/x86/kvm/tss.h new file mode 100644 index 0000000..622aa10 --- /dev/null +++ b/arch/x86/kvm/tss.h @@ -0,0 +1,59 @@ +#ifndef __TSS_SEGMENT_H +#define __TSS_SEGMENT_H + +struct tss_segment_32 { + u32 prev_task_link; + u32 esp0; + u32 ss0; + u32 esp1; + u32 ss1; + u32 esp2; + u32 ss2; + u32 cr3; + u32 eip; + u32 eflags; + u32 eax; + u32 ecx; + u32 edx; + u32 ebx; + u32 esp; + u32 ebp; + u32 esi; + u32 edi; + u32 es; + u32 cs; + u32 ss; + u32 ds; + u32 fs; + u32 gs; + u32 ldt_selector; + u16 t; + u16 io_map; +}; + +struct tss_segment_16 { + u16 prev_task_link; + u16 sp0; + u16 ss0; + u16 sp1; + u16 ss1; + u16 sp2; + u16 ss2; + u16 ip; + u16 flag; + u16 ax; + u16 cx; + u16 dx; + u16 bx; + u16 sp; + u16 bp; + u16 si; + u16 di; + u16 es; + u16 cs; + u16 ss; + u16 ds; + u16 ldt; +}; + +#endif |