aboutsummaryrefslogtreecommitdiff
path: root/tests/avocado/ppc_hv_tests.py
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2024-03-19 16:01:46 +1000
committerNicholas Piggin <npiggin@gmail.com>2024-03-30 18:50:25 +1000
commit434531619fecd5ff9a08e548ed87b2b73c29cf3e (patch)
tree2c15630389ad38bb4a7f4e2a1bbbb23723cce211 /tests/avocado/ppc_hv_tests.py
parented399ade3c85adf82fe507339560693e83a27020 (diff)
target/ppc: Do not clear MSR[ME] on MCE interrupts to supervisor
Hardware clears the MSR[ME] bit when delivering a machine check interrupt, so that is what QEMU does. The spapr environment runs in supervisor mode though, and receives machine check interrupts after they are processed by the hypervisor, and MSR[ME] must always be enabled in supervisor mode (otherwise it could checkstop the system). So MSR[ME] must not be cleared when delivering machine checks to the supervisor. The fix to prevent supervisor mode from modifying MSR[ME] also prevented it from re-enabling the incorrectly cleared MSR[ME] bit when returning from handling the interrupt. Before that fix, the problem was not very noticable with well-behaved code. So the Fixes tag is not strictly correct, but practically they go together. Found by kvm-unit-tests machine check tests (not yet upstream). Fixes: 678b6f1af75ef ("target/ppc: Prevent supervisor from modifying MSR[ME]") Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'tests/avocado/ppc_hv_tests.py')
0 files changed, 0 insertions, 0 deletions