diff options
author | Song Gao <gaosong@loongson.cn> | 2022-11-01 14:53:31 +0800 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2022-11-04 17:09:50 +0800 |
commit | 8752b1306002237c39b3f849ca564c9db55c8b1f (patch) | |
tree | 762cbe102ac173040bc2f03e5ed9b7b94cf85b35 /migration/target.c | |
parent | a6b129c8102668717370ec27490523fb1290ae5d (diff) | |
download | qemu-8752b1306002237c39b3f849ca564c9db55c8b1f.zip qemu-8752b1306002237c39b3f849ca564c9db55c8b1f.tar.gz qemu-8752b1306002237c39b3f849ca564c9db55c8b1f.tar.bz2 |
target/loongarch: Fix raise_mmu_exception() set wrong exception_index
When the address is invalid address, We should set exception_index
according to MMUAccessType, and EXCCODE_ADEF need't update badinstr.
Otherwise, The system enters an infinite loop. e.g:
run test.c on system mode
test.c:
#include<stdio.h>
void (*func)(int *);
int main()
{
int i = 8;
void *ptr = (void *)0x4000000000000000;
func = ptr;
func(&i);
return 0;
}
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20221101073210.3934280-2-gaosong@loongson.cn>
Diffstat (limited to 'migration/target.c')
0 files changed, 0 insertions, 0 deletions