Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingol Molnar:
"Misc fixes:

- EFI crash fix

- Xen PV fixes

- do not allow PTI on 2-level 32-bit kernels for now

- documentation fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/APM: Fix build warning when PROC_FS is not enabled
Revert "x86/mm/legacy: Populate the user page-table with user pgd's"
x86/efi: Load fixmap GDT in efi_call_phys_epilog() before setting %cr3
x86/xen: Disable CPU0 hotplug for Xen PV
x86/EISA: Don't probe EISA bus for Xen PV guests
x86/doc: Fix Documentation/x86/earlyprintk.txt

Changed files
+30 -25
Documentation
arch
x86
include
kernel
platform
efi
security
+15 -10
Documentation/x86/earlyprintk.txt
··· 35 35 ( If your system does not list a debug port capability then you probably 36 36 won't be able to use the USB debug key. ) 37 37 38 - b.) You also need a Netchip USB debug cable/key: 38 + b.) You also need a NetChip USB debug cable/key: 39 39 40 40 http://www.plxtech.com/products/NET2000/NET20DC/default.asp 41 41 42 - This is a small blue plastic connector with two USB connections, 42 + This is a small blue plastic connector with two USB connections; 43 43 it draws power from its USB connections. 44 44 45 45 c.) You need a second client/console system with a high speed USB 2.0 46 46 port. 47 47 48 - d.) The Netchip device must be plugged directly into the physical 48 + d.) The NetChip device must be plugged directly into the physical 49 49 debug port on the "host/target" system. You cannot use a USB hub in 50 50 between the physical debug port and the "host/target" system. 51 51 52 52 The EHCI debug controller is bound to a specific physical USB 53 - port and the Netchip device will only work as an early printk 53 + port and the NetChip device will only work as an early printk 54 54 device in this port. The EHCI host controllers are electrically 55 55 wired such that the EHCI debug controller is hooked up to the 56 - first physical and there is no way to change this via software. 56 + first physical port and there is no way to change this via software. 57 57 You can find the physical port through experimentation by trying 58 58 each physical port on the system and rebooting. Or you can try 59 59 and use lsusb or look at the kernel info messages emitted by the ··· 65 65 to the hardware vendor, because there is no reason not to wire 66 66 this port into one of the physically accessible ports. 67 67 68 - e.) It is also important to note, that many versions of the Netchip 68 + e.) It is also important to note, that many versions of the NetChip 69 69 device require the "client/console" system to be plugged into the 70 - right and side of the device (with the product logo facing up and 70 + right hand side of the device (with the product logo facing up and 71 71 readable left to right). The reason being is that the 5 volt 72 72 power supply is taken from only one side of the device and it 73 73 must be the side that does not get rebooted. ··· 81 81 CONFIG_EARLY_PRINTK_DBGP=y 82 82 83 83 And you need to add the boot command line: "earlyprintk=dbgp". 84 + 84 85 (If you are using Grub, append it to the 'kernel' line in 85 - /etc/grub.conf) 86 + /etc/grub.conf. If you are using Grub2 on a BIOS firmware system, 87 + append it to the 'linux' line in /boot/grub2/grub.cfg. If you are 88 + using Grub2 on an EFI firmware system, append it to the 'linux' 89 + or 'linuxefi' line in /boot/grub2/grub.cfg or 90 + /boot/efi/EFI/<distro>/grub.cfg.) 86 91 87 92 On systems with more than one EHCI debug controller you must 88 93 specify the correct EHCI debug controller number. The ordering 89 94 comes from the PCI bus enumeration of the EHCI controllers. The 90 - default with no number argument is "0" the first EHCI debug 95 + default with no number argument is "0" or the first EHCI debug 91 96 controller. To use the second EHCI debug controller, you would 92 97 use the command line: "earlyprintk=dbgp1" 93 98 ··· 116 111 see the raw output. 117 112 118 113 c.) On Nvidia Southbridge based systems: the kernel will try to probe 119 - and find out which port has debug device connected. 114 + and find out which port has a debug device connected. 120 115 121 116 3. Testing that it works fine: 122 117
-9
arch/x86/include/asm/pgtable-2level.h
··· 19 19 20 20 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) 21 21 { 22 - #ifdef CONFIG_PAGE_TABLE_ISOLATION 23 - pmd.pud.p4d.pgd = pti_set_user_pgtbl(&pmdp->pud.p4d.pgd, pmd.pud.p4d.pgd); 24 - #endif 25 22 *pmdp = pmd; 26 23 } 27 24 ··· 58 61 #ifdef CONFIG_SMP 59 62 static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) 60 63 { 61 - #ifdef CONFIG_PAGE_TABLE_ISOLATION 62 - pti_set_user_pgtbl(&xp->pud.p4d.pgd, __pgd(0)); 63 - #endif 64 64 return __pmd(xchg((pmdval_t *)xp, 0)); 65 65 } 66 66 #else ··· 67 73 #ifdef CONFIG_SMP 68 74 static inline pud_t native_pudp_get_and_clear(pud_t *xp) 69 75 { 70 - #ifdef CONFIG_PAGE_TABLE_ISOLATION 71 - pti_set_user_pgtbl(&xp->p4d.pgd, __pgd(0)); 72 - #endif 73 76 return __pud(xchg((pudval_t *)xp, 0)); 74 77 } 75 78 #else
+2
arch/x86/kernel/apm_32.c
··· 1640 1640 return 0; 1641 1641 } 1642 1642 1643 + #ifdef CONFIG_PROC_FS 1643 1644 static int proc_apm_show(struct seq_file *m, void *v) 1644 1645 { 1645 1646 unsigned short bx; ··· 1720 1719 units); 1721 1720 return 0; 1722 1721 } 1722 + #endif 1723 1723 1724 1724 static int apm(void *unused) 1725 1725 {
+8 -2
arch/x86/kernel/eisa.c
··· 7 7 #include <linux/eisa.h> 8 8 #include <linux/io.h> 9 9 10 + #include <xen/xen.h> 11 + 10 12 static __init int eisa_bus_probe(void) 11 13 { 12 - void __iomem *p = ioremap(0x0FFFD9, 4); 14 + void __iomem *p; 13 15 14 - if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24)) 16 + if (xen_pv_domain() && !xen_initial_domain()) 17 + return 0; 18 + 19 + p = ioremap(0x0FFFD9, 4); 20 + if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24)) 15 21 EISA_bus = 1; 16 22 iounmap(p); 17 23 return 0;
+3 -1
arch/x86/kernel/topology.c
··· 111 111 /* 112 112 * Currently CPU0 is only hotpluggable on Intel platforms. Other 113 113 * vendors can add hotplug support later. 114 + * Xen PV guests don't support CPU0 hotplug at all. 114 115 */ 115 - if (c->x86_vendor != X86_VENDOR_INTEL) 116 + if (c->x86_vendor != X86_VENDOR_INTEL || 117 + boot_cpu_has(X86_FEATURE_XENPV)) 116 118 cpu0_hotpluggable = 0; 117 119 118 120 /*
+1 -2
arch/x86/platform/efi/efi_32.c
··· 85 85 86 86 void __init efi_call_phys_epilog(pgd_t *save_pgd) 87 87 { 88 + load_fixmap_gdt(0); 88 89 load_cr3(save_pgd); 89 90 __flush_tlb_all(); 90 - 91 - load_fixmap_gdt(0); 92 91 } 93 92 94 93 void __init efi_runtime_update_mappings(void)
+1 -1
security/Kconfig
··· 57 57 config PAGE_TABLE_ISOLATION 58 58 bool "Remove the kernel mapping in user mode" 59 59 default y 60 - depends on X86 && !UML 60 + depends on (X86_64 || X86_PAE) && !UML 61 61 help 62 62 This feature reduces the number of hardware side channels by 63 63 ensuring that the majority of kernel addresses are not mapped