From: David Gibson <david@gibson.dropbear.id.au>
To: agraf@suse.de
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCH 2/3] target-ppc kvm: save cr register
Date: Sat, 15 Jun 2013 11:51:51 +1000 [thread overview]
Message-ID: <1371261112-17328-3-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1371261112-17328-1-git-send-email-david@gibson.dropbear.id.au>
From: Alexey Kardashevskiy <aik@ozlabs.ru>
This adds a missing code to save CR (condition register) via
kvm_arch_put_registers(). kvm_arch_get_registers() already has it.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target-ppc/kvm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 2bbc3b8..c89dd58 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -791,6 +791,11 @@ int kvm_arch_put_registers(CPUState *cs, int level)
for (i = 0;i < 32; i++)
regs.gpr[i] = env->gpr[i];
+ regs.cr = 0;
+ for (i = 0; i < 8; i++) {
+ regs.cr |= (env->crf[i] & 15) << (4 * (7 - i));
+ }
+
ret = kvm_vcpu_ioctl(cs, KVM_SET_REGS, ®s);
if (ret < 0)
return ret;
--
1.8.1.4
next prev parent reply other threads:[~2013-06-15 1:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-15 1:51 [Qemu-devel] [0/3] Accumulated ppc patches David Gibson
2013-06-15 1:51 ` [Qemu-devel] [PATCH 1/3] target-ppc: Change default machine for 64-bit David Gibson
2013-06-15 1:51 ` David Gibson [this message]
2013-06-15 1:51 ` [Qemu-devel] [PATCH 3/3] pseries: Update MAINTAINERS information David Gibson
2013-06-18 15:49 ` [Qemu-devel] [0/3] Accumulated ppc patches Alexander Graf
2013-06-18 23:20 ` Alexey Kardashevskiy
2013-06-19 9:41 ` Alexander Graf
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=1371261112-17328-3-git-send-email-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--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).