* [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2
@ 2020-03-24 12:50 Christian Borntraeger
2020-03-24 12:50 ` [GIT PULL 1/2] KVM: s390: Use fallthrough; Christian Borntraeger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christian Borntraeger @ 2020-03-24 12:50 UTC (permalink / raw)
To: Paolo Bonzini
Cc: KVM, Janosch Frank, David Hildenbrand, Cornelia Huck, linux-s390,
Christian Borntraeger
Paolo,
two more patches for 5.7.
The following changes since commit cc674ef252f4750bdcea1560ff491081bb960954:
KVM: s390: introduce module parameter kvm.use_gisa (2020-02-27 19:47:13 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-5.7-2
for you to fetch changes up to f3dd18d444c757840920434e62809b6104081b06:
KVM: s390: mark sie block as 512 byte aligned (2020-03-23 18:30:33 +0100)
----------------------------------------------------------------
KVM: s390: cleanups for 5.7
- mark sie control block as 512 byte aligned
- use fallthrough;
----------------------------------------------------------------
Christian Borntraeger (1):
KVM: s390: mark sie block as 512 byte aligned
Joe Perches (1):
KVM: s390: Use fallthrough;
arch/s390/include/asm/kvm_host.h | 2 +-
arch/s390/kvm/gaccess.c | 23 +++++++++++++----------
arch/s390/kvm/interrupt.c | 2 +-
arch/s390/kvm/kvm-s390.c | 4 ++--
arch/s390/mm/gmap.c | 6 +++---
5 files changed, 20 insertions(+), 17 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [GIT PULL 1/2] KVM: s390: Use fallthrough;
2020-03-24 12:50 [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2 Christian Borntraeger
@ 2020-03-24 12:50 ` Christian Borntraeger
2020-03-24 12:50 ` [GIT PULL 2/2] KVM: s390: mark sie block as 512 byte aligned Christian Borntraeger
2020-03-26 9:58 ` [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2 Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2020-03-24 12:50 UTC (permalink / raw)
To: Paolo Bonzini
Cc: KVM, Janosch Frank, David Hildenbrand, Cornelia Huck, linux-s390,
Christian Borntraeger, Joe Perches
From: Joe Perches <joe@perches.com>
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/d63c86429f3e5aa806aa3e185c97d213904924a5.1583896348.git.joe@perches.com
[borntrager@de.ibm.com: Fix link to tool and subject]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
arch/s390/kvm/gaccess.c | 23 +++++++++++++----------
arch/s390/kvm/interrupt.c | 2 +-
arch/s390/kvm/kvm-s390.c | 4 ++--
arch/s390/mm/gmap.c | 6 +++---
4 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
index 07d30ffcfa41..47a67a958107 100644
--- a/arch/s390/kvm/gaccess.c
+++ b/arch/s390/kvm/gaccess.c
@@ -505,7 +505,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
switch (prot) {
case PROT_TYPE_IEP:
tec->b61 = 1;
- /* FALL THROUGH */
+ fallthrough;
case PROT_TYPE_LA:
tec->b56 = 1;
break;
@@ -514,12 +514,12 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
break;
case PROT_TYPE_ALC:
tec->b60 = 1;
- /* FALL THROUGH */
+ fallthrough;
case PROT_TYPE_DAT:
tec->b61 = 1;
break;
}
- /* FALL THROUGH */
+ fallthrough;
case PGM_ASCE_TYPE:
case PGM_PAGE_TRANSLATION:
case PGM_REGION_FIRST_TRANS:
@@ -534,7 +534,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
tec->addr = gva >> PAGE_SHIFT;
tec->fsi = mode == GACC_STORE ? FSI_STORE : FSI_FETCH;
tec->as = psw_bits(vcpu->arch.sie_block->gpsw).as;
- /* FALL THROUGH */
+ fallthrough;
case PGM_ALEN_TRANSLATION:
case PGM_ALE_SEQUENCE:
case PGM_ASTE_VALIDITY:
@@ -677,7 +677,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rfte.p;
ptr = rfte.rto * PAGE_SIZE + vaddr.rsx * 8;
}
- /* fallthrough */
+ fallthrough;
case ASCE_TYPE_REGION2: {
union region2_table_entry rste;
@@ -695,7 +695,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rste.p;
ptr = rste.rto * PAGE_SIZE + vaddr.rtx * 8;
}
- /* fallthrough */
+ fallthrough;
case ASCE_TYPE_REGION3: {
union region3_table_entry rtte;
@@ -723,7 +723,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rtte.fc0.p;
ptr = rtte.fc0.sto * PAGE_SIZE + vaddr.sx * 8;
}
- /* fallthrough */
+ fallthrough;
case ASCE_TYPE_SEGMENT: {
union segment_table_entry ste;
@@ -1050,7 +1050,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_r2t(sg, saddr, rfte.val, *fake);
if (rc)
return rc;
- } /* fallthrough */
+ }
+ fallthrough;
case ASCE_TYPE_REGION2: {
union region2_table_entry rste;
@@ -1076,7 +1077,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_r3t(sg, saddr, rste.val, *fake);
if (rc)
return rc;
- } /* fallthrough */
+ }
+ fallthrough;
case ASCE_TYPE_REGION3: {
union region3_table_entry rtte;
@@ -1111,7 +1113,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_sgt(sg, saddr, rtte.val, *fake);
if (rc)
return rc;
- } /* fallthrough */
+ }
+ fallthrough;
case ASCE_TYPE_SEGMENT: {
union segment_table_entry ste;
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 028167d6eacd..8191106bf7b9 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -886,7 +886,7 @@ static int __must_check __deliver_prog(struct kvm_vcpu *vcpu)
case PGM_PRIMARY_AUTHORITY:
case PGM_SECONDARY_AUTHORITY:
nullifying = true;
- /* fall through */
+ fallthrough;
case PGM_SPACE_SWITCH:
rc = put_guest_lc(vcpu, pgm_info.trans_exc_code,
(u64 *)__LC_TRANS_EXC_CODE);
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 6b1842a9feed..d590f32f13d3 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -3752,7 +3752,7 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
rc = kvm_s390_pv_set_cpu_state(vcpu, PV_CPU_STATE_OPR_LOAD);
break;
case KVM_MP_STATE_CHECK_STOP:
- /* fall through - CHECK_STOP and LOAD are not supported yet */
+ fallthrough; /* CHECK_STOP and LOAD are not supported yet */
default:
rc = -ENXIO;
}
@@ -4985,7 +4985,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
old->npages * PAGE_SIZE);
if (rc)
break;
- /* FALLTHROUGH */
+ fallthrough;
case KVM_MR_CREATE:
rc = gmap_map_segment(kvm->arch.gmap, mem->userspace_addr,
mem->guest_phys_addr, mem->memory_size);
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 27926a06df32..03c899849c38 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -804,7 +804,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID)
return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
- /* Fallthrough */
+ fallthrough;
case _ASCE_TYPE_REGION2:
table += (gaddr & _REGION2_INDEX) >> _REGION2_SHIFT;
if (level == 3)
@@ -812,7 +812,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID)
return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
- /* Fallthrough */
+ fallthrough;
case _ASCE_TYPE_REGION3:
table += (gaddr & _REGION3_INDEX) >> _REGION3_SHIFT;
if (level == 2)
@@ -820,7 +820,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID)
return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
- /* Fallthrough */
+ fallthrough;
case _ASCE_TYPE_SEGMENT:
table += (gaddr & _SEGMENT_INDEX) >> _SEGMENT_SHIFT;
if (level == 1)
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [GIT PULL 2/2] KVM: s390: mark sie block as 512 byte aligned
2020-03-24 12:50 [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2 Christian Borntraeger
2020-03-24 12:50 ` [GIT PULL 1/2] KVM: s390: Use fallthrough; Christian Borntraeger
@ 2020-03-24 12:50 ` Christian Borntraeger
2020-03-26 9:58 ` [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2 Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2020-03-24 12:50 UTC (permalink / raw)
To: Paolo Bonzini
Cc: KVM, Janosch Frank, David Hildenbrand, Cornelia Huck, linux-s390,
Christian Borntraeger
The sie block must be aligned to 512 bytes. Mark it as such.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
arch/s390/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
index 0ea82152d2f7..2d50f6c432e2 100644
--- a/arch/s390/include/asm/kvm_host.h
+++ b/arch/s390/include/asm/kvm_host.h
@@ -344,7 +344,7 @@ struct kvm_s390_sie_block {
__u64 itdba; /* 0x01e8 */
__u64 riccbd; /* 0x01f0 */
__u64 gvrd; /* 0x01f8 */
-} __attribute__((packed));
+} __packed __aligned(512);
struct kvm_s390_itdb {
__u8 data[256];
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2
2020-03-24 12:50 [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2 Christian Borntraeger
2020-03-24 12:50 ` [GIT PULL 1/2] KVM: s390: Use fallthrough; Christian Borntraeger
2020-03-24 12:50 ` [GIT PULL 2/2] KVM: s390: mark sie block as 512 byte aligned Christian Borntraeger
@ 2020-03-26 9:58 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2020-03-26 9:58 UTC (permalink / raw)
To: Christian Borntraeger
Cc: KVM, Janosch Frank, David Hildenbrand, Cornelia Huck, linux-s390
On 24/03/20 13:50, Christian Borntraeger wrote:
> Paolo,
>
> two more patches for 5.7.
>
> The following changes since commit cc674ef252f4750bdcea1560ff491081bb960954:
>
> KVM: s390: introduce module parameter kvm.use_gisa (2020-02-27 19:47:13 +0100)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-5.7-2
>
> for you to fetch changes up to f3dd18d444c757840920434e62809b6104081b06:
>
> KVM: s390: mark sie block as 512 byte aligned (2020-03-23 18:30:33 +0100)
>
> ----------------------------------------------------------------
> KVM: s390: cleanups for 5.7
>
> - mark sie control block as 512 byte aligned
> - use fallthrough;
>
> ----------------------------------------------------------------
> Christian Borntraeger (1):
> KVM: s390: mark sie block as 512 byte aligned
>
> Joe Perches (1):
> KVM: s390: Use fallthrough;
>
> arch/s390/include/asm/kvm_host.h | 2 +-
> arch/s390/kvm/gaccess.c | 23 +++++++++++++----------
> arch/s390/kvm/interrupt.c | 2 +-
> arch/s390/kvm/kvm-s390.c | 4 ++--
> arch/s390/mm/gmap.c | 6 +++---
> 5 files changed, 20 insertions(+), 17 deletions(-)
>
Pulled, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-26 9:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 12:50 [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2 Christian Borntraeger
2020-03-24 12:50 ` [GIT PULL 1/2] KVM: s390: Use fallthrough; Christian Borntraeger
2020-03-24 12:50 ` [GIT PULL 2/2] KVM: s390: mark sie block as 512 byte aligned Christian Borntraeger
2020-03-26 9:58 ` [GIT PULL 0/2] KVM: s390: changes for 5.7 part 2 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).