* [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next)
@ 2015-06-02 8:14 Christian Borntraeger
2015-06-02 8:14 ` [GIT PULL 1/2] KVM: s390: call exit_sie() directly on vcpu block/request Christian Borntraeger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christian Borntraeger @ 2015-06-02 8:14 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Alexander Graf, KVM, Cornelia Huck, Jens Freimann, linux-s390,
David Hildenbrand, Christian Borntraeger
Paolo,
one fix and one cleanup for 4.2.
The following changes since commit 06b36753a6466239fc945b6756e12d635621ae5f:
KVM: s390: drop handling of interception code 12 (2015-05-08 15:51:17 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-20150602
for you to fetch changes up to ea2cdd27dce66dc498c623adacd807ea3a350443:
KVM: s390: introduce KMSG_COMPONENT for kvm-s390 (2015-06-02 09:39:20 +0200)
----------------------------------------------------------------
KVM: s390: Fix and cleanup for 4.2 (kvm/next)
One small fix for a commit targetted for 4.2 and one cleanup
regarding our printks.
----------------------------------------------------------------
David Hildenbrand (2):
KVM: s390: call exit_sie() directly on vcpu block/request
KVM: s390: introduce KMSG_COMPONENT for kvm-s390
arch/s390/kvm/kvm-s390.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [GIT PULL 1/2] KVM: s390: call exit_sie() directly on vcpu block/request
2015-06-02 8:14 [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next) Christian Borntraeger
@ 2015-06-02 8:14 ` Christian Borntraeger
2015-06-02 8:14 ` [GIT PULL 2/2] KVM: s390: introduce KMSG_COMPONENT for kvm-s390 Christian Borntraeger
2015-06-03 13:02 ` [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next) Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2015-06-02 8:14 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Alexander Graf, KVM, Cornelia Huck, Jens Freimann, linux-s390,
David Hildenbrand, Christian Borntraeger
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
Thinking about it, I can't find a real use case where we want
to block a VCPU and not kick it out of SIE. (except if we want
to do the same in batch for multiple VCPUs - but that's a micro
optimization)
So let's simply perform the exit_sie() calls directly when setting
the other magic block bits in the SIE.
Otherwise e.g. kvm_s390_set_tod_low() still has other VCPUs running
after that call, working with a wrong epoch.
Fixes: 27406cd50c ("KVM: s390: provide functions for blocking all CPUs")
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
arch/s390/kvm/kvm-s390.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 6bc69ab..f37557b 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1417,6 +1417,7 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
void kvm_s390_vcpu_block(struct kvm_vcpu *vcpu)
{
atomic_set_mask(PROG_BLOCK_SIE, &vcpu->arch.sie_block->prog20);
+ exit_sie(vcpu);
}
void kvm_s390_vcpu_unblock(struct kvm_vcpu *vcpu)
@@ -1427,6 +1428,7 @@ void kvm_s390_vcpu_unblock(struct kvm_vcpu *vcpu)
static void kvm_s390_vcpu_request(struct kvm_vcpu *vcpu)
{
atomic_set_mask(PROG_REQUEST, &vcpu->arch.sie_block->prog20);
+ exit_sie(vcpu);
}
static void kvm_s390_vcpu_request_handled(struct kvm_vcpu *vcpu)
@@ -1450,7 +1452,6 @@ void kvm_s390_sync_request(int req, struct kvm_vcpu *vcpu)
{
kvm_make_request(req, vcpu);
kvm_s390_vcpu_request(vcpu);
- exit_sie(vcpu);
}
static void kvm_gmap_notifier(struct gmap *gmap, unsigned long address)
--
2.3.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [GIT PULL 2/2] KVM: s390: introduce KMSG_COMPONENT for kvm-s390
2015-06-02 8:14 [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next) Christian Borntraeger
2015-06-02 8:14 ` [GIT PULL 1/2] KVM: s390: call exit_sie() directly on vcpu block/request Christian Borntraeger
@ 2015-06-02 8:14 ` Christian Borntraeger
2015-06-03 13:02 ` [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next) Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2015-06-02 8:14 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Alexander Graf, KVM, Cornelia Huck, Jens Freimann, linux-s390,
David Hildenbrand, Christian Borntraeger
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
Let's remove "kvm-s390" from our printk messages and make use
of pr_fmt instead.
Also replace one printk() occurrence by a equivalent pr_warn
on the way.
Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
arch/s390/kvm/kvm-s390.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index f37557b..9cb6cfaa 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -36,6 +36,10 @@
#include "kvm-s390.h"
#include "gaccess.h"
+#define KMSG_COMPONENT "kvm-s390"
+#undef pr_fmt
+#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+
#define CREATE_TRACE_POINTS
#include "trace.h"
#include "trace-s390.h"
@@ -2086,7 +2090,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
if (!kvm_s390_user_cpu_state_ctrl(vcpu->kvm)) {
kvm_s390_vcpu_start(vcpu);
} else if (is_vcpu_stopped(vcpu)) {
- pr_err_ratelimited("kvm-s390: can't run stopped vcpu %d\n",
+ pr_err_ratelimited("can't run stopped vcpu %d\n",
vcpu->vcpu_id);
return -EINVAL;
}
@@ -2617,7 +2621,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
rc = gmap_map_segment(kvm->arch.gmap, mem->userspace_addr,
mem->guest_phys_addr, mem->memory_size);
if (rc)
- printk(KERN_WARNING "kvm-s390: failed to commit memory region\n");
+ pr_warn("failed to commit memory region\n");
return;
}
--
2.3.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next)
2015-06-02 8:14 [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next) Christian Borntraeger
2015-06-02 8:14 ` [GIT PULL 1/2] KVM: s390: call exit_sie() directly on vcpu block/request Christian Borntraeger
2015-06-02 8:14 ` [GIT PULL 2/2] KVM: s390: introduce KMSG_COMPONENT for kvm-s390 Christian Borntraeger
@ 2015-06-03 13:02 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-06-03 13:02 UTC (permalink / raw)
To: Christian Borntraeger
Cc: Alexander Graf, KVM, Cornelia Huck, Jens Freimann, linux-s390,
David Hildenbrand
On 02/06/2015 10:14, Christian Borntraeger wrote:
> git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-20150602
Pulled, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-03 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 8:14 [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next) Christian Borntraeger
2015-06-02 8:14 ` [GIT PULL 1/2] KVM: s390: call exit_sie() directly on vcpu block/request Christian Borntraeger
2015-06-02 8:14 ` [GIT PULL 2/2] KVM: s390: introduce KMSG_COMPONENT for kvm-s390 Christian Borntraeger
2015-06-03 13:02 ` [GIT PULL 0/2] KVM: s390: Fix and cleanup for 4.2 (kvm/next) Paolo Bonzini
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).