From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org,
christoffer.dall@linaro.org, zhichao.huang@linaro.org
Cc: marc.zyngier@arm.com, "Alex Bennée" <alex.bennee@linaro.org>,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
kvmarm@lists.cs.columbia.edu
Subject: [Qemu-devel] [PATCH v5 2/6] target-arm: kvm64: introduce kvm_arm_init_debug()
Date: Fri, 29 May 2015 16:19:20 +0100 [thread overview]
Message-ID: <1432912764-7073-3-git-send-email-alex.bennee@linaro.org> (raw)
In-Reply-To: <1432912764-7073-1-git-send-email-alex.bennee@linaro.org>
As we haven't always had guest debug support we need to probe for it.
Additionally we don't do this in the start-up capability code so we
don't fall over on old kernels.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
target-arm/kvm64.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c
index 93c1ca8..61592d2 100644
--- a/target-arm/kvm64.c
+++ b/target-arm/kvm64.c
@@ -25,6 +25,22 @@
#include "internals.h"
#include "hw/arm/arm.h"
+static bool have_guest_debug;
+
+/**
+ * kvm_arm_init_debug()
+ * @cs: CPUState
+ *
+ * Check for guest debug capabilities.
+ *
+ */
+static void kvm_arm_init_debug(CPUState *cs)
+{
+ have_guest_debug = kvm_check_extension(cs->kvm_state,
+ KVM_CAP_SET_GUEST_DEBUG);
+ return;
+}
+
static inline void set_feature(uint64_t *features, int feature)
{
*features |= 1ULL << feature;
@@ -107,6 +123,8 @@ int kvm_arch_init_vcpu(CPUState *cs)
return ret;
}
+ kvm_arm_init_debug(cs);
+
return kvm_arm_init_cpreg_list(cpu);
}
--
2.4.1
next prev parent reply other threads:[~2015-05-29 15:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 15:19 [Qemu-devel] [PATCH v5 0/6] QEMU support for KVM Guest Debug on arm64 Alex Bennée
2015-05-29 15:19 ` [Qemu-devel] [PATCH v5 1/6] linux-headers: sync from my kernel tree (DEV) Alex Bennée
2015-05-29 15:19 ` Alex Bennée [this message]
2015-06-04 10:56 ` [Qemu-devel] [PATCH v5 2/6] target-arm: kvm64: introduce kvm_arm_init_debug() Peter Maydell
2015-05-29 15:19 ` [Qemu-devel] [PATCH v5 3/6] target-arm: kvm - implement software breakpoints Alex Bennée
2015-06-04 10:56 ` Peter Maydell
2015-05-29 15:19 ` [Qemu-devel] [PATCH v5 4/6] target-arm: kvm - support for single step Alex Bennée
2015-06-04 10:59 ` Peter Maydell
2015-05-29 15:19 ` [Qemu-devel] [PATCH v5 5/6] target-arm: kvm - add support for HW assisted debug Alex Bennée
2015-06-04 11:10 ` Peter Maydell
2015-05-29 15:19 ` [Qemu-devel] [PATCH v5 6/6] target-arm: kvm - re-inject guest debug exceptions Alex Bennée
2015-06-04 11:29 ` Peter Maydell
2015-06-04 11:35 ` [Qemu-devel] [PATCH v5 0/6] QEMU support for KVM Guest Debug on arm64 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=1432912764-7073-3-git-send-email-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=zhichao.huang@linaro.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).