- cvm : bug fix for undefined reference to 'virtcca_cvm_allowed' while compiling - cvm : bug-fix for incorrect device name check for vhost-user-fs - target/i386: add control bits support for LAM - target/i386: add support for LAM in CPUID enumeration - Add support for the virtcca cvm feature. - target/sparc: use signed denominator in sdiv helper - crypto: Introduce SM4 symmetric cipher algorithm - ppc/vof: Fix unaligned FDT property access - vl: fix "type is NULL" in -vga help - hw/display/bcm2835_fb: fix fb_use_offsets condition - aspeed/smc: Fix possible integer overflow - hw/nvme: fix number of PIDs for FDP RUH update - hw/nvme: fix memory leak in nvme_dsm - hvf: arm: Do not advance PC when raising an exception - physmem: Bail out qemu_ram_block_from_host() for invalid ram addrs Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From ad1d68502c41ff6a966ae89ae5ac008050602e2a Mon Sep 17 00:00:00 2001
|
|
From: qihao <qihao_yewu@cmss.chinamobile.com>
|
|
Date: Mon, 29 Jul 2024 10:38:46 +0800
|
|
Subject: [PATCH] ppc/vof: Fix unaligned FDT property access
|
|
|
|
cheery-pick from 785c8637f9d2362a8addf4ded853d975955a9d6b
|
|
|
|
FDT properties are aligned by 4 bytes, not 8 bytes.
|
|
|
|
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
|
|
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
|
|
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
Signed-off-by: qihao_yewu <qihao_yewu@cmss.chinamobile.com>
|
|
---
|
|
hw/ppc/vof.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c
|
|
index e3b430a81f..b5b6514d79 100644
|
|
--- a/hw/ppc/vof.c
|
|
+++ b/hw/ppc/vof.c
|
|
@@ -646,7 +646,7 @@ static void vof_dt_memory_available(void *fdt, GArray *claimed, uint64_t base)
|
|
mem0_reg = fdt_getprop(fdt, offset, "reg", &proplen);
|
|
g_assert(mem0_reg && proplen == sizeof(uint32_t) * (ac + sc));
|
|
if (sc == 2) {
|
|
- mem0_end = be64_to_cpu(*(uint64_t *)(mem0_reg + sizeof(uint32_t) * ac));
|
|
+ mem0_end = ldq_be_p(mem0_reg + sizeof(uint32_t) * ac);
|
|
} else {
|
|
mem0_end = be32_to_cpu(*(uint32_t *)(mem0_reg + sizeof(uint32_t) * ac));
|
|
}
|
|
--
|
|
2.41.0.windows.1
|
|
|