mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
KVM: arm64: Log an error if trapping a write-to-read-only GICv3 access
A write-to-read-only GICv3 access should UNDEF at EL1. But since we're in complete paranoia-land with broken CPUs, let's assume the worse and gracefully handle the case. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Christoffer Dall <[email protected]> Signed-off-by: Christoffer Dall <[email protected]>
This commit is contained in:
parent
e7f1d1eef4
commit
7b1dba1f73
2 changed files with 21 additions and 0 deletions
|
|
@ -976,6 +976,8 @@ int __hyp_text __vgic_v3_perform_cpuif_access(struct kvm_vcpu *vcpu)
|
|||
switch (sysreg) {
|
||||
case SYS_ICC_IAR0_EL1:
|
||||
case SYS_ICC_IAR1_EL1:
|
||||
if (unlikely(!is_read))
|
||||
return 0;
|
||||
fn = __vgic_v3_read_iar;
|
||||
break;
|
||||
case SYS_ICC_EOIR0_EL1:
|
||||
|
|
@ -1026,6 +1028,8 @@ int __hyp_text __vgic_v3_perform_cpuif_access(struct kvm_vcpu *vcpu)
|
|||
break;
|
||||
case SYS_ICC_HPPIR0_EL1:
|
||||
case SYS_ICC_HPPIR1_EL1:
|
||||
if (unlikely(!is_read))
|
||||
return 0;
|
||||
fn = __vgic_v3_read_hppir;
|
||||
break;
|
||||
case SYS_ICC_GRPEN0_EL1:
|
||||
|
|
@ -1046,6 +1050,8 @@ int __hyp_text __vgic_v3_perform_cpuif_access(struct kvm_vcpu *vcpu)
|
|||
fn = __vgic_v3_write_dir;
|
||||
break;
|
||||
case SYS_ICC_RPR_EL1:
|
||||
if (unlikely(!is_read))
|
||||
return 0;
|
||||
fn = __vgic_v3_read_rpr;
|
||||
break;
|
||||
case SYS_ICC_CTLR_EL1:
|
||||
|
|
|
|||
Loading…
Reference in a new issue