|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 08 of 36] x86_64: Add gate_offset() and gate_segment(
For calculating the offset from struct gate_struct fields.
[ gate_offset and gate_segment were broken for 32-bit. ]
Signed-off-by: Eduardo Habkost <ehabkost@xxxxxxxxxx>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
include/asm-x86/desc_defs.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h
--- a/include/asm-x86/desc_defs.h
+++ b/include/asm-x86/desc_defs.h
@@ -75,10 +75,14 @@
typedef struct gate_struct64 gate_desc;
typedef struct ldttss_desc64 ldt_desc;
typedef struct ldttss_desc64 tss_desc;
+#define gate_offset(g) ((g).offset_low | ((unsigned long)(g).offset_middle <<
16) | ((unsigned long)(g).offset_high << 32))
+#define gate_segment(g) ((g).segment)
#else
typedef struct desc_struct gate_desc;
typedef struct desc_struct ldt_desc;
typedef struct desc_struct tss_desc;
+#define gate_offset(g) (((g).b & 0xffff0000) | ((g).a & 0x0000ffff))
+#define gate_segment(g) ((g).a >> 16)
#endif
struct desc_ptr {
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
[Xen-devel] [PATCH 02 of 36] x86: add memory clobber to save/loadsegment, Jeremy Fitzhardinge
[Xen-devel] [PATCH 01 of 36] x86: asm-x86/pgtable.h: fix compiler warning, Jeremy Fitzhardinge
[Xen-devel] [PATCH 04 of 36] x86: remove open-coded save/load segment operations, Jeremy Fitzhardinge
[Xen-devel] [PATCH 09 of 36] x86_64: Use __pgd() on mk_kernel_pgd(), Jeremy Fitzhardinge
[Xen-devel] [PATCH 08 of 36] x86_64: Add gate_offset() and gate_segment() macros,
Jeremy Fitzhardinge <=
[Xen-devel] [PATCH 07 of 36] x86_64: unify early_ioremap, Jeremy Fitzhardinge
[Xen-devel] [PATCH 06 of 36] x86_64: use p??_populate() to attach pages to pagetable, Jeremy Fitzhardinge
[Xen-devel] [PATCH 13 of 36] x86_64: add prototype for x86_64_start_kernel(), Jeremy Fitzhardinge
[Xen-devel] [PATCH 11 of 36] x86: unify mmu_context.h, Jeremy Fitzhardinge
[Xen-devel] [PATCH 10 of 36] x86: unify pgd_index, Jeremy Fitzhardinge
[Xen-devel] [PATCH 05 of 36] x86_64: use write_gdt_entry in vsyscall_set_cpu, Jeremy Fitzhardinge
[Xen-devel] [PATCH 12 of 36] x86_64: replace end_pfn with num_physpages, Jeremy Fitzhardinge
[Xen-devel] [PATCH 14 of 36] x86_64: add sync_cmpxchg, Jeremy Fitzhardinge
[Xen-devel] [PATCH 18 of 36] x86/paravirt: add debugging for missing operations, Jeremy Fitzhardinge
[Xen-devel] [PATCH 15 of 36] x86: simplify vmalloc_sync_all, Jeremy Fitzhardinge
|
|
|
|
|