aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/segment_descriptor.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-12-16 11:02:48 +0200
committerAvi Kivity <avi@qumranet.com>2008-01-30 18:01:18 +0200
commitedf884172e9828c6234b254208af04655855038d (patch)
treef5e5d1eecaed9737eced6ba60d09fe93149751c1 /arch/x86/kvm/segment_descriptor.h
parent9584bf2c93f56656dba0de8f6c75b54ca7995143 (diff)
downloadkernel_samsung_tuna-edf884172e9828c6234b254208af04655855038d.zip
kernel_samsung_tuna-edf884172e9828c6234b254208af04655855038d.tar.gz
kernel_samsung_tuna-edf884172e9828c6234b254208af04655855038d.tar.bz2
KVM: Move arch dependent files to new directory arch/x86/kvm/
This paves the way for multiple architecture support. Note that while ioapic.c could potentially be shared with ia64, it is also moved. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/segment_descriptor.h')
-rw-r--r--arch/x86/kvm/segment_descriptor.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/kvm/segment_descriptor.h b/arch/x86/kvm/segment_descriptor.h
new file mode 100644
index 0000000..56fc4c8
--- /dev/null
+++ b/arch/x86/kvm/segment_descriptor.h
@@ -0,0 +1,29 @@
+#ifndef __SEGMENT_DESCRIPTOR_H
+#define __SEGMENT_DESCRIPTOR_H
+
+struct segment_descriptor {
+ u16 limit_low;
+ u16 base_low;
+ u8 base_mid;
+ u8 type : 4;
+ u8 system : 1;
+ u8 dpl : 2;
+ u8 present : 1;
+ u8 limit_high : 4;
+ u8 avl : 1;
+ u8 long_mode : 1;
+ u8 default_op : 1;
+ u8 granularity : 1;
+ u8 base_high;
+} __attribute__((packed));
+
+#ifdef CONFIG_X86_64
+/* LDT or TSS descriptor in the GDT. 16 bytes. */
+struct segment_descriptor_64 {
+ struct segment_descriptor s;
+ u32 base_higher;
+ u32 pad_zero;
+};
+
+#endif
+#endif