Displaying 8 results from an estimated 8 matches for "ptr_middle".
2007 Dec 13
2
[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss
..., int entry,
memcpy(&gdt[entry], desc, size);
}
-static inline void set_tssldt_descriptor(struct ldttss_desc64 *d,
- unsigned long tss, unsigned type,
- unsigned size)
-{
- memset(d, 0, sizeof(*d));
- d->limit0 = size & 0xFFFF;
- d->base0 = PTR_LOW(tss);
- d->base1 = PTR_MIDDLE(tss) & 0xFF;
- d->type = type;
- d->p = 1;
- d->limit1 = (size >> 16) & 0xF;
- d->base2 = (PTR_MIDDLE(tss) >> 8) & 0xFF;
- d->base3 = PTR_HIGH(tss);
-}
-
static inline void pack_descriptor(struct desc_struct *desc, unsigned long base,
unsigned long li...
2007 Dec 13
2
[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss
..., int entry,
memcpy(&gdt[entry], desc, size);
}
-static inline void set_tssldt_descriptor(struct ldttss_desc64 *d,
- unsigned long tss, unsigned type,
- unsigned size)
-{
- memset(d, 0, sizeof(*d));
- d->limit0 = size & 0xFFFF;
- d->base0 = PTR_LOW(tss);
- d->base1 = PTR_MIDDLE(tss) & 0xFF;
- d->type = type;
- d->p = 1;
- d->limit1 = (size >> 16) & 0xF;
- d->base2 = (PTR_MIDDLE(tss) >> 8) & 0xFF;
- d->base3 = PTR_HIGH(tss);
-}
-
static inline void pack_descriptor(struct desc_struct *desc, unsigned long base,
unsigned long li...
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi,
this is a series of patches that unify the struct desc_struct and friends
across x86_64 and i386. As usual, it provides paravirt capabilities as a
side-effect for x86_64.
I consider the main goal, namely, of unifying the desc_struct, an ongoing
effort, being this the beginning. A lot of old code has to be touched to
accomplish that.
I don't consider this patch ready for inclusion.
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi,
this is a series of patches that unify the struct desc_struct and friends
across x86_64 and i386. As usual, it provides paravirt capabilities as a
side-effect for x86_64.
I consider the main goal, namely, of unifying the desc_struct, an ongoing
effort, being this the beginning. A lot of old code has to be touched to
accomplish that.
I don't consider this patch ready for inclusion.
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...extern struct desc_ptr idt_descr;
Index: clean-start/include/asm-x86_64/desc_defs.h
===================================================================
--- clean-start.orig/include/asm-x86_64/desc_defs.h
+++ clean-start/include/asm-x86_64/desc_defs.h
@@ -43,6 +43,11 @@ struct gate_struct {
#define PTR_MIDDLE(x) (((unsigned long)(x) >> 16) & 0xFFFF)
#define PTR_HIGH(x) ((unsigned long)(x) >> 32)
+#define DESC_ADDRESS(d) ((unsigned long)((unsigned long)d.base2 << 32) \
+ | (d.base1 << 16) | d.base0)
+
+#define GATE_ADDRESS(g) ((unsigned long)((unsigned long)g.offset_hig...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...extern struct desc_ptr idt_descr;
Index: clean-start/include/asm-x86_64/desc_defs.h
===================================================================
--- clean-start.orig/include/asm-x86_64/desc_defs.h
+++ clean-start/include/asm-x86_64/desc_defs.h
@@ -43,6 +43,11 @@ struct gate_struct {
#define PTR_MIDDLE(x) (((unsigned long)(x) >> 16) & 0xFFFF)
#define PTR_HIGH(x) ((unsigned long)(x) >> 32)
+#define DESC_ADDRESS(d) ((unsigned long)((unsigned long)d.base2 << 32) \
+ | (d.base1 << 16) | d.base0)
+
+#define GATE_ADDRESS(g) ((unsigned long)((unsigned long)g.offset_hig...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...unsigned dpl, unsigned ist)
+{
+ s->offset_low = PTR_LOW(func);
+ s->segment = __HV_CS;
+ s->ist = ist;
+ s->p = 1;
+ s->dpl = dpl;
+ s->zero0 = 0;
+ s->zero1 = 0;
+ s->type = type;
+ s->offset_middle = PTR_MIDDLE(func);
+ s->offset_high = PTR_HIGH(func);
+}
+
+static inline unsigned long guest_pa(struct lguest_guest_info *linfo, u64 addr)
+{
+ return (addr >= linfo->start_kernel_map) ?
+ (addr - linfo->start_kernel_map) :
+ (addr - linfo->page_offset);
+}
+
+int lguest_address_ok(con...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...unsigned dpl, unsigned ist)
+{
+ s->offset_low = PTR_LOW(func);
+ s->segment = __HV_CS;
+ s->ist = ist;
+ s->p = 1;
+ s->dpl = dpl;
+ s->zero0 = 0;
+ s->zero1 = 0;
+ s->type = type;
+ s->offset_middle = PTR_MIDDLE(func);
+ s->offset_high = PTR_HIGH(func);
+}
+
+static inline unsigned long guest_pa(struct lguest_guest_info *linfo, u64 addr)
+{
+ return (addr >= linfo->start_kernel_map) ?
+ (addr - linfo->start_kernel_map) :
+ (addr - linfo->page_offset);
+}
+
+int lguest_address_ok(con...