From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>
Subject: [GIT PULL 1/9] KVM: s390: log runtime instrumentation enablement
Date: Fri, 7 Apr 2017 12:47:54 +0200 [thread overview]
Message-ID: <1491562082-6392-2-git-send-email-borntraeger@de.ibm.com> (raw)
In-Reply-To: <1491562082-6392-1-git-send-email-borntraeger@de.ibm.com>
We handle runtime instrumentation enablement either lazy or via
sync_regs on migration. Make sure to add a debug log entry for that
per CPU on the first occurrence.
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
arch/s390/kvm/kvm-s390.c | 14 ++++++++------
arch/s390/kvm/priv.c | 1 +
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index fd6cd05b..5fda468 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -2719,6 +2719,9 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)
static void sync_regs(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
{
+ struct runtime_instr_cb *riccb;
+
+ riccb = (struct runtime_instr_cb *) &kvm_run->s.regs.riccb;
vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask;
vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr;
if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX)
@@ -2747,12 +2750,11 @@ static void sync_regs(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
* we should enable RI here instead of doing the lazy enablement.
*/
if ((kvm_run->kvm_dirty_regs & KVM_SYNC_RICCB) &&
- test_kvm_facility(vcpu->kvm, 64)) {
- struct runtime_instr_cb *riccb =
- (struct runtime_instr_cb *) &kvm_run->s.regs.riccb;
-
- if (riccb->valid)
- vcpu->arch.sie_block->ecb3 |= 0x01;
+ test_kvm_facility(vcpu->kvm, 64) &&
+ riccb->valid &&
+ !(vcpu->arch.sie_block->ecb3 & 0x01)) {
+ VCPU_EVENT(vcpu, 3, "%s", "ENABLE: RI (sync_regs)");
+ vcpu->arch.sie_block->ecb3 |= 0x01;
}
save_access_regs(vcpu->arch.host_acrs);
restore_access_regs(vcpu->run->s.regs.acrs);
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 64b6a30..93d6cde 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -37,6 +37,7 @@
static int handle_ri(struct kvm_vcpu *vcpu)
{
if (test_kvm_facility(vcpu->kvm, 64)) {
+ VCPU_EVENT(vcpu, 3, "%s", "ENABLE: RI (lazy)");
vcpu->arch.sie_block->ecb3 |= 0x01;
kvm_s390_retry_instr(vcpu);
return 0;
--
2.7.4
next prev parent reply other threads:[~2017-04-07 10:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 10:47 [GIT PULL 0/9] KVM: s390: features for 4.12 (via kvm/next) Christian Borntraeger
2017-04-07 10:47 ` Christian Borntraeger [this message]
2017-04-07 10:47 ` [GIT PULL 2/9] KVM: s390: Handle sthyi also for instruction intercept Christian Borntraeger
2017-04-07 10:47 ` [GIT PULL 3/9] KVM: s390: use defines for execution controls Christian Borntraeger
2017-04-07 10:47 ` [GIT PULL 4/9] KVM: s390: Use defines for intercept code Christian Borntraeger
2017-04-07 10:47 ` [GIT PULL 5/9] KVM: s390: gs support for kvm guests Christian Borntraeger
2017-04-07 11:42 ` David Hildenbrand
2017-04-07 12:01 ` Christian Borntraeger
2017-04-11 12:42 ` Christian Borntraeger
2017-04-11 14:04 ` David Hildenbrand
2017-04-11 19:23 ` Radim Krčmář
2017-04-07 12:27 ` [PATCH] KVM: s390: Fix sdnxo setting for nested guests Christian Borntraeger
2017-04-11 11:55 ` Cornelia Huck
2017-04-07 10:47 ` [GIT PULL 6/9] KVM: s390: interface for suppressible I/O adapters Christian Borntraeger
2017-04-07 10:48 ` [GIT PULL 7/9] KVM: s390: introduce ais mode modify function Christian Borntraeger
2017-04-07 10:48 ` [GIT PULL 8/9] KVM: s390: introduce adapter interrupt inject function Christian Borntraeger
2017-04-07 10:48 ` [GIT PULL 9/9] KVM: s390: introduce AIS capability Christian Borntraeger
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=1491562082-6392-2-git-send-email-borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.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;
as well as URLs for NNTP newsgroup(s).