[PATCH 6/8] arm64: KVM: PMU: Inject UNDEF on read access to PMSWINC_EL0

Marc Zyngier marc.zyngier at arm.com
Wed Feb 22 03:47:26 PST 2017


PMSWINC_EL0 is a WO register, so let's UNDEF when reading from it.

Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
---
 arch/arm64/kvm/sys_regs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index cbe966658d5e..01c8d841851e 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -778,6 +778,7 @@ static bool access_pmswinc(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
 		return true;
 	}
 
+	pend_undef(vcpu);
 	return false;
 }
 
-- 
2.11.0




More information about the linux-arm-kernel mailing list