search for: gdt

Displaying 20 results from an estimated 477 matches for "gdt".

2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...include/asm-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:15:56.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:16:07.000000000 -0700 @@ -21,6 +21,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -68,7 +70,7 @@ static inline void __s...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...include/asm-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:15:56.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:16:07.000000000 -0700 @@ -21,6 +21,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -68,7 +70,7 @@ static inline void __s...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
Add an accessor function for getting the per-CPU gdt. Callee must already have the CPU. Patch-base: 2.6.13-rc5-mm1 Patch-keys: i386 desc xen Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.13/include/asm-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
Add an accessor function for getting the per-CPU gdt. Callee must already have the CPU. Patch-base: 2.6.13-rc5-mm1 Patch-keys: i386 desc xen Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.13/include/asm-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
Add an accessor function for getting the per-CPU gdt. Callee must already have the CPU. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-rc1/include/asm-i386/desc.h =================================================================== --- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700 +++ l...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
Add an accessor function for getting the per-CPU gdt. Callee must already have the CPU. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-rc1/include/asm-i386/desc.h =================================================================== --- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700 +++ l...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
I discovered an even more subtle problem; the PnP BIOS code is saving the %fs and %gs segments in inline assembler, yet it also uses the same hack for patching in a fake real mode selector for the BIOS data area. Note that the protected mode selector 0x40 overlaps the user TLS area in the GDT; this means that badly timed PnP BIOS calls could come in, save %fs, come back, and restore %fs -- to point to the fake real mode selector in the GDT. This selector will remain cached despite the GDT update until the next task context switch, and could very well be responsible for causing random c...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
I discovered an even more subtle problem; the PnP BIOS code is saving the %fs and %gs segments in inline assembler, yet it also uses the same hack for patching in a fake real mode selector for the BIOS data area. Note that the protected mode selector 0x40 overlaps the user TLS area in the GDT; this means that badly timed PnP BIOS calls could come in, save %fs, come back, and restore %fs -- to point to the fake real mode selector in the GDT. This selector will remain cached despite the GDT update until the next task context switch, and could very well be responsible for causing random c...
2014 Feb 22
2
[PATCH] efi: off-by-one in gdt allocation
From: Sylvain Gault <sylvain.gault at gmail.com> The assembly instruction lgdt take a segment limit that is one less than the actual size, so that base+limit points to the last byte. Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com> --- efi/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/efi/main.c b/efi/main.c index 94878f9..b...
2007 Apr 18
2
[PATCH 4/21] i386 Broken bios common
Both the APM BIOS and PnP BIOS code use a segment hack to simulate real mode selector 0x40 (which points to the BIOS data area at 0x00400 in real mode). Several broken BIOSen use selector 0x40 as if they were running in real mode, which we make work by faking up selector 0x40 in the GDT to point to physical memory starting at 0x400. We limit the access to the remainder of this physical page using a byte granular limit. Rather than have this tricky code in multiple places, it makes sense to define it in one place, and the GDT makes a very convenient place for it. Use GDT entry 4...
2007 Apr 18
2
[PATCH 4/21] i386 Broken bios common
Both the APM BIOS and PnP BIOS code use a segment hack to simulate real mode selector 0x40 (which points to the BIOS data area at 0x00400 in real mode). Several broken BIOSen use selector 0x40 as if they were running in real mode, which we make work by faking up selector 0x40 in the GDT to point to physical memory starting at 0x400. We limit the access to the remainder of this physical page using a byte granular limit. Rather than have this tricky code in multiple places, it makes sense to define it in one place, and the GDT makes a very convenient place for it. Use GDT entry 4...
2007 Apr 18
0
[PATCH 8/12] base-limit-cleanup
...- (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[desc_number(APM_CS)], + set_base(&gdt[desc_number(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[desc_number(APM_CS_16)], + set_base(&gdt[desc_number(APM_CS_16)], __va((unsigned long)apm_info.bios.cseg_16 &l...
2007 Apr 18
0
[PATCH 8/12] base-limit-cleanup
...- (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[desc_number(APM_CS)], + set_base(&gdt[desc_number(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[desc_number(APM_CS_16)], + set_base(&gdt[desc_number(APM_CS_16)], __va((unsigned long)apm_info.bios.cseg_16 &l...
2007 Apr 18
0
[PATCH 9/14] i386 / Typecheck and optimize base and limit accessors
...- (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[segment_index(APM_CS)], + set_base(&gdt[segment_index(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[segment_index(APM_CS_16)], + set_base(&gdt[segment_index(APM_CS_16)], __va((unsigned long)apm_info.bios.cs...
2007 Apr 18
0
[PATCH 9/14] i386 / Typecheck and optimize base and limit accessors
...- (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[segment_index(APM_CS)], + set_base(&gdt[segment_index(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[segment_index(APM_CS_16)], + set_base(&gdt[segment_index(APM_CS_16)], __va((unsigned long)apm_info.bios.cs...
2007 Apr 18
1
[PATCH 0/3] GDT virtualization performance
Three patches to clean up GDT access in Linux to make it friendly to virtualization environments. The basic problem is that the GDT must be write protected, which causes spurious overhead when the GDT lies on the same page as other data. This problem exists both for VMware and Xen; Xen actually requires page isolation, so we...
2007 Apr 18
1
[PATCH 0/3] GDT virtualization performance
Three patches to clean up GDT access in Linux to make it friendly to virtualization environments. The basic problem is that the GDT must be write protected, which causes spurious overhead when the GDT lies on the same page as other data. This problem exists both for VMware and Xen; Xen actually requires page isolation, so we...
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
Make GDT page aligned and page padded to support running inside of a hypervisor. This prevents false sharing of the GDT page with other hot data, which is not allowed in Xen, and causes performance problems in VMware. Rather than go back to the old method of statically allocating the GDT (which wastes unn...
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
Make GDT page aligned and page padded to support running inside of a hypervisor. This prevents false sharing of the GDT page with other hot data, which is not allowed in Xen, and causes performance problems in VMware. Rather than go back to the old method of statically allocating the GDT (which wastes unn...
2011 Sep 04
1
generating multiple dataset and applying function and output multiple output dataset......
...of variables and datasets seed <- round(runif(10)*1000000) datagen <- function(x){ set.seed(x) var <- rep(1:3, c(rep(3, 3))) yvar <- rnorm(length(var), 50, 10) matrix <- matrix(sample(1:10, c(10*length(var)), replace = TRUE), ncol = 10) mydata <- data.frame(var, yvar, matrix) } gdt <- lapply (seed, datagen) # resulting list (I believe is correct term) has 10 dataframes: gdt[1] .......to gdt[10] # my function, this will perform anova in every component data frames and output probability coefficients... anovp <- function(x){ ind <- 3:ncol(x) out...