Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
To: mpe@ellerman.id.au, paulus@samba.org
Cc: ravi.bangoria@linux.ibm.com, mikey@neuling.org,
	npiggin@gmail.com, pbonzini@redhat.com, christophe.leroy@c-s.fr,
	jniethe5@gmail.com, pedromfc@br.ibm.com, rogealve@br.ibm.com,
	kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kselftest@vger.kernel.org
Subject: [PATCH 3/7] powerpc/watchpoint/kvm: Introduce new capability for 2nd DAWR
Date: Thu, 23 Jul 2020 15:50:54 +0530	[thread overview]
Message-ID: <20200723102058.312282-4-ravi.bangoria@linux.ibm.com> (raw)
In-Reply-To: <20200723102058.312282-1-ravi.bangoria@linux.ibm.com>

Introduce KVM_CAP_PPC_DAWR1 which can be used by Qemu to query whether
kvm supports 2nd DAWR or not.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
---
 arch/powerpc/kvm/powerpc.c | 3 +++
 include/uapi/linux/kvm.h   | 1 +
 2 files changed, 4 insertions(+)

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index dd7d141e33e8..f38380fd1fe9 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -676,6 +676,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 			!kvmppc_hv_ops->enable_svm(NULL);
 		break;
 #endif
+	case KVM_CAP_PPC_DAWR1:
+		r = cpu_has_feature(CPU_FTR_DAWR1);
+		break;
 	default:
 		r = 0;
 		break;
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 4fdf30316582..2c3713d6526a 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1031,6 +1031,7 @@ struct kvm_ppc_resize_hpt {
 #define KVM_CAP_PPC_SECURE_GUEST 181
 #define KVM_CAP_HALT_POLL 182
 #define KVM_CAP_ASYNC_PF_INT 183
+#define KVM_CAP_PPC_DAWR1 184
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
-- 
2.26.2


  parent reply	other threads:[~2020-07-23 10:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 10:20 [PATCH 0/7] powerpc/watchpoint: 2nd DAWR kvm enablement + selftests Ravi Bangoria
2020-07-23 10:20 ` [PATCH 1/7] powerpc/watchpoint/kvm: Rename current DAWR macros and variables Ravi Bangoria
2020-09-02  1:49   ` Paul Mackerras
2020-09-02  5:09     ` Ravi Bangoria
2020-07-23 10:20 ` [PATCH 2/7] powerpc/watchpoint/kvm: Add infrastructure to support 2nd DAWR Ravi Bangoria
2020-09-02  2:01   ` Paul Mackerras
2020-09-02  5:09     ` Ravi Bangoria
2020-09-02  5:12   ` Ravi Bangoria
2020-07-23 10:20 ` Ravi Bangoria [this message]
2020-07-23 10:20 ` [PATCH 4/7] powerpc/selftests/ptrace-hwbreak: Add testcases for " Ravi Bangoria
2020-07-23 10:20 ` [PATCH 5/7] powerpc/selftests/perf-hwbreak: Coalesce event creation code Ravi Bangoria
2020-07-23 10:20 ` [PATCH 6/7] powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR Ravi Bangoria
2020-07-23 10:20 ` [PATCH 7/7] powerpc/selftests: Add selftest to test concurrent perf/ptrace events Ravi Bangoria
2020-07-23 10:48 ` [PATCH 0/7] powerpc/watchpoint: 2nd DAWR kvm enablement + selftests Ravi Bangoria
2020-09-02  2:32 ` Paul Mackerras
2020-09-02  5:13   ` Ravi Bangoria

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=20200723102058.312282-4-ravi.bangoria@linux.ibm.com \
    --to=ravi.bangoria@linux.ibm.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=jniethe5@gmail.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=pedromfc@br.ibm.com \
    --cc=rogealve@br.ibm.com \
    /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