mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
KVM: arm64: nv: Inject SEA TTW when desc update can't write to GPA
Similar to the handling of descriptor reads, inject an SEA during TTW when the descriptor access fails for reasons other than a race, such as a read-only memslot or a bad HVA. Fixes:bff8aa213d("KVM: arm64: Implement HW access flag management in stage-1 SW PTW") Fixes:e4c7dfac2f("KVM: arm64: nv: Implement HW access flag management in stage-2 SW PTW") Signed-off-by: Oliver Upton <oupton@kernel.org> Link: https://patch.msgid.link/20260602235450.103057-4-oupton@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
This commit is contained in:
parent
5949004d70
commit
efa871f4a2
|
|
@ -521,8 +521,12 @@ static int walk_s1(struct kvm_vcpu *vcpu, struct s1_walk_info *wi,
|
|||
}
|
||||
|
||||
ret = kvm_swap_s1_desc(vcpu, ipa, desc, new_desc, wi);
|
||||
if (ret)
|
||||
if (ret == -EAGAIN)
|
||||
return ret;
|
||||
if (ret) {
|
||||
fail_s1_walk(wr, ESR_ELx_FSC_SEA_TTW(level), false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
desc = new_desc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -352,8 +352,13 @@ static int walk_nested_s2_pgd(struct kvm_vcpu *vcpu, phys_addr_t ipa,
|
|||
|
||||
if (new_desc != desc) {
|
||||
ret = swap_guest_s2_desc(vcpu, paddr, desc, new_desc, wi);
|
||||
if (ret)
|
||||
if (ret == -EAGAIN)
|
||||
return ret;
|
||||
if (ret) {
|
||||
out->esr = ESR_ELx_FSC_SEA_TTW(level);
|
||||
out->desc = desc;
|
||||
return 1;
|
||||
}
|
||||
|
||||
desc = new_desc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user