aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/paravirt_patch_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/paravirt_patch_32.c')
-rw-r--r--arch/x86/kernel/paravirt_patch_32.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/kernel/paravirt_patch_32.c b/arch/x86/kernel/paravirt_patch_32.c
index 6368c22fa1fa..de138d3912e4 100644
--- a/arch/x86/kernel/paravirt_patch_32.c
+++ b/arch/x86/kernel/paravirt_patch_32.c
@@ -10,24 +10,18 @@ DEF_NATIVE(cpu, iret, "iret");
10DEF_NATIVE(mmu, read_cr2, "mov %cr2, %eax"); 10DEF_NATIVE(mmu, read_cr2, "mov %cr2, %eax");
11DEF_NATIVE(mmu, write_cr3, "mov %eax, %cr3"); 11DEF_NATIVE(mmu, write_cr3, "mov %eax, %cr3");
12DEF_NATIVE(mmu, read_cr3, "mov %cr3, %eax"); 12DEF_NATIVE(mmu, read_cr3, "mov %cr3, %eax");
13#endif
14
15#if defined(CONFIG_PARAVIRT_SPINLOCKS)
16DEF_NATIVE(lock, queued_spin_unlock, "movb $0, (%eax)");
17DEF_NATIVE(lock, vcpu_is_preempted, "xor %eax, %eax");
18#endif
19
20unsigned paravirt_patch_ident_32(void *insnbuf, unsigned len)
21{
22 /* arg in %eax, return in %eax */
23 return 0;
24}
25 13
26unsigned paravirt_patch_ident_64(void *insnbuf, unsigned len) 14unsigned paravirt_patch_ident_64(void *insnbuf, unsigned len)
27{ 15{
28 /* arg in %edx:%eax, return in %edx:%eax */ 16 /* arg in %edx:%eax, return in %edx:%eax */
29 return 0; 17 return 0;
30} 18}
19#endif
20
21#if defined(CONFIG_PARAVIRT_SPINLOCKS)
22DEF_NATIVE(lock, queued_spin_unlock, "movb $0, (%eax)");
23DEF_NATIVE(lock, vcpu_is_preempted, "xor %eax, %eax");
24#endif
31 25
32extern bool pv_is_native_spin_unlock(void); 26extern bool pv_is_native_spin_unlock(void);
33extern bool pv_is_native_vcpu_is_preempted(void); 27extern bool pv_is_native_vcpu_is_preempted(void);