Skip to content

Commit 27c5a77

Browse files
committed
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
2 parents 4314daa + 002b87d commit 27c5a77

File tree

7 files changed

+30
-25
lines changed

7 files changed

+30
-25
lines changed

Documentation/x86/earlyprintk.txt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,25 @@ and two USB cables, connected like this:
3535
( If your system does not list a debug port capability then you probably
3636
won't be able to use the USB debug key. )
3737

38-
b.) You also need a Netchip USB debug cable/key:
38+
b.) You also need a NetChip USB debug cable/key:
3939

4040
http://www.plxtech.com/products/NET2000/NET20DC/default.asp
4141

42-
This is a small blue plastic connector with two USB connections,
42+
This is a small blue plastic connector with two USB connections;
4343
it draws power from its USB connections.
4444

4545
c.) You need a second client/console system with a high speed USB 2.0
4646
port.
4747

48-
d.) The Netchip device must be plugged directly into the physical
48+
d.) The NetChip device must be plugged directly into the physical
4949
debug port on the "host/target" system. You cannot use a USB hub in
5050
between the physical debug port and the "host/target" system.
5151

5252
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
5454
device in this port. The EHCI host controllers are electrically
5555
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.
5757
You can find the physical port through experimentation by trying
5858
each physical port on the system and rebooting. Or you can try
5959
and use lsusb or look at the kernel info messages emitted by the
@@ -65,9 +65,9 @@ and two USB cables, connected like this:
6565
to the hardware vendor, because there is no reason not to wire
6666
this port into one of the physically accessible ports.
6767

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
6969
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
7171
readable left to right). The reason being is that the 5 volt
7272
power supply is taken from only one side of the device and it
7373
must be the side that does not get rebooted.
@@ -81,13 +81,18 @@ and two USB cables, connected like this:
8181
CONFIG_EARLY_PRINTK_DBGP=y
8282

8383
And you need to add the boot command line: "earlyprintk=dbgp".
84+
8485
(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.)
8691

8792
On systems with more than one EHCI debug controller you must
8893
specify the correct EHCI debug controller number. The ordering
8994
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
9196
controller. To use the second EHCI debug controller, you would
9297
use the command line: "earlyprintk=dbgp1"
9398

@@ -111,7 +116,7 @@ and two USB cables, connected like this:
111116
see the raw output.
112117

113118
c.) On Nvidia Southbridge based systems: the kernel will try to probe
114-
and find out which port has debug device connected.
119+
and find out which port has a debug device connected.
115120

116121
3. Testing that it works fine:
117122

arch/x86/include/asm/pgtable-2level.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte)
1919

2020
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
2121
{
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
2522
*pmdp = pmd;
2623
}
2724

@@ -61,9 +58,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp)
6158
#ifdef CONFIG_SMP
6259
static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp)
6360
{
64-
#ifdef CONFIG_PAGE_TABLE_ISOLATION
65-
pti_set_user_pgtbl(&xp->pud.p4d.pgd, __pgd(0));
66-
#endif
6761
return __pmd(xchg((pmdval_t *)xp, 0));
6862
}
6963
#else
@@ -73,9 +67,6 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp)
7367
#ifdef CONFIG_SMP
7468
static inline pud_t native_pudp_get_and_clear(pud_t *xp)
7569
{
76-
#ifdef CONFIG_PAGE_TABLE_ISOLATION
77-
pti_set_user_pgtbl(&xp->p4d.pgd, __pgd(0));
78-
#endif
7970
return __pud(xchg((pudval_t *)xp, 0));
8071
}
8172
#else

arch/x86/kernel/apm_32.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,7 @@ static int do_open(struct inode *inode, struct file *filp)
16401640
return 0;
16411641
}
16421642

1643+
#ifdef CONFIG_PROC_FS
16431644
static int proc_apm_show(struct seq_file *m, void *v)
16441645
{
16451646
unsigned short bx;
@@ -1719,6 +1720,7 @@ static int proc_apm_show(struct seq_file *m, void *v)
17191720
units);
17201721
return 0;
17211722
}
1723+
#endif
17221724

17231725
static int apm(void *unused)
17241726
{

arch/x86/kernel/eisa.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
#include <linux/eisa.h>
88
#include <linux/io.h>
99

10+
#include <xen/xen.h>
11+
1012
static __init int eisa_bus_probe(void)
1113
{
12-
void __iomem *p = ioremap(0x0FFFD9, 4);
14+
void __iomem *p;
15+
16+
if (xen_pv_domain() && !xen_initial_domain())
17+
return 0;
1318

14-
if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24))
19+
p = ioremap(0x0FFFD9, 4);
20+
if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
1521
EISA_bus = 1;
1622
iounmap(p);
1723
return 0;

arch/x86/kernel/topology.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ int arch_register_cpu(int num)
111111
/*
112112
* Currently CPU0 is only hotpluggable on Intel platforms. Other
113113
* vendors can add hotplug support later.
114+
* Xen PV guests don't support CPU0 hotplug at all.
114115
*/
115-
if (c->x86_vendor != X86_VENDOR_INTEL)
116+
if (c->x86_vendor != X86_VENDOR_INTEL ||
117+
boot_cpu_has(X86_FEATURE_XENPV))
116118
cpu0_hotpluggable = 0;
117119

118120
/*

arch/x86/platform/efi/efi_32.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,9 @@ pgd_t * __init efi_call_phys_prolog(void)
8585

8686
void __init efi_call_phys_epilog(pgd_t *save_pgd)
8787
{
88+
load_fixmap_gdt(0);
8889
load_cr3(save_pgd);
8990
__flush_tlb_all();
90-
91-
load_fixmap_gdt(0);
9291
}
9392

9493
void __init efi_runtime_update_mappings(void)

security/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ config SECURITY_NETWORK
5757
config PAGE_TABLE_ISOLATION
5858
bool "Remove the kernel mapping in user mode"
5959
default y
60-
depends on X86 && !UML
60+
depends on (X86_64 || X86_PAE) && !UML
6161
help
6262
This feature reduces the number of hardware side channels by
6363
ensuring that the majority of kernel addresses are not mapped

0 commit comments

Comments
 (0)