search for: compare_segment_stack

Displaying 5 results from an estimated 5 matches for "compare_segment_stack".

2007 Apr 18
0
[RFC, PATCH 11/24] i386 Vmi segment changes
...ine __MACH_SEGMENT_H + +#if !defined(CONFIG_X86_VMI) +# error invalid sub-arch include +#endif + +#ifndef __ASSEMBLY__ +static inline unsigned get_kernel_rpl(void) +{ + unsigned cs; + __asm__ ("movl %%cs,%0" : "=r"(cs):); + return cs & SEGMENT_RPL_MASK; +} +#endif + +#define COMPARE_SEGMENT_STACK(segment, offset) \ + pushl %eax; \ + mov offset+4(%esp), %eax; \ + andl $~SEGMENT_RPL_MASK, %eax; \ + cmpw $segment,%ax; \ + popl %eax; + +#define COMPARE_SEGMENT_REG(segment, reg) \ + pushl %eax; \ + mov reg, %eax; \ + andl $~SEGMENT_RPL_MASK, %eax; \ + cmpw $segment,%ax; \...
2007 Apr 18
0
[RFC, PATCH 11/24] i386 Vmi segment changes
...ine __MACH_SEGMENT_H + +#if !defined(CONFIG_X86_VMI) +# error invalid sub-arch include +#endif + +#ifndef __ASSEMBLY__ +static inline unsigned get_kernel_rpl(void) +{ + unsigned cs; + __asm__ ("movl %%cs,%0" : "=r"(cs):); + return cs & SEGMENT_RPL_MASK; +} +#endif + +#define COMPARE_SEGMENT_STACK(segment, offset) \ + pushl %eax; \ + mov offset+4(%esp), %eax; \ + andl $~SEGMENT_RPL_MASK, %eax; \ + cmpw $segment,%ax; \ + popl %eax; + +#define COMPARE_SEGMENT_REG(segment, reg) \ + pushl %eax; \ + mov reg, %eax; \ + andl $~SEGMENT_RPL_MASK, %eax; \ + cmpw $segment,%ax; \...
2007 Apr 18
2
[PATCH 1/3] Paravirtualization: Kernel Ring Cleanups
...-by: Rusty Russell <rusty@rustcorp.com.au> This is Zach's patch to clean up assumptions about the kernel running in ring 0 (which it doesn't when running paravirtualized). 1) Remove the hardcoded 3 and introduce #define SEGMENT_RPL_MASK 3 2) Add a get_kernel_rpl() function 3) Create COMPARE_SEGMENT_STACK and COMPARE_SEGMENT_REG macros which can mask out the bottom two bits (RPL) when comparing for paravirtualization. diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.17-rc2-git7/arch/i386/kernel/entry.S tmp/arch/i386/kernel/entry.S --- l...
2007 Apr 18
2
[PATCH 1/3] Paravirtualization: Kernel Ring Cleanups
...-by: Rusty Russell <rusty@rustcorp.com.au> This is Zach's patch to clean up assumptions about the kernel running in ring 0 (which it doesn't when running paravirtualized). 1) Remove the hardcoded 3 and introduce #define SEGMENT_RPL_MASK 3 2) Add a get_kernel_rpl() function 3) Create COMPARE_SEGMENT_STACK and COMPARE_SEGMENT_REG macros which can mask out the bottom two bits (RPL) when comparing for paravirtualization. diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.17-rc2-git7/arch/i386/kernel/entry.S tmp/arch/i386/kernel/entry.S --- l...
2007 Apr 18
33
[RFC PATCH 00/33] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor. Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths