From: Liu Yu <yu.liu@freescale.com>
To: qemu-devel@nongnu.org
Cc: jan.kiszka@siemens.com, froydnj@codesourcery.com,
Liu Yu <yu.liu@freescale.com>,
kvm-ppc@vger.kernel.org, hollisb@us.ibm.com
Subject: [Qemu-devel] [PATCH 5/5] kvmppc: guest debug init
Date: Tue, 4 Aug 2009 17:36:08 +0800 [thread overview]
Message-ID: <1249378568-18008-6-git-send-email-yu.liu@freescale.com> (raw)
In-Reply-To: <1249378568-18008-5-git-send-email-yu.liu@freescale.com>
440(BOOKE) supports 4 hardware breakpoints,
while e500 supports 2.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
---
target-ppc/kvm.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 97a0737..82e7897 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -42,6 +42,10 @@
do { } while (0)
#endif
+#ifdef KVM_CAP_SET_GUEST_DEBUG
+static void kvmppc_debug_init(int, int);
+#endif
+
int kvm_arch_init(KVMState *s, int smp_cpus)
{
return 0;
@@ -55,6 +59,12 @@ int kvm_arch_init_vcpu(CPUState *cenv)
sregs.pvr = cenv->spr[SPR_PVR];
ret = kvm_vcpu_ioctl(cenv, KVM_SET_SREGS, &sregs);
+#ifdef KVM_CAP_SET_GUEST_DEBUG
+ if (strcmp(cenv->cpu_model_str, "405"))
+ kvmppc_debug_init(4, 2);
+ if (strcmp(cenv->cpu_model_str, "e500v2_v30"))
+ kvmppc_debug_init(2, 2); /* E500v2 doesn't support IAC3,IAC4 */
+#endif
return ret;
}
--
1.5.4
next prev parent reply other threads:[~2009-08-04 9:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 9:36 [Qemu-devel] [PATCH v2 0/5] kvmppc: Add guest debug support Liu Yu
2009-08-04 9:36 ` [Qemu-devel] [PATCH 1/5] kvmppc: Fix build error Liu Yu
2009-08-04 9:36 ` [Qemu-devel] [PATCH 2/5] kvmppc: Synchronize booke registers Liu Yu
2009-08-04 9:36 ` [Qemu-devel] [PATCH 3/5] kvmppc: Guest debug support Liu Yu
2009-08-04 9:36 ` [Qemu-devel] [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu Liu Yu
2009-08-04 9:36 ` Liu Yu [this message]
2009-08-19 22:51 ` [Qemu-devel] " Hollis Blanchard
2009-08-20 10:21 ` [Qemu-devel] " Liu Yu-B13201
2009-08-21 12:38 ` [Qemu-devel] " Alexander Graf
2009-08-24 2:44 ` [Qemu-devel] " Liu Yu-B13201
2009-08-24 17:33 ` Hollis Blanchard
2009-08-29 21:48 ` [Qemu-devel] " 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=1249378568-18008-6-git-send-email-yu.liu@freescale.com \
--to=yu.liu@freescale.com \
--cc=froydnj@codesourcery.com \
--cc=hollisb@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=qemu-devel@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).