diff options
author | Xiaoyao Li <xiaoyao.li@intel.com> | 2020-03-04 15:49:32 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-05 18:03:34 +0100 |
commit | 2b934609604d16126499c8acef2808d84990968f (patch) | |
tree | eb1f5f64cce7ac0220a032e9725e90f8f010939f | |
parent | 2b2139522d66e0fc1558b5a3542db81d77b31af4 (diff) | |
download | kvm-unit-tests-2b934609604d16126499c8acef2808d84990968f.tar.gz |
x86: Move definition of some exception vectors into processor.h
Both processor.h and desc.h hold some definitions of exception vector.
put them together in processor.h
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | lib/x86/desc.h | 5 | ||||
-rw-r--r-- | lib/x86/processor.h | 3 | ||||
-rw-r--r-- | x86/debug.c | 1 | ||||
-rw-r--r-- | x86/idt_test.c | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/x86/desc.h b/lib/x86/desc.h index 00b9328..0fe5cbf 100644 --- a/lib/x86/desc.h +++ b/lib/x86/desc.h @@ -91,11 +91,6 @@ typedef struct __attribute__((packed)) { "1111:" #endif -#define DB_VECTOR 1 -#define BP_VECTOR 3 -#define UD_VECTOR 6 -#define GP_VECTOR 13 - /* * selector 32-bit 64-bit * 0x00 NULL descriptor NULL descriptor diff --git a/lib/x86/processor.h b/lib/x86/processor.h index 03fdf64..3adddee 100644 --- a/lib/x86/processor.h +++ b/lib/x86/processor.h @@ -15,6 +15,9 @@ # define S "4" #endif +#define DB_VECTOR 1 +#define BP_VECTOR 3 +#define UD_VECTOR 6 #define DF_VECTOR 8 #define TS_VECTOR 10 #define NP_VECTOR 11 diff --git a/x86/debug.c b/x86/debug.c index c5db4c6..972762a 100644 --- a/x86/debug.c +++ b/x86/debug.c @@ -10,6 +10,7 @@ */ #include "libcflat.h" +#include "processor.h" #include "desc.h" static volatile unsigned long bp_addr; diff --git a/x86/idt_test.c b/x86/idt_test.c index aa29733..964f119 100644 --- a/x86/idt_test.c +++ b/x86/idt_test.c @@ -1,4 +1,5 @@ #include "libcflat.h" +#include "processor.h" #include "desc.h" static int test_ud2(bool *rflags_rf) |