Skip to content

Commit

Permalink
KVM: arm64: Re-mask SError after the one instruction window
Browse files Browse the repository at this point in the history
KVM consumes any SError that were pending during guest exit with a
dsb/isb and unmasking SError. It currently leaves SError unmasked for
the rest of world-switch.

This means any SError that occurs during this part of world-switch
will cause a hyp-panic. We'd much prefer it to remain pending until
we return to the host.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
  • Loading branch information
James Morse authored and Marc Zyngier committed Jul 5, 2019
1 parent 3276cc2 commit dad6321
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm64/kvm/hyp/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ abort_guest_exit_start:
.global abort_guest_exit_end
abort_guest_exit_end:

msr daifset, #4 // Mask aborts

// If the exception took place, restore the EL1 exception
// context so that we can report some information.
// Merge the exception code with the SError pending bit.
Expand Down

0 comments on commit dad6321

Please sign in to comment.