arm64: KVM: Inject a vSerror if detecting a bad GICV access at EL2
If, when proxying a GICV access at EL2, we detect that the guest is doing something silly, report an EL1 SError instead ofgnoring the access. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
This commit is contained in:

committed by
Christoffer Dall

parent
21977a4c57
commit
3272f0d08e
@@ -311,9 +311,21 @@ again:
|
||||
!kvm_vcpu_dabt_isextabt(vcpu) &&
|
||||
!kvm_vcpu_dabt_iss1tw(vcpu);
|
||||
|
||||
if (valid && __vgic_v2_perform_cpuif_access(vcpu)) {
|
||||
__skip_instr(vcpu);
|
||||
goto again;
|
||||
if (valid) {
|
||||
int ret = __vgic_v2_perform_cpuif_access(vcpu);
|
||||
|
||||
if (ret == 1) {
|
||||
__skip_instr(vcpu);
|
||||
goto again;
|
||||
}
|
||||
|
||||
if (ret == -1) {
|
||||
/* Promote an illegal access to an SError */
|
||||
__skip_instr(vcpu);
|
||||
exit_code = ARM_EXCEPTION_EL1_SERROR;
|
||||
}
|
||||
|
||||
/* 0 falls through to be handler out of EL2 */
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user