Skip to content

Commit 865ddc1

Browse files
committed
Merge remote-tracking branch 'stable/linux-4.14.y' into rpi-4.14.y
2 parents 354898f + 7d6240f commit 865ddc1

File tree

181 files changed

+2793
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+2793
-737
lines changed

Documentation/admin-guide/kernel-parameters.txt

+3
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,9 @@
25412541

25422542
noalign [KNL,ARM]
25432543

2544+
noaltinstr [S390] Disables alternative instructions patching
2545+
(CPU alternatives feature).
2546+
25442547
noapic [SMP,APIC] Tells the kernel to not make use of any
25452548
IOAPICs that may be present in the system.
25462549

Documentation/virtual/kvm/api.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -1940,6 +1940,9 @@ ARM 32-bit VFP control registers have the following id bit patterns:
19401940
ARM 64-bit FP registers have the following id bit patterns:
19411941
0x4030 0000 0012 0 <regno:12>
19421942

1943+
ARM firmware pseudo-registers have the following bit pattern:
1944+
0x4030 0000 0014 <regno:16>
1945+
19431946

19441947
arm64 registers are mapped using the lower 32 bits. The upper 16 of
19451948
that is the register group type, or coprocessor number:
@@ -1956,6 +1959,9 @@ arm64 CCSIDR registers are demultiplexed by CSSELR value:
19561959
arm64 system registers have the following id bit patterns:
19571960
0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3>
19581961

1962+
arm64 firmware pseudo-registers have the following bit pattern:
1963+
0x6030 0000 0014 <regno:16>
1964+
19591965

19601966
MIPS registers are mapped using the lower 32 bits. The upper 16 of that is
19611967
the register group type:
@@ -2490,7 +2496,8 @@ Possible features:
24902496
and execute guest code when KVM_RUN is called.
24912497
- KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode.
24922498
Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).
2493-
- KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 for the CPU.
2499+
- KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision
2500+
backward compatible with v0.2) for the CPU.
24942501
Depends on KVM_CAP_ARM_PSCI_0_2.
24952502
- KVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU.
24962503
Depends on KVM_CAP_ARM_PMU_V3.
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
KVM implements the PSCI (Power State Coordination Interface)
2+
specification in order to provide services such as CPU on/off, reset
3+
and power-off to the guest.
4+
5+
The PSCI specification is regularly updated to provide new features,
6+
and KVM implements these updates if they make sense from a virtualization
7+
point of view.
8+
9+
This means that a guest booted on two different versions of KVM can
10+
observe two different "firmware" revisions. This could cause issues if
11+
a given guest is tied to a particular PSCI revision (unlikely), or if
12+
a migration causes a different PSCI version to be exposed out of the
13+
blue to an unsuspecting guest.
14+
15+
In order to remedy this situation, KVM exposes a set of "firmware
16+
pseudo-registers" that can be manipulated using the GET/SET_ONE_REG
17+
interface. These registers can be saved/restored by userspace, and set
18+
to a convenient value if required.
19+
20+
The following register is defined:
21+
22+
* KVM_REG_ARM_PSCI_VERSION:
23+
24+
- Only valid if the vcpu has the KVM_ARM_VCPU_PSCI_0_2 feature set
25+
(and thus has already been initialized)
26+
- Returns the current PSCI version on GET_ONE_REG (defaulting to the
27+
highest PSCI version implemented by KVM and compatible with v0.2)
28+
- Allows any PSCI version implemented by KVM and compatible with
29+
v0.2 to be set with SET_ONE_REG
30+
- Affects the whole VM (even if the register view is per-vcpu)

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 4
33
PATCHLEVEL = 14
4-
SUBLEVEL = 37
4+
SUBLEVEL = 39
55
EXTRAVERSION =
66
NAME = Petit Gorille
77

arch/arm/configs/socfpga_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ CONFIG_MTD_M25P80=y
5757
CONFIG_MTD_NAND=y
5858
CONFIG_MTD_NAND_DENALI_DT=y
5959
CONFIG_MTD_SPI_NOR=y
60+
# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
6061
CONFIG_SPI_CADENCE_QUADSPI=y
6162
CONFIG_OF_OVERLAY=y
6263
CONFIG_OF_CONFIGFS=y

arch/arm/include/asm/kvm_host.h

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ struct kvm_arch {
7575
/* Interrupt controller */
7676
struct vgic_dist vgic;
7777
int max_vcpus;
78+
79+
/* Mandated version of PSCI */
80+
u32 psci_version;
7881
};
7982

8083
#define KVM_NR_MEM_OBJS 40

arch/arm/include/uapi/asm/kvm.h

+6
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ struct kvm_arch_memory_slot {
180180
#define KVM_REG_ARM_VFP_FPINST 0x1009
181181
#define KVM_REG_ARM_VFP_FPINST2 0x100A
182182

183+
/* KVM-as-firmware specific pseudo-registers */
184+
#define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT)
185+
#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM | KVM_REG_SIZE_U64 | \
186+
KVM_REG_ARM_FW | ((r) & 0xffff))
187+
#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0)
188+
183189
/* Device Control API: ARM VGIC */
184190
#define KVM_DEV_ARM_VGIC_GRP_ADDR 0
185191
#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1

arch/arm/kvm/guest.c

