KVM: s390: Cleanups for 5.8
Paolo,
The following changes since commit 2a173ec993baa6a97e7b0fb89240200a88d90746:
MAINTAINERS: add a reviewer for KVM/s390 (2020-04-20 11:24:00 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-5.8-1
for you to fetch changes up to 0b545fd17f84184f9536bde68c3521e36c488448:
KVM: s390: remove unneeded semicolon in gisa_vcpu_kicker() (2020-04-20 11:33:32 +0200)
----------------------------------------------------------------
KVM: s390: Cleanups for 5.8
- vsie (nesting) cleanups
- remove unneeded semicolon
----------------------------------------------------------------
David Hildenbrand (2):
KVM: s390: vsie: Move conditional reschedule
KVM: s390: vsie: gmap_table_walk() simplifications
Jason Yan (1):
KVM: s390: remove unneeded semicolon in gisa_vcpu_kicker()
arch/s390/kvm/interrupt.c | 2 +- arch/s390/kvm/vsie.c | 3 +-- arch/s390/mm/gmap.c | 10 +++++----- 3 files changed, 7 insertions(+), 8 deletions(-)
[GIT PULL 1/3] KVM: s390: vsie: Move conditional reschedule
From: David Hildenbrand <[email protected]>
Let's move it to the outer loop, in case we ever run again into long loops, trying to map the prefix. While at it, convert it to cond_resched().
--- arch/s390/kvm/vsie.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390/kvm/vsie.c +1 -2
@@ -1000,8 +1000,6 @@ static int do_vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)handle_last_fault (vcpu, vsie_page); -if (need_resched ()) -schedule ();if (test_cpu_flag (CIF_MCCK_PENDING ))s390_handle_mcck ();
@@ -1185,6 +1183,7 @@ static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)kvm_s390_vcpu_has_irq (vcpu,0 ) || kvm_s390_vcpu_sie_inhibited(vcpu)) break; +cond_resched (); }if (rc == -EFAULT ) {
Signature · 1 line
2.25.4
[GIT PULL 2/3] KVM: s390: vsie: gmap_table_walk() simplifications
In reply to Christian BorntraegerFrom: David Hildenbrand <[email protected]>
Let's use asce_type where applicable. Also, simplify our sanity check for valid table levels and convert it into a WARN_ON_ONCE(). Check if we even have a valid gmap shadow as the very first step.
--- arch/s390/mm/gmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/s390/mm/gmap.c +5 -5
@@ -788,19 +788,19 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap, unsigned long gaddr, int level) {const int asce_type = gmap->asce & _ASCE_TYPE_MASK; -unsigned long *table; +unsigned long *table = gmap->table; -if ((gmap->asce & _ASCE_TYPE_MASK) +4 < (level *4 )) -return NULL ;if (gmap_is_shadow (gmap) && gmap->removed)return NULL ; +if (WARN_ON_ONCE (level > (asce_type >>2 ) +1 )) +return NULL ; +if (asce_type != _ASCE_TYPE_REGION1 && gaddr & (-1UL << (31 + (asce_type >>2 ) *11 )))return NULL ; - table = gmap->table; -switch (gmap->asce & _ASCE_TYPE_MASK) { +switch (asce_type) {case _ASCE_TYPE_REGION1: table += (gaddr & _REGION1_INDEX) >> _REGION1_SHIFT;if (level ==4 )
Signature · 1 line
2.25.4
[GIT PULL 3/3] KVM: s390: remove unneeded semicolon in gisa_vcpu_kicker()
In reply to Christian BorntraegerFrom: Jason Yan <[email protected]>
Fix the following coccicheck warning:
arch/s390/kvm/interrupt.c:3085:2-3: Unneeded semicolon
--- arch/s390/kvm/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kvm/interrupt.c +1 -1
@@ -3082,7 +3082,7 @@ static enum hrtimer_restart gisa_vcpu_kicker(struct hrtimer *timer)__airqs_kick_single_vcpu (kvm, pending_mask);hrtimer_forward_now (timer,ns_to_ktime (gi->expires));return HRTIMER_RESTART ; - }; + }return HRTIMER_NORESTART ; }
Signature · 1 line
2.25.4
Paolo Bonzini
maintainerQuoted 1 line · Christian Borntraeger
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.gittags/kvm-s390-next-5.8-1
Pulled, thanks.
Paolo