From: Maxim Levitsky <mlevitsk@redhat.com>
To: kvm@vger.kernel.org
Cc: x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Sean Christopherson <seanjc@google.com>,
Marc Zyngier <maz@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-kernel@vger.kernel.org (open list),
Julien Thierry <julien.thierry.kdev@gmail.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Jonathan Corbet <corbet@lwn.net>, Jessica Yu <jeyu@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Will Deacon <will@kernel.org>,
kvmarm@lists.cs.columbia.edu (open list:KERNEL VIRTUAL MACHINE
FOR ARM64 (KVM/arm64)), Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Vasily Gorbik <gor@linux.ibm.com>, Joerg Roedel <joro@8bytes.org>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Jim Mattson <jmattson@google.com>,
Cornelia Huck <cohuck@redhat.com>,
David Hildenbrand <david@redhat.com>,
Maxim Levitsky <mlevitsk@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Janosch Frank <frankja@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
linux-s390@vger.kernel.org (open list:S390),
Heiko Carstens <hca@linux.ibm.com>,
Kieran Bingham <kbingham@kernel.org>,
linux-doc@vger.kernel.org (open list:DOCUMENTATION),
linux-arm-kernel@lists.infradead.org (moderated list:KERNEL
VIRTUAL MACHINE FOR ARM64 (KVM/arm64)),
James Morse <james.morse@arm.com>
Subject: [PATCH v2 5/9] KVM: s390x: implement KVM_CAP_SET_GUEST_DEBUG2
Date: Thu, 1 Apr 2021 16:54:47 +0300 [thread overview]
Message-ID: <20210401135451.1004564-6-mlevitsk@redhat.com> (raw)
In-Reply-To: <20210401135451.1004564-1-mlevitsk@redhat.com>
Define KVM_GUESTDBG_VALID_MASK and use it to implement this capabiity.
Compile tested only.
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
---
arch/s390/include/asm/kvm_host.h | 4 ++++
arch/s390/kvm/kvm-s390.c | 3 +++
2 files changed, 7 insertions(+)
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
index 6bcfc5614bbc..a3902b57b825 100644
--- a/arch/s390/include/asm/kvm_host.h
+++ b/arch/s390/include/asm/kvm_host.h
@@ -700,6 +700,10 @@ struct kvm_hw_bp_info_arch {
#define guestdbg_exit_pending(vcpu) (guestdbg_enabled(vcpu) && \
(vcpu->guest_debug & KVM_GUESTDBG_EXIT_PENDING))
+#define KVM_GUESTDBG_VALID_MASK \
+ (KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_SINGLESTEP |\
+ KVM_GUESTDBG_USE_HW_BP | KVM_GUESTDBG_EXIT_PENDING)
+
struct kvm_guestdbg_info_arch {
unsigned long cr0;
unsigned long cr9;
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 2f09e9d7dc95..2049fc8c222a 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -544,6 +544,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
case KVM_CAP_S390_DIAG318:
r = 1;
break;
+ case KVM_CAP_SET_GUEST_DEBUG2:
+ r = KVM_GUESTDBG_VALID_MASK;
+ break;
case KVM_CAP_S390_HPAGE_1M:
r = 0;
if (hpage && !kvm_is_ucontrol(kvm))
--
2.26.2
next prev parent reply other threads:[~2021-04-01 18:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 13:54 [PATCH v2 0/9] KVM: my debug patch queue Maxim Levitsky
2021-04-01 13:54 ` [PATCH v2 1/9] scripts/gdb: rework lx-symbols gdb script Maxim Levitsky
2021-04-01 13:54 ` [PATCH v2 2/9] KVM: introduce KVM_CAP_SET_GUEST_DEBUG2 Maxim Levitsky
2021-04-01 13:54 ` [PATCH v2 3/9] KVM: x86: implement KVM_CAP_SET_GUEST_DEBUG2 Maxim Levitsky
2021-04-01 13:54 ` [PATCH v2 4/9] KVM: aarch64: " Maxim Levitsky
2021-04-01 13:54 ` Maxim Levitsky [this message]
2021-04-01 13:54 ` [PATCH v2 6/9] KVM: x86: implement KVM_GUESTDBG_BLOCKEVENTS Maxim Levitsky
2021-04-02 17:07 ` Paolo Bonzini
2021-04-01 13:54 ` [PATCH v2 7/9] KVM: SVM: split svm_handle_invalid_exit Maxim Levitsky
2021-04-01 13:54 ` [PATCH v2 8/9] KVM: x86: add force_intercept_exceptions_mask Maxim Levitsky
2021-04-27 11:38 ` Borislav Petkov
2021-04-01 13:54 ` [PATCH v2 9/9] KVM: SVM: implement force_intercept_exceptions_mask Maxim Levitsky
2021-04-02 17:38 ` [PATCH v2 0/9] KVM: my debug patch queue Paolo Bonzini
2021-04-06 11:59 ` Maxim Levitsky
2021-04-26 12:43 ` Maxim Levitsky
2021-04-26 12:55 ` Paolo Bonzini
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=20210401135451.1004564-6-mlevitsk@redhat.com \
--to=mlevitsk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@de.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=cohuck@redhat.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=imbrenda@linux.ibm.com \
--cc=james.morse@arm.com \
--cc=jan.kiszka@siemens.com \
--cc=jeyu@kernel.org \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=julien.thierry.kdev@gmail.com \
--cc=kbingham@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=sgarzare@redhat.com \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=will@kernel.org \
--cc=x86@kernel.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).