Displaying 20 results from an estimated 119 matches for "write_gdt_entry".
2007 Apr 18
3
Proposed interface change
I would like to propose an interface change to the following
paravirt-ops calls:
void (fastcall *write_ldt_entry)(void *dt, int entrynum, u64 entry);
void (fastcall *write_gdt_entry)(void *dt, int entrynum, u64 entry);
void (fastcall *write_idt_entry)(void *dt, int entrynum, u64 entry);
Can we consolidate the dt and entrynum parameters and just pass
dt+entrynum*8? I don't know if this makes things harder for the Xen
case, but I seem to distantly recall that we...
2007 Dec 13
2
[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss
...55 ++++++++++++++---------------------------------
1 files changed, 17 insertions(+), 38 deletions(-)
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index 8849666..e302a02 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -125,21 +125,6 @@ static inline void native_write_gdt_entry(struct desc_struct *gdt, 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_LO...
2007 Dec 13
2
[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss
...55 ++++++++++++++---------------------------------
1 files changed, 17 insertions(+), 38 deletions(-)
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index 8849666..e302a02 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -125,21 +125,6 @@ static inline void native_write_gdt_entry(struct desc_struct *gdt, 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_LO...
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
...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. Basically, the main reason
is that I change the signatures of write_idt_entry(), write_gdt_entry(), and
write_ldt_entry(). This is needed to account for the differences between the
two architectures. (For example, gate descriptors in x86_64 are 16-byte long
and can't be represented by low and high entries). As my patch series were
64-bit only, I hadn't come across the problem before....
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
...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. Basically, the main reason
is that I change the signatures of write_idt_entry(), write_gdt_entry(), and
write_ldt_entry(). This is needed to account for the differences between the
two architectures. (For example, gate descriptors in x86_64 are 16-byte long
and can't be represented by low and high entries). As my patch series were
64-bit only, I hadn't come across the problem before....
2018 Jun 20
0
[PATCH v5 6/9] x86: prevent inline distortion by paravirt ops
...ude/asm/paravirt.h:29: Error: can't mix positional and keyword arguments
vim +253 arch/x86/include/asm/paravirt.h
014b15be include/asm-x86/paravirt.h Glauber de Oliveira Costa 2008-01-30 249
014b15be include/asm-x86/paravirt.h Glauber de Oliveira Costa 2008-01-30 250 static inline void write_gdt_entry(struct desc_struct *dt, int entry,
014b15be include/asm-x86/paravirt.h Glauber de Oliveira Costa 2008-01-30 251 void *desc, int type)
f8822f42 include/asm-i386/paravirt.h Jeremy Fitzhardinge 2007-05-02 252 {
014b15be include/asm-x86/paravirt.h Glauber de Oliveira Costa 2008-01-30...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...ype, 0);
+ write_idt_entry(idt_table, gate, a, b);
+}
+
+static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const void *addr)
+{
+ __u32 a, b;
+ pack_descriptor(&a, &b, (unsigned long)addr,
+ offsetof(struct tss_struct, __cacheline_filler) - 1,
+ DESCTYPE_TSS, 0);
+ write_gdt_entry(get_cpu_gdt_table(cpu), entry, a, b);
+}
-static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size)
+static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int entries)
{
- _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size <&...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...ype, 0);
+ write_idt_entry(idt_table, gate, a, b);
+}
+
+static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const void *addr)
+{
+ __u32 a, b;
+ pack_descriptor(&a, &b, (unsigned long)addr,
+ offsetof(struct tss_struct, __cacheline_filler) - 1,
+ DESCTYPE_TSS, 0);
+ write_gdt_entry(get_cpu_gdt_table(cpu), entry, a, b);
+}
-static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size)
+static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int entries)
{
- _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size <&...
2007 Apr 18
0
someone screwed something up
...incompatible pointer type
> arch/i386/lguest/lguest.c:497: warning: assignment from incompatible pointer type
> arch/i386/lguest/lguest.c:498: warning: assignment from incompatible pointer type
>
> paravirt_ops.write_ldt_entry = lguest_write_ldt_entry;
> paravirt_ops.write_gdt_entry = lguest_write_gdt_entry;
> paravirt_ops.write_idt_entry = lguest_write_idt_entry;
And here it is:
==
The prototype for paravirt_ops write_lgt_entry, write_gdt_entry and
write_idt_entry was type-corrected, so change lguest to match. We can
also use the "write_dt_entry" which...
2007 Apr 18
0
someone screwed something up
...incompatible pointer type
> arch/i386/lguest/lguest.c:497: warning: assignment from incompatible pointer type
> arch/i386/lguest/lguest.c:498: warning: assignment from incompatible pointer type
>
> paravirt_ops.write_ldt_entry = lguest_write_ldt_entry;
> paravirt_ops.write_gdt_entry = lguest_write_gdt_entry;
> paravirt_ops.write_idt_entry = lguest_write_idt_entry;
And here it is:
==
The prototype for paravirt_ops write_lgt_entry, write_gdt_entry and
write_idt_entry was type-corrected, so change lguest to match. We can
also use the "write_dt_entry" which...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...,
- .load_tr_desc = native_load_tr_desc,
- .set_ldt = native_set_ldt,
- .load_gdt = native_load_gdt,
- .load_idt = native_load_idt,
- .store_gdt = native_store_gdt,
- .store_idt = native_store_idt,
- .store_tr = native_store_tr,
- .load_tls = native_load_tls,
- .write_ldt_entry = write_dt_entry,
- .write_gdt_entry = write_dt_entry,
- .write_idt_entry = write_dt_entry,
- .load_esp0 = native_load_esp0,
-
- .set_iopl_mask = native_set_iopl_mask,
- .io_delay = native_io_delay,
-
+static struct paravirt_ops paravirt_ops = {
+ .pv_info = {
+ .name = "bare hardware",
+ .paravirt_enabled = 0,
+ .kernel_...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...,
- .load_tr_desc = native_load_tr_desc,
- .set_ldt = native_set_ldt,
- .load_gdt = native_load_gdt,
- .load_idt = native_load_idt,
- .store_gdt = native_store_gdt,
- .store_idt = native_store_idt,
- .store_tr = native_store_tr,
- .load_tls = native_load_tls,
- .write_ldt_entry = write_dt_entry,
- .write_gdt_entry = write_dt_entry,
- .write_idt_entry = write_dt_entry,
- .load_esp0 = native_load_esp0,
-
- .set_iopl_mask = native_set_iopl_mask,
- .io_delay = native_io_delay,
-
+static struct paravirt_ops paravirt_ops = {
+ .pv_info = {
+ .name = "bare hardware",
+ .paravirt_enabled = 0,
+ .kernel_...
2007 Apr 18
2
[PATCH] Fix CONFIG_PARAVIRT for 2.6.19-rc5-mm1
...86/desc.h 2006-11-09 11:22:25.000000000 +1100
+++ working-2.6.19-rc5-mm1-paravirt/include/asm-i386/desc.h 2006-11-09 11:33:24.000000000 +1100
@@ -81,6 +81,10 @@ static inline void load_TLS(struct threa
#undef C
}
+#define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+
static inline void write_dt_entry(void *dt, int entry, __u32 entry_a, __u32 entry_b)
{
__u32 *lp = (__u32 *)((char *)dt + entry*8);
@@ -88,29 +92,9 @@ static inline void...
2007 Apr 18
2
[PATCH] Fix CONFIG_PARAVIRT for 2.6.19-rc5-mm1
...86/desc.h 2006-11-09 11:22:25.000000000 +1100
+++ working-2.6.19-rc5-mm1-paravirt/include/asm-i386/desc.h 2006-11-09 11:33:24.000000000 +1100
@@ -81,6 +81,10 @@ static inline void load_TLS(struct threa
#undef C
}
+#define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+
static inline void write_dt_entry(void *dt, int entry, __u32 entry_a, __u32 entry_b)
{
__u32 *lp = (__u32 *)((char *)dt + entry*8);
@@ -88,29 +92,9 @@ static inline void...
2018 Aug 10
0
[PATCH 04/10] x86/paravirt: use a single ops structure
...desc = native_load_tr_desc,
- .set_ldt = native_set_ldt,
- .load_gdt = native_load_gdt,
- .load_idt = native_load_idt,
- .store_tr = native_store_tr,
- .load_tls = native_load_tls,
-#ifdef CONFIG_X86_64
- .load_gs_index = native_load_gs_index,
-#endif
- .write_ldt_entry = native_write_ldt_entry,
- .write_gdt_entry = native_write_gdt_entry,
- .write_idt_entry = native_write_idt_entry,
-
- .alloc_ldt = paravirt_nop,
- .free_ldt = paravirt_nop,
-
- .load_sp0 = native_load_sp0,
-
-#ifdef CONFIG_X86_64
- .usergs_sysret64 = native_usergs_sysret64,
-#endif
- .iret = native_iret,
- .swapgs = native_swapgs,
-
- .set_...
2007 Apr 18
5
[PATCH] paravirt.h
..."ltr %w0"::"q" (GDT_ENTRY_TSS*8))
#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8))
@@ -98,6 +101,7 @@ static inline void write_dt_entry(void *
#define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
#define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
#define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#endif /* CONFIG_PARAVIRT */
static inline void _set_gate(int gate, unsigned int type, void *addr, unsigned short seg)
{
==================================================...
2007 Apr 18
5
[PATCH] paravirt.h
..."ltr %w0"::"q" (GDT_ENTRY_TSS*8))
#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8))
@@ -98,6 +101,7 @@ static inline void write_dt_entry(void *
#define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
#define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
#define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#endif /* CONFIG_PARAVIRT */
static inline void _set_gate(int gate, unsigned int type, void *addr, unsigned short seg)
{
==================================================...
2013 Oct 31
1
[PATCH 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit
...s of the
> - * last valid byte
> - */
> - set_tssldt_descriptor(&tss, (unsigned long)addr, DESC_TSS,
> - IO_BITMAP_OFFSET + IO_BITMAP_BYTES +
> - sizeof(unsigned long) - 1);
> + set_tssldt_descriptor(&tss, (unsigned long)addr, DESC_TSS, TSS_LIMIT);
> write_gdt_entry(d, entry, &tss, DESC_TSS);
> }
>
> diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
> index 987c75e..03d3003 100644
> --- a/arch/x86/include/asm/processor.h
> +++ b/arch/x86/include/asm/processor.h
> @@ -259,9 +259,10 @@ struct x86_hw_tss...
2013 Oct 31
1
[PATCH 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit
...s of the
> - * last valid byte
> - */
> - set_tssldt_descriptor(&tss, (unsigned long)addr, DESC_TSS,
> - IO_BITMAP_OFFSET + IO_BITMAP_BYTES +
> - sizeof(unsigned long) - 1);
> + set_tssldt_descriptor(&tss, (unsigned long)addr, DESC_TSS, TSS_LIMIT);
> write_gdt_entry(d, entry, &tss, DESC_TSS);
> }
>
> diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
> index 987c75e..03d3003 100644
> --- a/arch/x86/include/asm/processor.h
> +++ b/arch/x86/include/asm/processor.h
> @@ -259,9 +259,10 @@ struct x86_hw_tss...
2007 Oct 09
2
[PATCH RFC REPOST 1/2] paravirt: refactor struct paravirt_ops into smaller pv_*_ops
...,
- .load_tr_desc = native_load_tr_desc,
- .set_ldt = native_set_ldt,
- .load_gdt = native_load_gdt,
- .load_idt = native_load_idt,
- .store_gdt = native_store_gdt,
- .store_idt = native_store_idt,
- .store_tr = native_store_tr,
- .load_tls = native_load_tls,
- .write_ldt_entry = write_dt_entry,
- .write_gdt_entry = write_dt_entry,
- .write_idt_entry = write_dt_entry,
- .load_esp0 = native_load_esp0,
-
- .set_iopl_mask = native_set_iopl_mask,
- .io_delay = native_io_delay,
-
+ .pv_info = {
+ .name = "bare hardware",
+ .paravirt_enabled = 0,
+ .kernel_rpl = 0,
+ .shared_kernel_pmd = 1, /* Only u...