aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/paravirt_patch_32.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2018-08-28 09:40:25 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-09-03 16:50:37 +0200
commitfdc0269e8958a1ec95b8ac685c1d372c24c60faa (patch)
tree5acfe960e9ea5eafe04f7bb819976fb163d12919 /arch/x86/kernel/paravirt_patch_32.c
parentx86/paravirt: Move the pv_irq_ops under the PARAVIRT_XXL umbrella (diff)
downloadlinux-dev-fdc0269e8958a1ec95b8ac685c1d372c24c60faa.tar.xz
linux-dev-fdc0269e8958a1ec95b8ac685c1d372c24c60faa.zip
x86/paravirt: Move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella
Most of the paravirt ops defined in pv_mmu_ops are for Xen PV guests only. Define them only if CONFIG_PARAVIRT_XXL is set. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: xen-devel@lists.xenproject.org Cc: virtualization@lists.linux-foundation.org Cc: akataria@vmware.com Cc: rusty@rustcorp.com.au Cc: boris.ostrovsky@oracle.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20180828074026.820-15-jgross@suse.com
Diffstat (limited to 'arch/x86/kernel/paravirt_patch_32.c')
-rw-r--r--arch/x86/kernel/paravirt_patch_32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/paravirt_patch_32.c b/arch/x86/kernel/paravirt_patch_32.c
index 1d44705c6528..d460cbcabcfe 100644
--- a/arch/x86/kernel/paravirt_patch_32.c
+++ b/arch/x86/kernel/paravirt_patch_32.c
@@ -7,10 +7,10 @@ DEF_NATIVE(irq, irq_enable, "sti");
DEF_NATIVE(irq, restore_fl, "push %eax; popf");
DEF_NATIVE(irq, save_fl, "pushf; pop %eax");
DEF_NATIVE(cpu, iret, "iret");
-#endif
DEF_NATIVE(mmu, read_cr2, "mov %cr2, %eax");
DEF_NATIVE(mmu, write_cr3, "mov %eax, %cr3");
DEF_NATIVE(mmu, read_cr3, "mov %cr3, %eax");
+#endif
#if defined(CONFIG_PARAVIRT_SPINLOCKS)
DEF_NATIVE(lock, queued_spin_unlock, "movb $0, (%eax)");
@@ -49,10 +49,10 @@ unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
PATCH_SITE(irq, restore_fl);
PATCH_SITE(irq, save_fl);
PATCH_SITE(cpu, iret);
-#endif
PATCH_SITE(mmu, read_cr2);
PATCH_SITE(mmu, read_cr3);
PATCH_SITE(mmu, write_cr3);
+#endif
#if defined(CONFIG_PARAVIRT_SPINLOCKS)
case PARAVIRT_PATCH(lock.queued_spin_unlock):
if (pv_is_native_spin_unlock()) {