From: drjones@redhat.com (Andrew Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl
Date: Wed, 26 Nov 2014 15:38:56 +0100 [thread overview]
Message-ID: <20141126143855.GC3245@hawk.usersys.redhat.com> (raw)
In-Reply-To: <1416931805-23223-4-git-send-email-alex.bennee@linaro.org>
On Tue, Nov 25, 2014 at 04:10:01PM +0000, Alex Benn?e wrote:
> This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
> ioctl. Currently any operation flag will return EINVAL. Actual
> functionality will be added with further patches.
Technically the stub is already there, and you're extending it to
start looking at control flags, but still not doing anything yet.
>
> Signed-off-by: Alex Benn?e <alex.bennee@linaro.org>.
>
> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
> index 7610eaa..2c6386e 100644
> --- a/Documentation/virtual/kvm/api.txt
> +++ b/Documentation/virtual/kvm/api.txt
> @@ -2570,7 +2570,7 @@ handled.
> 4.87 KVM_SET_GUEST_DEBUG
>
> Capability: KVM_CAP_SET_GUEST_DEBUG
> -Architectures: x86, s390, ppc
> +Architectures: x86, s390, ppc, arm64
> Type: vcpu ioctl
> Parameters: struct kvm_guest_debug (in)
> Returns: 0 on success; -1 on error
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index 9e193c8..a0ff410 100644
> --- a/arch/arm/kvm/arm.c
> +++ b/arch/arm/kvm/arm.c
> @@ -180,6 +180,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> case KVM_CAP_ARM_PSCI:
> case KVM_CAP_ARM_PSCI_0_2:
> case KVM_CAP_READONLY_MEM:
> + case KVM_CAP_SET_GUEST_DEBUG:
> r = 1;
> break;
> case KVM_CAP_COALESCED_MMIO:
> @@ -302,7 +303,34 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
> int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
> struct kvm_guest_debug *dbg)
> {
> - return -EINVAL;
> + /* If it's not enabled clear all flags */
> + if (!(dbg->control & KVM_GUESTDBG_ENABLE)) {
> + vcpu->guest_debug = 0;
> + return 0;
> + }
> +
> + vcpu->guest_debug = dbg->control;
> + kvm_info("%s: guest_debug is 0x%lx\n", __func__, vcpu->guest_debug);
> +
> + /* Single Step */
> + if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
> + kvm_info("SS requested, not yet implemented\n");
> + return -EINVAL;
> + }
> +
> + /* Software Break Points */
> + if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP) {
> + kvm_info("SW BP support requested, not yet implemented\n");
> + return -EINVAL;
> + }
> +
> + /* Hardware assisted Break and Watch points */
> + if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP) {
> + kvm_info("HW BP support requested, not yet implemented\n");
> + return -EINVAL;
> + }
> +
> + return 0;
> }
I guess all the kvm_info's were useful for developing this patch series,
but do we still need them?
>
>
> --
> 2.1.3
>
> _______________________________________________
> kvmarm mailing list
> kvmarm at lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <drjones@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org,
marc.zyngier@arm.com, peter.maydell@linaro.org, agraf@suse.de,
Russell King <linux@arm.linux.org.uk>,
Jonathan Corbet <corbet@lwn.net>, Gleb Natapov <gleb@kernel.org>,
jan.kiszka@siemens.com,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
dahi@linux.vnet.ibm.com, r65777@freescale.com,
pbonzini@redhat.com, bp@suse.de
Subject: Re: [PATCH 3/7] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl
Date: Wed, 26 Nov 2014 15:38:56 +0100 [thread overview]
Message-ID: <20141126143855.GC3245@hawk.usersys.redhat.com> (raw)
In-Reply-To: <1416931805-23223-4-git-send-email-alex.bennee@linaro.org>
On Tue, Nov 25, 2014 at 04:10:01PM +0000, Alex Bennée wrote:
> This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
> ioctl. Currently any operation flag will return EINVAL. Actual
> functionality will be added with further patches.
Technically the stub is already there, and you're extending it to
start looking at control flags, but still not doing anything yet.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>.
>
> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
> index 7610eaa..2c6386e 100644
> --- a/Documentation/virtual/kvm/api.txt
> +++ b/Documentation/virtual/kvm/api.txt
> @@ -2570,7 +2570,7 @@ handled.
> 4.87 KVM_SET_GUEST_DEBUG
>
> Capability: KVM_CAP_SET_GUEST_DEBUG
> -Architectures: x86, s390, ppc
> +Architectures: x86, s390, ppc, arm64
> Type: vcpu ioctl
> Parameters: struct kvm_guest_debug (in)
> Returns: 0 on success; -1 on error
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index 9e193c8..a0ff410 100644
> --- a/arch/arm/kvm/arm.c
> +++ b/arch/arm/kvm/arm.c
> @@ -180,6 +180,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> case KVM_CAP_ARM_PSCI:
> case KVM_CAP_ARM_PSCI_0_2:
> case KVM_CAP_READONLY_MEM:
> + case KVM_CAP_SET_GUEST_DEBUG:
> r = 1;
> break;
> case KVM_CAP_COALESCED_MMIO:
> @@ -302,7 +303,34 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
> int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
> struct kvm_guest_debug *dbg)
> {
> - return -EINVAL;
> + /* If it's not enabled clear all flags */
> + if (!(dbg->control & KVM_GUESTDBG_ENABLE)) {
> + vcpu->guest_debug = 0;
> + return 0;
> + }
> +
> + vcpu->guest_debug = dbg->control;
> + kvm_info("%s: guest_debug is 0x%lx\n", __func__, vcpu->guest_debug);
> +
> + /* Single Step */
> + if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
> + kvm_info("SS requested, not yet implemented\n");
> + return -EINVAL;
> + }
> +
> + /* Software Break Points */
> + if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP) {
> + kvm_info("SW BP support requested, not yet implemented\n");
> + return -EINVAL;
> + }
> +
> + /* Hardware assisted Break and Watch points */
> + if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP) {
> + kvm_info("HW BP support requested, not yet implemented\n");
> + return -EINVAL;
> + }
> +
> + return 0;
> }
I guess all the kvm_info's were useful for developing this patch series,
but do we still need them?
>
>
> --
> 2.1.3
>
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2014-11-26 14:38 UTC|newest]
Thread overview: 109+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 16:09 [PATCH 0/7] KVM Guest Debug support for arm64 Alex Bennée
2014-11-25 16:09 ` Alex Bennée
2014-11-25 16:09 ` [PATCH 1/7] KVM: add commentary for kvm_debug_exit_arch struct Alex Bennée
2014-11-25 16:09 ` Alex Bennée
2014-11-25 16:09 ` Alex Bennée
[not found] ` <1416931805-23223-2-git-send-email-alex.bennee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-11-26 14:20 ` Andrew Jones
2014-11-26 14:20 ` Andrew Jones
2014-11-26 14:20 ` Andrew Jones
2014-11-25 16:10 ` [PATCH 2/7] KVM: arm: guest debug, define API headers Alex Bennée
2014-11-25 16:10 ` Alex Bennée
2014-11-25 16:19 ` Peter Maydell
2014-11-25 16:19 ` Peter Maydell
2014-11-26 15:04 ` Alex Bennée
2014-11-26 15:04 ` Alex Bennée
2014-11-29 16:20 ` Christoffer Dall
2014-11-29 16:20 ` Christoffer Dall
2014-12-01 11:30 ` Alex Bennée
2014-12-01 11:30 ` Alex Bennée
2014-11-25 17:05 ` Paolo Bonzini
2014-11-25 17:05 ` Paolo Bonzini
2014-11-25 17:13 ` Peter Maydell
2014-11-25 17:13 ` Peter Maydell
2014-11-25 17:22 ` Paolo Bonzini
2014-11-25 17:22 ` Paolo Bonzini
2014-11-26 13:13 ` Alex Bennée
2014-11-26 13:13 ` Alex Bennée
2014-11-26 13:14 ` Paolo Bonzini
2014-11-26 13:14 ` Paolo Bonzini
2014-11-26 14:31 ` Andrew Jones
2014-11-26 14:31 ` Andrew Jones
2014-11-26 14:58 ` Alex Bennée
2014-11-26 14:58 ` Alex Bennée
2014-11-26 16:46 ` Paolo Bonzini
2014-11-26 16:46 ` Paolo Bonzini
2014-11-26 17:47 ` Andrew Jones
2014-11-26 17:47 ` Andrew Jones
2014-11-29 16:20 ` Christoffer Dall
2014-11-29 16:20 ` Christoffer Dall
2014-11-25 16:10 ` [PATCH 3/7] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl Alex Bennée
2014-11-25 16:10 ` Alex Bennée
2014-11-26 14:38 ` Andrew Jones [this message]
2014-11-26 14:38 ` Andrew Jones
2014-11-26 15:03 ` Alex Bennée
2014-11-26 15:03 ` Alex Bennée
2014-11-26 16:46 ` Paolo Bonzini
2014-11-26 16:46 ` Paolo Bonzini
2014-11-29 16:21 ` Christoffer Dall
2014-11-29 16:21 ` Christoffer Dall
2014-11-25 16:10 ` [PATCH 4/7] KVM: arm64: guest debug, add SW break point support Alex Bennée
2014-11-25 16:10 ` Alex Bennée
2014-11-26 16:07 ` Andrew Jones
2014-11-26 16:07 ` Andrew Jones
2014-11-26 17:14 ` Peter Maydell
2014-11-26 17:14 ` Peter Maydell
2014-11-29 16:21 ` Christoffer Dall
2014-11-29 16:21 ` Christoffer Dall
2014-11-29 16:21 ` Christoffer Dall
2014-11-29 16:21 ` Christoffer Dall
2014-12-01 11:33 ` Alex Bennée
2014-12-01 11:33 ` Alex Bennée
2014-11-25 16:10 ` [PATCH 5/7] KVM: arm64: guest debug, add support for single-step Alex Bennée
2014-11-25 16:10 ` Alex Bennée
2014-11-25 16:10 ` Alex Bennée
[not found] ` <1416931805-23223-6-git-send-email-alex.bennee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-11-26 16:40 ` Andrew Jones
2014-11-26 16:40 ` Andrew Jones
2014-11-26 16:40 ` Andrew Jones
[not found] ` <20141126164057.GE3245-EoAxxbxdFnFvD/m4c++uL6fLeoKvNuZc@public.gmane.org>
2014-11-26 18:00 ` Alex Bennée
2014-11-26 18:00 ` Alex Bennée
2014-11-26 18:00 ` Alex Bennée
2014-11-26 18:00 ` Alex Bennée
2014-11-26 19:27 ` Peter Maydell
2014-11-26 19:27 ` Peter Maydell
2014-11-26 19:27 ` Peter Maydell
[not found] ` <CAFEAcA-cjM9yUXi6tc79UP0fBKAagtFKQgV3iAjz5DWr9yxZUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-30 10:10 ` Christoffer Dall
2014-11-30 10:10 ` Christoffer Dall
2014-11-30 10:10 ` Christoffer Dall
2014-11-30 10:20 ` Peter Maydell
2014-11-30 10:20 ` Peter Maydell
2014-11-30 10:20 ` Peter Maydell
2014-11-30 10:21 ` Christoffer Dall
2014-11-30 10:21 ` Christoffer Dall
2014-12-01 11:50 ` Alex Bennée
2014-12-01 11:50 ` Alex Bennée
2014-12-01 11:50 ` Alex Bennée
2014-12-01 11:50 ` Alex Bennée
[not found] ` <87r3wj1te1.fsf-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-12-02 13:17 ` Christoffer Dall
2014-12-02 13:17 ` Christoffer Dall
2014-12-02 13:17 ` Christoffer Dall
2014-11-25 16:10 ` [PATCH 6/7] KVM: arm64: re-factor hyp.S debug register code Alex Bennée
2014-11-25 16:10 ` Alex Bennée
2014-11-26 16:49 ` Andrew Jones
2014-11-26 16:49 ` Andrew Jones
2014-11-30 10:25 ` Christoffer Dall
2014-11-30 10:25 ` Christoffer Dall
2014-12-01 11:52 ` Alex Bennée
2014-12-01 11:52 ` Alex Bennée
2014-12-02 13:23 ` Christoffer Dall
2014-12-02 13:23 ` Christoffer Dall
2014-11-25 16:10 ` [PATCH 7/7] KVM: arm64: guest debug, HW assisted debug support Alex Bennée
2014-11-25 16:10 ` Alex Bennée
2014-11-25 16:10 ` Alex Bennée
[not found] ` <1416931805-23223-8-git-send-email-alex.bennee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-11-26 17:34 ` Andrew Jones
2014-11-26 17:34 ` Andrew Jones
2014-11-26 17:34 ` Andrew Jones
2014-11-30 10:34 ` Christoffer Dall
2014-11-30 10:34 ` Christoffer Dall
2014-12-01 11:54 ` Alex Bennée
2014-12-01 11:54 ` Alex Bennée
2014-12-01 11:54 ` Alex Bennée
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=20141126143855.GC3245@hawk.usersys.redhat.com \
--to=drjones@redhat.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.