Message ID | 20200304074932.77095-1-xiaoyao.li@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [kvm-unit-tests] x86: Move definition of some exception vectors into processor.h | expand |
On 04/03/20 08:49, Xiaoyao Li wrote: > 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> > --- > lib/x86/desc.h | 5 ----- > lib/x86/processor.h | 3 +++ > x86/debug.c | 1 + > 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 00b93285f5c6..0fe5cbf35577 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 103e52b19d82..67ba416b73ff 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 c5db4c6ecf5a..972762a72ce8 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 aa2973301ee0..964f119060ee 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) > Queued, thanks. Paolo
diff --git a/lib/x86/desc.h b/lib/x86/desc.h index 00b93285f5c6..0fe5cbf35577 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 103e52b19d82..67ba416b73ff 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 c5db4c6ecf5a..972762a72ce8 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 aa2973301ee0..964f119060ee 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)
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> --- lib/x86/desc.h | 5 ----- lib/x86/processor.h | 3 +++ x86/debug.c | 1 + x86/idt_test.c | 1 + 4 files changed, 5 insertions(+), 5 deletions(-)