From: Alexander Graf <agraf@suse.de>
To: peter.maydell@linaro.org
Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/8] target-ppc: KVMPPC_H_CAS fix cpu-version endianess
Date: Tue, 8 Jul 2014 12:20:11 +0200 [thread overview]
Message-ID: <1404814818-15101-2-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1404814818-15101-1-git-send-email-agraf@suse.de>
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
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 <ldufour@linux.vnet.ibm.com>
Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
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
next prev parent reply other threads:[~2014-07-08 10:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 10:20 [Qemu-devel] [PULL 2.1 0/8] ppc patch queue 2014-07-08 Alexander Graf
2014-07-08 10:20 ` Alexander Graf [this message]
2014-07-08 10:20 ` [Qemu-devel] [PULL 2/8] target-ppc: Change default cpu for ppc64le-linux-user Alexander Graf
2014-07-08 10:20 ` [Qemu-devel] [PULL 3/8] target-ppc: Fix gdbstub " Alexander Graf
2014-07-08 10:20 ` [Qemu-devel] [PULL 4/8] PPC: Fix booke206 TLB with phys addrs > 32bit Alexander Graf
2014-07-08 10:20 ` [Qemu-devel] [PULL 5/8] pseries: Update SLOF firmware image to qemu-slof-20140630 Alexander Graf
2014-07-08 10:20 ` [Qemu-devel] [PULL 6/8] target-ppc: Add pvr_match() callback Alexander Graf
2014-07-08 10:20 ` [Qemu-devel] [PULL 7/8] target-ppc: Remove POWER7+ and POWER8E families Alexander Graf
2014-07-08 10:20 ` [Qemu-devel] [PULL 8/8] PPC: e500: Actually install u-boot.e500 Alexander Graf
2014-07-08 11:31 ` [Qemu-devel] [PULL 2.1 0/8] ppc patch queue 2014-07-08 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404814818-15101-2-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=ldufour@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).