Commit 8bf89613 authored by Paolo Bonzini's avatar Paolo Bonzini

Merge tag 'kvm-s390-next-5.7-2' of...

Merge tag 'kvm-s390-next-5.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD

KVM: s390: cleanups for 5.7

- mark sie control block as 512 byte aligned
- use fallthrough;
parents 4b547a86 f3dd18d4
...@@ -344,7 +344,7 @@ struct kvm_s390_sie_block { ...@@ -344,7 +344,7 @@ struct kvm_s390_sie_block {
__u64 itdba; /* 0x01e8 */ __u64 itdba; /* 0x01e8 */
__u64 riccbd; /* 0x01f0 */ __u64 riccbd; /* 0x01f0 */
__u64 gvrd; /* 0x01f8 */ __u64 gvrd; /* 0x01f8 */
} __attribute__((packed)); } __packed __aligned(512);
struct kvm_s390_itdb { struct kvm_s390_itdb {
__u8 data[256]; __u8 data[256];
......
...@@ -505,7 +505,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva, ...@@ -505,7 +505,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
switch (prot) { switch (prot) {
case PROT_TYPE_IEP: case PROT_TYPE_IEP:
tec->b61 = 1; tec->b61 = 1;
/* FALL THROUGH */ fallthrough;
case PROT_TYPE_LA: case PROT_TYPE_LA:
tec->b56 = 1; tec->b56 = 1;
break; break;
...@@ -514,12 +514,12 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva, ...@@ -514,12 +514,12 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
break; break;
case PROT_TYPE_ALC: case PROT_TYPE_ALC:
tec->b60 = 1; tec->b60 = 1;
/* FALL THROUGH */ fallthrough;
case PROT_TYPE_DAT: case PROT_TYPE_DAT:
tec->b61 = 1; tec->b61 = 1;
break; break;
} }
/* FALL THROUGH */ fallthrough;
case PGM_ASCE_TYPE: case PGM_ASCE_TYPE:
case PGM_PAGE_TRANSLATION: case PGM_PAGE_TRANSLATION:
case PGM_REGION_FIRST_TRANS: case PGM_REGION_FIRST_TRANS:
...@@ -534,7 +534,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva, ...@@ -534,7 +534,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
tec->addr = gva >> PAGE_SHIFT; tec->addr = gva >> PAGE_SHIFT;
tec->fsi = mode == GACC_STORE ? FSI_STORE : FSI_FETCH; tec->fsi = mode == GACC_STORE ? FSI_STORE : FSI_FETCH;
tec->as = psw_bits(vcpu->arch.sie_block->gpsw).as; tec->as = psw_bits(vcpu->arch.sie_block->gpsw).as;
/* FALL THROUGH */ fallthrough;
case PGM_ALEN_TRANSLATION: case PGM_ALEN_TRANSLATION:
case PGM_ALE_SEQUENCE: case PGM_ALE_SEQUENCE:
case PGM_ASTE_VALIDITY: case PGM_ASTE_VALIDITY:
...@@ -677,7 +677,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva, ...@@ -677,7 +677,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rfte.p; dat_protection |= rfte.p;
ptr = rfte.rto * PAGE_SIZE + vaddr.rsx * 8; ptr = rfte.rto * PAGE_SIZE + vaddr.rsx * 8;
} }
/* fallthrough */ fallthrough;
case ASCE_TYPE_REGION2: { case ASCE_TYPE_REGION2: {
union region2_table_entry rste; union region2_table_entry rste;
...@@ -695,7 +695,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva, ...@@ -695,7 +695,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rste.p; dat_protection |= rste.p;
ptr = rste.rto * PAGE_SIZE + vaddr.rtx * 8; ptr = rste.rto * PAGE_SIZE + vaddr.rtx * 8;
} }
/* fallthrough */ fallthrough;
case ASCE_TYPE_REGION3: { case ASCE_TYPE_REGION3: {
union region3_table_entry rtte; union region3_table_entry rtte;
...@@ -723,7 +723,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva, ...@@ -723,7 +723,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rtte.fc0.p; dat_protection |= rtte.fc0.p;
ptr = rtte.fc0.sto * PAGE_SIZE + vaddr.sx * 8; ptr = rtte.fc0.sto * PAGE_SIZE + vaddr.sx * 8;
} }
/* fallthrough */ fallthrough;
case ASCE_TYPE_SEGMENT: { case ASCE_TYPE_SEGMENT: {
union segment_table_entry ste; union segment_table_entry ste;
...@@ -1050,7 +1050,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, ...@@ -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); rc = gmap_shadow_r2t(sg, saddr, rfte.val, *fake);
if (rc) if (rc)
return rc; return rc;
} /* fallthrough */ }
fallthrough;
case ASCE_TYPE_REGION2: { case ASCE_TYPE_REGION2: {
union region2_table_entry rste; union region2_table_entry rste;
...@@ -1076,7 +1077,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, ...@@ -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); rc = gmap_shadow_r3t(sg, saddr, rste.val, *fake);
if (rc) if (rc)
return rc; return rc;
} /* fallthrough */ }
fallthrough;
case ASCE_TYPE_REGION3: { case ASCE_TYPE_REGION3: {
union region3_table_entry rtte; union region3_table_entry rtte;
...@@ -1111,7 +1113,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr, ...@@ -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); rc = gmap_shadow_sgt(sg, saddr, rtte.val, *fake);
if (rc) if (rc)
return rc; return rc;
} /* fallthrough */ }
fallthrough;
case ASCE_TYPE_SEGMENT: { case ASCE_TYPE_SEGMENT: {
union segment_table_entry ste; union segment_table_entry ste;
......
...@@ -886,7 +886,7 @@ static int __must_check __deliver_prog(struct kvm_vcpu *vcpu) ...@@ -886,7 +886,7 @@ static int __must_check __deliver_prog(struct kvm_vcpu *vcpu)
case PGM_PRIMARY_AUTHORITY: case PGM_PRIMARY_AUTHORITY:
case PGM_SECONDARY_AUTHORITY: case PGM_SECONDARY_AUTHORITY:
nullifying = true; nullifying = true;
/* fall through */ fallthrough;
case PGM_SPACE_SWITCH: case PGM_SPACE_SWITCH:
rc = put_guest_lc(vcpu, pgm_info.trans_exc_code, rc = put_guest_lc(vcpu, pgm_info.trans_exc_code,
(u64 *)__LC_TRANS_EXC_CODE); (u64 *)__LC_TRANS_EXC_CODE);
......
...@@ -3746,7 +3746,7 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, ...@@ -3746,7 +3746,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); rc = kvm_s390_pv_set_cpu_state(vcpu, PV_CPU_STATE_OPR_LOAD);
break; break;
case KVM_MP_STATE_CHECK_STOP: 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: default:
rc = -ENXIO; rc = -ENXIO;
} }
...@@ -4973,7 +4973,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm, ...@@ -4973,7 +4973,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
old->npages * PAGE_SIZE); old->npages * PAGE_SIZE);
if (rc) if (rc)
break; break;
/* FALLTHROUGH */ fallthrough;
case KVM_MR_CREATE: case KVM_MR_CREATE:
rc = gmap_map_segment(kvm->arch.gmap, mem->userspace_addr, rc = gmap_map_segment(kvm->arch.gmap, mem->userspace_addr,
mem->guest_phys_addr, mem->memory_size); mem->guest_phys_addr, mem->memory_size);
......
...@@ -804,7 +804,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap, ...@@ -804,7 +804,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID) if (*table & _REGION_ENTRY_INVALID)
return NULL; return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
/* Fallthrough */ fallthrough;
case _ASCE_TYPE_REGION2: case _ASCE_TYPE_REGION2:
table += (gaddr & _REGION2_INDEX) >> _REGION2_SHIFT; table += (gaddr & _REGION2_INDEX) >> _REGION2_SHIFT;
if (level == 3) if (level == 3)
...@@ -812,7 +812,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap, ...@@ -812,7 +812,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID) if (*table & _REGION_ENTRY_INVALID)
return NULL; return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
/* Fallthrough */ fallthrough;
case _ASCE_TYPE_REGION3: case _ASCE_TYPE_REGION3:
table += (gaddr & _REGION3_INDEX) >> _REGION3_SHIFT; table += (gaddr & _REGION3_INDEX) >> _REGION3_SHIFT;
if (level == 2) if (level == 2)
...@@ -820,7 +820,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap, ...@@ -820,7 +820,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID) if (*table & _REGION_ENTRY_INVALID)
return NULL; return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN); table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
/* Fallthrough */ fallthrough;
case _ASCE_TYPE_SEGMENT: case _ASCE_TYPE_SEGMENT:
table += (gaddr & _SEGMENT_INDEX) >> _SEGMENT_SHIFT; table += (gaddr & _SEGMENT_INDEX) >> _SEGMENT_SHIFT;
if (level == 1) if (level == 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment