= Removing paravirt_enabled = Use of paravirt_enabled() should be avoided at all costs in the kernel, we will be removing it. This page documents its current uses and plan of attack of how to replace them. We break things down into things with a solution already brewed and patches posted or soon to be posted and with pending items. Review the last discussion on this [[http://lkml.kernel.org/r/CALCETrWSiN+te_0aYH0NH9oBzGALLhKqxkupiGwbAm2GdCNyVQ@mail.gmail.com|here]] . <> = Replacement completed on its way upstream one way or another = * arch/x86/kernel/cpu/microcode/core.c: patch posted by Boris Ostrovsky [[http://lkml.kernel.org/r/1455203598-14378-1-git-send-email-boris.ostrovsky@oracle.com|x86, microcode: Remove unnecessary paravirt_enabled check]] * arch/x86/mm/dump_pagetables.c: patch posted by Boris Petkov [[http://lkml.kernel.org/r/1455825641-19585-1-git-send-email-bp@alien8.de|x86/ptdump: Remove paravirt_enabled()]] * arch/x86/kernel/head.c reserve_ebda_region(): patch posted by Luis [[http://lkml.kernel.org/r/1455887316-9223-5-git-send-email-mcgrof@kernel.org|x86/init: make ebda depend on PC subarch]] - uses PC subarch * arch/x86/kernel/apm_32.c: patch posted by Luis [[http://lkml.kernel.org/r/1455887316-9223-6-git-send-email-mcgrof@kernel.org|apm32: remove paravirt_enabled() use]] relies on relevant boot params being zero, follow up patch just in case for lguest by Luis and another one to clear bss on Xen by Boris Ostrovsky (independent of Luis' series) * arch/x86/kernel/tboot.c: patch posted by Luis [[http://lkml.kernel.org/r/1455887316-9223-7-git-send-email-mcgrof@kernel.org|x86/tboot: remove paravirt_enabled]]As with apm, relies on the respective boot params being zero * arch/x86/kernel/cpu/intel.c: f00f_workaround, patch posted by Luis [[http://lkml.kernel.org/r/1455887316-9223-8-git-send-email-mcgrof@kernel.org|x86/cpu/intel: replace paravirt_enabled for f00f work around]] - although Andy notes it should be safe to run this on guests, for now we can just use the subarch to be safe * arch/x86/kernel/rtc.c: patch posted by Luis [[http://lkml.kernel.org/r/455887316-9223-1-git-send-email-mcgrof@kernel.org|x86/rtc: replace paravirt_enabled check with subarch check]] - folds no CMOS RTC paravirt flag to a generic x86 flag * drivers/pnp/pnpbios/core.c: patch posted by Luis [[http://lkml.kernel.org/r/1455887316-9223-10-git-send-email-mcgrof@kernel.org|pnpbios: replace paravirt_enabled() check with subarch checks]] - uses subarch = Replacement being brewed = * arch/x86/entry/entry_32.S: Andy notes that: "this is actually trying to check whether pv_cpu_ops.iret == native_iret. I sincerely hope that no additional support is *ever* added to x86 Linux for systems on which this is not the case."Andy noted perhaps we can rearrange the code a bit to look more like the 64-bit version, and referred to commit 7209a75d2009dbf7745e2fd354abf25c3deb3ca3 as a reference. Andy noted he'd work on this.