[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 1/8] target-ppc: KVMPPC_H_CAS fix cpu-version endianess
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 1/8] target-ppc: KVMPPC_H_CAS fix cpu-version endianess |
Date: |
Tue, 8 Jul 2014 12:20:11 +0200 |
From: Laurent Dufour <address@hidden>
During KVMPPC_H_CAS processing, the cpu-version updated value is stored
without taking care of the current endianess. As a consequence, the guest
may not switch to the right CPU model, leading to unexpected results.
If needed, the value is now converted.
Fixes: 6d9412ea8132 ("target-ppc: Implement "compat" CPU option")
Signed-off-by: Laurent Dufour <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/spapr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index a8ba916..a23c0f0 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -160,8 +160,7 @@ static int spapr_fixup_cpu_smt_dt(void *fdt, int offset,
PowerPCCPU *cpu,
int index = ppc_get_vcpu_dt_id(cpu);
if (cpu->cpu_version) {
- ret = fdt_setprop(fdt, offset, "cpu-version",
- &cpu->cpu_version, sizeof(cpu->cpu_version));
+ ret = fdt_setprop_cell(fdt, offset, "cpu-version", cpu->cpu_version);
if (ret < 0) {
return ret;
}
--
1.8.1.4
- [Qemu-ppc] [PULL 2.1 0/8] ppc patch queue 2014-07-08, Alexander Graf, 2014/07/08
- [Qemu-ppc] [PULL 5/8] pseries: Update SLOF firmware image to qemu-slof-20140630, Alexander Graf, 2014/07/08
- [Qemu-ppc] [PULL 1/8] target-ppc: KVMPPC_H_CAS fix cpu-version endianess,
Alexander Graf <=
- Re: [Qemu-ppc] [PULL 2.1 0/8] ppc patch queue 2014-07-08, Peter Maydell, 2014/07/08
- [Qemu-ppc] [PULL 6/8] target-ppc: Add pvr_match() callback, Alexander Graf, 2014/07/08
- [Qemu-ppc] [PULL 8/8] PPC: e500: Actually install u-boot.e500, Alexander Graf, 2014/07/08
- [Qemu-ppc] [PULL 4/8] PPC: Fix booke206 TLB with phys addrs > 32bit, Alexander Graf, 2014/07/08
- [Qemu-ppc] [PULL 2/8] target-ppc: Change default cpu for ppc64le-linux-user, Alexander Graf, 2014/07/08
- [Qemu-ppc] [PULL 7/8] target-ppc: Remove POWER7+ and POWER8E families, Alexander Graf, 2014/07/08
- [Qemu-ppc] [PULL 3/8] target-ppc: Fix gdbstub for ppc64le-linux-user, Alexander Graf, 2014/07/08