From: Greg Kroah-Hartman Date: Thu, 18 May 2017 07:20:17 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v3.18.54~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc21450924cb747fab675e10768ab9a2d43e5a1d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: arm64-kvm-fix-decoding-of-rt-rt2-when-trapping-aarch32-cp-accesses.patch --- diff --git a/queue-4.4/arm64-kvm-fix-decoding-of-rt-rt2-when-trapping-aarch32-cp-accesses.patch b/queue-4.4/arm64-kvm-fix-decoding-of-rt-rt2-when-trapping-aarch32-cp-accesses.patch new file mode 100644 index 00000000000..a9694c17faf --- /dev/null +++ b/queue-4.4/arm64-kvm-fix-decoding-of-rt-rt2-when-trapping-aarch32-cp-accesses.patch @@ -0,0 +1,46 @@ +From c667186f1c01ca8970c785888868b7ffd74e51ee Mon Sep 17 00:00:00 2001 +From: Marc Zyngier +Date: Thu, 27 Apr 2017 19:06:48 +0100 +Subject: arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses + +From: Marc Zyngier + +commit c667186f1c01ca8970c785888868b7ffd74e51ee upstream. + +Our 32bit CP14/15 handling inherited some of the ARMv7 code for handling +the trapped system registers, completely missing the fact that the +fields for Rt and Rt2 are now 5 bit wide, and not 4... + +Let's fix it, and provide an accessor for the most common Rt case. + +Reviewed-by: Christoffer Dall +Signed-off-by: Marc Zyngier +Signed-off-by: Christoffer Dall +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/kvm/sys_regs.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm64/kvm/sys_regs.c ++++ b/arch/arm64/kvm/sys_regs.c +@@ -1054,8 +1054,8 @@ static int kvm_handle_cp_64(struct kvm_v + { + struct sys_reg_params params; + u32 hsr = kvm_vcpu_get_hsr(vcpu); +- int Rt = (hsr >> 5) & 0xf; +- int Rt2 = (hsr >> 10) & 0xf; ++ int Rt = (hsr >> 5) & 0x1f; ++ int Rt2 = (hsr >> 10) & 0x1f; + + params.is_aarch32 = true; + params.is_32bit = false; +@@ -1106,7 +1106,7 @@ static int kvm_handle_cp_32(struct kvm_v + { + struct sys_reg_params params; + u32 hsr = kvm_vcpu_get_hsr(vcpu); +- int Rt = (hsr >> 5) & 0xf; ++ int Rt = (hsr >> 5) & 0x1f; + + params.is_aarch32 = true; + params.is_32bit = true; diff --git a/queue-4.4/series b/queue-4.4/series index 97ab1edf7c1..1e4e206b8fe 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -40,3 +40,4 @@ cifs-fix-mapping-of-sfm_space-and-sfm_period.patch cifs-fix-cifs_ioc_get_mnt_info-oops.patch cifs-add-misssing-sfm-mapping-for-doublequote.patch padata-free-correct-variable.patch +arm64-kvm-fix-decoding-of-rt-rt2-when-trapping-aarch32-cp-accesses.patch