+13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/module.h>
2323
#include <linux/vmalloc.h>
2424
#include <linux/fs.h>
25+
#include <kvm/arm_psci.h>
2526
#include <asm/cputype.h>
2627
#include <linux/uaccess.h>
2728
#include <asm/kvm.h>
@@ -176,6 +177,7 @@ static unsigned long num_core_regs(void)
176177
unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu)
177178
{
178179
return num_core_regs() + kvm_arm_num_coproc_regs(vcpu)
180+
+ kvm_arm_get_fw_num_regs(vcpu)
179181
+ NUM_TIMER_REGS;
180182
}
181183

@@ -196,6 +198,11 @@ int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *uindices)
196198
uindices++;
197199
}
198200

201+
ret = kvm_arm_copy_fw_reg_indices(vcpu, uindices);
202+
if (ret)
203+
return ret;
204+
uindices += kvm_arm_get_fw_num_regs(vcpu);
205+
199206
ret = copy_timer_indices(vcpu, uindices);
200207
if (ret)
201208
return ret;
@@ -214,6 +221,9 @@ int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
214221
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_CORE)
215222
return get_core_reg(vcpu, reg);
216223

224+
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_FW)
225+
return kvm_arm_get_fw_reg(vcpu, reg);
226+
217227
if (is_timer_reg(reg->id))
218228
return get_timer_reg(vcpu, reg);
219229

@@ -230,6 +240,9 @@ int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
230240
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_CORE)
231241
return set_core_reg(vcpu, reg);
232242

243+
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_FW)
244+
return kvm_arm_set_fw_reg(vcpu, reg);
245+
233246
if (is_timer_reg(reg->id))
234247
return set_timer_reg(vcpu, reg);
235248

arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi

-11
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,6 @@
155155
regulator-min-microvolt = <5000000>;
156156
regulator-max-microvolt = <5000000>;
157157
};
158-
159-
vdd_log: vdd-log {
160-
compatible = "pwm-regulator";
161-
pwms = <&pwm2 0 25000 0>;
162-
regulator-name = "vdd_log";
163-
regulator-min-microvolt = <800000>;
164-
regulator-max-microvolt = <1400000>;
165-
regulator-always-on;
166-
regulator-boot-on;
167-
status = "okay";
168-
};
169158
};
170159

171160
&cpu_b0 {

arch/arm64/include/asm/kvm_host.h

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ struct kvm_arch {
7171

7272
/* Interrupt controller */
7373
struct vgic_dist vgic;
74+
75+
/* Mandated version of PSCI */
76+
u32 psci_version;
7477
};
7578

7679
#define KVM_NR_MEM_OBJS 40

arch/arm64/include/uapi/asm/kvm.h

+6
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ struct kvm_arch_memory_slot {
200200
#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2)
201201
#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2)
202202

203+
/* KVM-as-firmware specific pseudo-registers */
204+
#define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT)
205+
#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \
206+
KVM_REG_ARM_FW | ((r) & 0xffff))
207+
#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0)
208+
203209
/* Device Control API: ARM VGIC */
204210
#define KVM_DEV_ARM_VGIC_GRP_ADDR 0
205211
#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1

arch/arm64/kvm/guest.c

+13-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/module.h>
2626
#include <linux/vmalloc.h>
2727
#include <linux/fs.h>
28+
#include <kvm/arm_psci.h>
2829
#include <asm/cputype.h>
2930
#include <linux/uaccess.h>
3031
#include <asm/kvm.h>
@@ -205,7 +206,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
205206
unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu)
206207
{
207208
return num_core_regs() + kvm_arm_num_sys_reg_descs(vcpu)
208-
+ NUM_TIMER_REGS;
209+
+ kvm_arm_get_fw_num_regs(vcpu) + NUM_TIMER_REGS;
209210
}
210211

211212
/**
@@ -225,6 +226,11 @@ int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *uindices)
225226
uindices++;
226227
}
227228

229+
ret = kvm_arm_copy_fw_reg_indices(vcpu, uindices);
230+
if (ret)
231+
return ret;
232+
uindices += kvm_arm_get_fw_num_regs(vcpu);
233+
228234
ret = copy_timer_indices(vcpu, uindices);
229235
if (ret)
230236
return ret;
@@ -243,6 +249,9 @@ int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
243249
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_CORE)
244250
return get_core_reg(vcpu, reg);
245251

252+
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_FW)
253+
return kvm_arm_get_fw_reg(vcpu, reg);
254+
246255
if (is_timer_reg(reg->id))
247256
return get_timer_reg(vcpu, reg);
248257

@@ -259,6 +268,9 @@ int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
259268
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_CORE)
260269
return set_core_reg(vcpu, reg);
261270

271+
if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_FW)
272+
return kvm_arm_set_fw_reg(vcpu, reg);
273+
262274
if (is_timer_reg(reg->id))
263275
return set_timer_reg(vcpu, reg);
264276

arch/microblaze/Kconfig.platform

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ config OPT_LIB_FUNCTION
2020
config OPT_LIB_ASM
2121
bool "Optimalized lib function ASM"
2222
depends on OPT_LIB_FUNCTION && (XILINX_MICROBLAZE0_USE_BARREL = 1)
23+
depends on CPU_BIG_ENDIAN
2324
default n
2425
help
2526
Allows turn on optimalized library function (memcpy and memmove).

arch/microblaze/lib/fastcopy.S

-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
* between mem locations with size of xfer spec'd in bytes
3030
*/
3131

32-
#ifdef __MICROBLAZEEL__
33-
#error Microblaze LE not support ASM optimized lib func. Disable OPT_LIB_ASM.
34-
#endif
35-
3632
#include <linux/linkage.h>
3733
.text
3834
.globl memcpy

0 commit comments

Comments
 (0)