From ee7a1e5916fc6edb6902c7364c023813630c60bd Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 21 Feb 2008 11:17:15 +0200 Subject: [PATCH] kvm: external module: compatility for desc_struct Signed-off-by: Avi Kivity --- kvm/kernel/external-module-compat.h | 22 ++++++++++++++++++++++ kvm/kernel/hack-module.awk | 3 +++ 2 files changed, 25 insertions(+) diff --git a/kvm/kernel/external-module-compat.h b/kvm/kernel/external-module-compat.h index fd3cb1d99c..1ee79240c3 100644 --- a/kvm/kernel/external-module-compat.h +++ b/kvm/kernel/external-module-compat.h @@ -707,3 +707,25 @@ static inline struct page *__kvm_vm_fault(struct vm_area_struct *vma, #define kvm_tsc_khz tsc_khz #endif + +struct kvm_desc_struct { + union { + struct { unsigned int a, b; }; + struct { + u16 limit0; + u16 base0; + unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1; + unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8; + }; + + }; +} __attribute__((packed)); + +struct kvm_ldttss_desc64 { + u16 limit0; + u16 base0; + unsigned base1 : 8, type : 5, dpl : 2, p : 1; + unsigned limit1 : 4, zero0 : 3, g : 1, base2 : 8; + u32 base3; + u32 zero1; +} __attribute__((packed)); diff --git a/kvm/kernel/hack-module.awk b/kvm/kernel/hack-module.awk index 404944e13a..b858f1d233 100644 --- a/kvm/kernel/hack-module.awk +++ b/kvm/kernel/hack-module.awk @@ -53,6 +53,9 @@ { sub(/tsc_khz/, "kvm_tsc_khz") } +{ sub(/\/, "kvm_desc_struct") } +{ sub(/\/, "kvm_ldttss_desc64") } + /^\t\.name = "kvm"/ { $0 = "\tset_kset_name(\"kvm\")," } { print } -- 2.11.4.GIT