aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-12-04 13:46:33 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2023-12-04 13:46:33 -0500
commiteeaaf96f553d11b3a460e3b3326f52bac767b612 (patch)
treeda027097fce39d28724c568a6c47b2ed76d9076f /target
parentdb5e49e76c64d513f9162ec91a6f91217af2b1d9 (diff)
parent2e8ed6a970e1842528f34aeb36b387834205c53a (diff)
downloadqemu-eeaaf96f553d11b3a460e3b3326f52bac767b612.zip
qemu-eeaaf96f553d11b3a460e3b3326f52bac767b612.tar.gz
qemu-eeaaf96f553d11b3a460e3b3326f52bac767b612.tar.bz2
Merge tag 'misc-fixes-20231204' of https://github.com/philmd/qemu into staging
Misc fixes for 8.2 - memory: Avoid unaligned accesses (Patrick) - target/riscv: Fix variable shadowing (Daniel) - tests/avocado: Update URL, skip flaky test (Alex, Phil) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmVt7w4ACgkQ4+MsLN6t # wN7AzA/+N1ec1I2IC0LYT8ThBCyV/92o+1FH5KaIxiVN5Ty3cACnGAac8IJ1K2tC # 5WG8Dxg4rq+bM16lUq9ME7k82Y3PoxLoRQa8fuClFKdHMXU2sgY4OwTx2606cO4B # 0H4gR+i3XgrgIDo8qRezWX0JSd1Srrz9QPlcq6kJfDtRq7DU0329aOobkyzuUJPb # DJD9YPu9y0KokBCBuVlt5ypNSM9xJGRtznFt1sFfNyPgNOnie3s+fYpPn26UigcY # 8OY/PMS5hapDw/s/gFKWQb/nCTSRnJKZ5dODOjHXK8HvTbYHedw8C4apXyjSXwBI # fBerNEKJHwD/1QkFhbNCIwsidH72BWeHljrelbZlsUfXU1VcCqNiXV8d2R9ak3xt # lrW7UcytC1+PqhmIVEXAOA4cwJcq6Hs9IcZ9G9aMvcmlhY3Fv0UKMoRYgsGTULeP # ySQF3FDSc6dldsfBdwqHGHlwL12EYmpN2sIhEc5aQ9y5Mmuj2FBOYHUbPpyoVLpw # e45n9Epc43GUVCMj3lZNjWKd+87nGjwKOM3rpBlcaSG3JRkLUe8o5APxeYzePZfO # 2IOWcGnrUixsvWbNY+6JF98n5hQK7Va3h/e1YbS1K2OZ013LT1SNiZ1LOrl9KiXf # agY6HMukKbCpJAqpXnMbgWdxCb7GdtjVaWKIVEgejeZTVdH4f8Y= # =r21r # -----END PGP SIGNATURE----- # gpg: Signature made Mon 04 Dec 2023 10:23:58 EST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'misc-fixes-20231204' of https://github.com/philmd/qemu: tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky tests/avocado: Update yamon-bin-02.22.zip URL target/riscv/kvm: fix shadowing in kvm_riscv_(get|put)_regs_csr system/memory: use ldn_he_p/stn_he_p Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/riscv/kvm/kvm-cpu.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
index 78fa1fa..45b6cf1 100644
--- a/target/riscv/kvm/kvm-cpu.c
+++ b/target/riscv/kvm/kvm-cpu.c
@@ -87,17 +87,17 @@ static uint64_t kvm_riscv_reg_id(CPURISCVState *env, uint64_t type,
#define KVM_RISCV_GET_CSR(cs, env, csr, reg) \
do { \
- int ret = kvm_get_one_reg(cs, RISCV_CSR_REG(env, csr), &reg); \
- if (ret) { \
- return ret; \
+ int _ret = kvm_get_one_reg(cs, RISCV_CSR_REG(env, csr), &reg); \
+ if (_ret) { \
+ return _ret; \
} \
} while (0)
#define KVM_RISCV_SET_CSR(cs, env, csr, reg) \
do { \
- int ret = kvm_set_one_reg(cs, RISCV_CSR_REG(env, csr), &reg); \
- if (ret) { \
- return ret; \
+ int _ret = kvm_set_one_reg(cs, RISCV_CSR_REG(env, csr), &reg); \
+ if (_ret) { \
+ return _ret; \
} \
} while (0)
@@ -533,7 +533,6 @@ static int kvm_riscv_put_regs_core(CPUState *cs)
static int kvm_riscv_get_regs_csr(CPUState *cs)
{
- int ret = 0;
CPURISCVState *env = &RISCV_CPU(cs)->env;
KVM_RISCV_GET_CSR(cs, env, sstatus, env->mstatus);
@@ -545,12 +544,12 @@ static int kvm_riscv_get_regs_csr(CPUState *cs)
KVM_RISCV_GET_CSR(cs, env, stval, env->stval);
KVM_RISCV_GET_CSR(cs, env, sip, env->mip);
KVM_RISCV_GET_CSR(cs, env, satp, env->satp);
- return ret;
+
+ return 0;
}
static int kvm_riscv_put_regs_csr(CPUState *cs)
{
- int ret = 0;
CPURISCVState *env = &RISCV_CPU(cs)->env;
KVM_RISCV_SET_CSR(cs, env, sstatus, env->mstatus);
@@ -563,7 +562,7 @@ static int kvm_riscv_put_regs_csr(CPUState *cs)
KVM_RISCV_SET_CSR(cs, env, sip, env->mip);
KVM_RISCV_SET_CSR(cs, env, satp, env->satp);
- return ret;
+ return 0;
}
static int kvm_riscv_get_regs_fp(CPUState *cs)