mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm64: entry: Actually skip do_trap_*() when an SError is triggered
For SErrors, we support two configurations:
* Every SErrors will result to a panic in Xen
* We will forward SErrors triggered by a VM back to itself
For the latter case, we want to skip the call to do_trap_*() because the PC
was already adjusted.
However, the alternative used to decide between the two configurations
is inverted. This would result to the VM corrupting itself if:
* x19 is non-zero in the panic case
* advance PC too much in the second case
Solve the issue by switch from alternative_if to alternative_if_not.
Fixes: a458d3bd0d ("xen/arm: entry: Ensure the guest state is synced when receiving a vSError")
Signed-off-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
1 parent
8fc1b356af
commit
35c64c3dce
1 file changed
+1
-1
@@ -259,7 +259,7 @@
|
|||||||
* apart. The easiest way is to duplicate the few instructions
|
* apart. The easiest way is to duplicate the few instructions
|
||||||
* that need to be skipped.
|
* that need to be skipped.
|
||||||
*/
|
*/
|
||||||
alternative_if SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT
|
alternative_if_not SKIP_SYNCHRONIZE_SERROR_ENTRY_EXIT
|
||||||
cbnz x19, 1f
|
cbnz x19, 1f
|
||||||
mov x0, sp
|
mov x0, sp
|
||||||
bl do_trap_\trap
|
bl do_trap_\trap
|
||||||
|
|||||||