aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-04-04 13:47:58 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-04-04 13:47:58 +0100
commit4584e76c9ae0c03a562d4c9726fe7811ea3628c8 (patch)
tree935a2e856fd22394dee42c621625b64ecfe40834
parentb8b6d3c04a54afb18865584e4a81aa17a5072c7a (diff)
parentec28dd6c6fc1366504003c25828953cac49e2da7 (diff)
downloadqemu-4584e76c9ae0c03a562d4c9726fe7811ea3628c8.zip
qemu-4584e76c9ae0c03a562d4c9726fe7811ea3628c8.tar.gz
qemu-4584e76c9ae0c03a562d4c9726fe7811ea3628c8.tar.bz2
Merge tag 'pull-loongarch-20230404' of https://gitlab.com/gaosong/qemu into staging
pull-loongarch-20230404 # -----BEGIN PGP SIGNATURE----- # # iLMEAAEIAB0WIQS4/x2g0v3LLaCcbCxAov/yOSY+3wUCZCwLXQAKCRBAov/yOSY+ # 3zwUA/9d2ddHxGEBTMyF45bzc9JxRF6HoILAwMLsmPWqspPgKdGuviMVewJLt5m8 # V75/BC6Sn9rhdkXALvZMRV6WQ2A16pByUaQtMYAXVsIoV8Mrpvm4GwJD1E0/cy5Q # TwDTzpDfys9WsTVj0QlCPjp0JW+KA7Y6ArMUUCdCz41L2r7mPA== # =ovw7 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 04 Apr 2023 12:34:53 BST # gpg: using RSA key B8FF1DA0D2FDCB2DA09C6C2C40A2FFF239263EDF # gpg: Good signature from "Song Gao <m17746591750@163.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B8FF 1DA0 D2FD CB2D A09C 6C2C 40A2 FFF2 3926 3EDF * tag 'pull-loongarch-20230404' of https://gitlab.com/gaosong/qemu: target/loongarch: Enables plugins to get instruction codes hw/loongarch/virt: Fix virt_to_phys_addr function Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/loongarch/virt.c2
-rw-r--r--target/loongarch/translate.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index b702c3f..f4bf14c 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -399,7 +399,7 @@ static struct _loaderparams {
static uint64_t cpu_loongarch_virt_to_phys(void *opaque, uint64_t addr)
{
- return addr & 0x1fffffffll;
+ return addr & MAKE_64BIT_MASK(0, TARGET_PHYS_ADDR_SPACE_BITS);
}
static int64_t load_kernel_info(void)
diff --git a/target/loongarch/translate.c b/target/loongarch/translate.c
index f443b58..21d8607 100644
--- a/target/loongarch/translate.c
+++ b/target/loongarch/translate.c
@@ -177,7 +177,7 @@ static void loongarch_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
CPULoongArchState *env = cs->env_ptr;
DisasContext *ctx = container_of(dcbase, DisasContext, base);
- ctx->opcode = cpu_ldl_code(env, ctx->base.pc_next);
+ ctx->opcode = translator_ldl(env, &ctx->base, ctx->base.pc_next);
if (!decode(ctx, ctx->opcode)) {
qemu_log_mask(LOG_UNIMP, "Error: unknown opcode. "