|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 02 of 36] x86: add memory clobber to save/loadsegment
Add "memory" clobbers to savesegment and loadsegment, since they can
affect memory accesses and we never want the compiler to reorder them
with respect to memory references.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
include/asm-x86/system.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -157,14 +157,14 @@
"jmp 2b\n" \
".previous\n" \
_ASM_EXTABLE(1b,3b) \
- : :"r" (value), "r" (0))
+ : :"r" (value), "r" (0) : "memory")
/*
* Save a segment register away
*/
#define savesegment(seg, value) \
- asm volatile("mov %%" #seg ",%0":"=rm" (value))
+ asm("mov %%" #seg ",%0":"=rm" (value) : : "memory")
static inline unsigned long get_limit(unsigned long segment)
{
_______________________________________________
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
|
|
|
|
|