From: Ard Biesheuvel Date: Tue, 9 Sep 2014 10:27:09 +0000 (+0100) Subject: ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault() X-Git-Tag: fixes-for-v3.18-merge-window~23^2~3^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7d079cea2dffb112e26da2566dd84c0ef1fce97;p=pandora-kernel.git ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault() The ISS encoding for an exception from a Data Abort has a WnR bit[6] that indicates whether the Data Abort was caused by a read or a write instruction. While there are several fields in the encoding that are only valid if the ISV bit[24] is set, WnR is not one of them, so we can read it unconditionally. Instead of fixing both implementations of kvm_is_write_fault() in place, reimplement it just once using kvm_vcpu_dabt_iswrite(), which already does the right thing with respect to the WnR bit. Also fix up the callers to pass 'vcpu' Acked-by: Laszlo Ersek Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier --- Reading git-diff-tree failed