= 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] . [[TableOfContents(4)]] = Replacement completed = * arch/x86/kernel/cpu/microcode/core.c: patch posted by Boris Ostrovsky, refer to [http://lkml.kernel.org/r/1455203598-14378-1-git-send-email-boris.ostrovsky@oracle.com x86, microcode: Remove unnecessary paravirt_enabled check] = Replacement being brewed = * arch/x86/kernel/head.c reserve_ebda_region(): Luis has a solution in place for this with subarch. * arch/x86/kernel/apm_32.c: Boris Ostrovsky noted this might be unnecessary since version is taken from boot_params and thus should be zero for Xen PV. We need to confirm this is also 0 for lguest. If we want to avoid regressions we could also first use the subarch check for now, this will keep the check in place in case we do need a check in place later after a regression is found. Luis will work on this. * arch/x86/kernel/tboot.c: As with apm, Boris suggests this should be safe to be removed. If we want to keep this using the subarch should suffice. Luis will work on this. * arch/x86/kernel/cpu/intel.c f00f_workaround: Andy Lutomirski and Boris Ostrovsky both point out it should be safe to just let the guest set this fix, nothing is expected to break if the guest kernel also does the fixup. Konrad Rzeszutek Wilk also had noted that perhaps the work around could be removed completely upstream, but no confirmation has been made. If we want to keep this using the subarch should suffice. Luis will work on this. * arch/x86/kernel/rtc.c: Luis Rodriguez suggests this can simply be replaced with a Kconfig magic to prevent lguest from building with it, alternatively the subarch could also be used to avoid running on lguest. Luis will work on this. * drivers/pnp/pnpbios/core.c: Andy noted he's not sure if disabling this for pv_enabled() is right. Luis notes lguest should not use it for sure, the subarch could be used here to at least upkeep the behavior. Luis will work on this. * 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. = Replacement not found yet = * arch/x86/mm/dump_pagetables.c: No solution proposed yet. The check is intended to catch mappings on baremetal kernels that shouldn't be there. In other words it's not Xen PV that needs it, it's baremetal that wants to catch errors.