tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 876253994894857f5d099a55147612e4f036d1c3
commit: 6b9b252fa791f704fb19ec451010bc6446ea44ce [56/241] KVM: s390: VSIE: correctly
handle MVPG when in VSIE
config: s390-randconfig-r014-20210512 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 6b9b252fa791f704fb19ec451010bc6446ea44ce
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kvm_host.h:36,
from arch/s390/kvm/vsie.c:10:
arch/s390/include/asm/kvm_host.h:290:1: warning: alignment 1 of 'struct
kvm_s390_sie_block' is less than 8 [-Wpacked-not-aligned]
290 | } __attribute__((packed));
| ^
arch/s390/kvm/vsie.c: In function 'vsie_handle_mvpg':
> arch/s390/kvm/vsie.c:1004:36: error: 'struct
kvm_s390_sie_block' has no member named 'mcic'
1004 | u64
*pei_block = &vsie_page->scb_o->mcic;
| ^~
arch/s390/kvm/vsie.c:1010:9: error: implicit declaration of function
'_kvm_s390_logical_to_effective'; did you mean
'kvm_s390_logical_to_effective'? [-Werror=implicit-function-declaration]
1010 | mask = _kvm_s390_logical_to_effective(&scb_s->gpsw, PAGE_MASK);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| kvm_s390_logical_to_effective
arch/s390/kvm/vsie.c:1015:12: error: too many arguments to function
'kvm_s390_shadow_fault'
1015 | rc_dest = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, dest,
&pei_dest);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from arch/s390/kvm/vsie.c:22:
arch/s390/kvm/gaccess.h:362:5: note: declared here
362 | int kvm_s390_shadow_fault(struct kvm_vcpu *vcpu, struct gmap *shadow,
| ^~~~~~~~~~~~~~~~~~~~~
arch/s390/kvm/vsie.c:1016:11: error: too many arguments to function
'kvm_s390_shadow_fault'
1016 | rc_src = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, src, &pei_src);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from arch/s390/kvm/vsie.c:22:
arch/s390/kvm/gaccess.h:362:5: note: declared here
362 | int kvm_s390_shadow_fault(struct kvm_vcpu *vcpu, struct gmap *shadow,
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1004 arch/s390/kvm/vsie.c
999
1000 static int vsie_handle_mvpg(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
1001 {
1002 struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
1003 unsigned long pei_dest, pei_src, src, dest, mask;
1004 u64 *pei_block = &vsie_page->scb_o->mcic;
1005 int edat, rc_dest, rc_src;
1006 union ctlreg0 cr0;
1007
1008 cr0.val = vcpu->arch.sie_block->gcr[0];
1009 edat = cr0.edat && test_kvm_facility(vcpu->kvm, 8);
1010 mask = _kvm_s390_logical_to_effective(&scb_s->gpsw, PAGE_MASK);
1011
1012 dest = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 20) & mask;
1013 src = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 16) & mask;
1014
1015 rc_dest = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, dest, &pei_dest);
1016 rc_src = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, src, &pei_src);
1017 /*
1018 * Either everything went well, or something non-critical went wrong
1019 * e.g. because of a race. In either case, simply retry.
1020 */
1021 if (rc_dest == -EAGAIN || rc_src == -EAGAIN || (!rc_dest && !rc_src)) {
1022 retry_vsie_icpt(vsie_page);
1023 return -EAGAIN;
1024 }
1025 /* Something more serious went wrong, propagate the error */
1026 if (rc_dest < 0)
1027 return rc_dest;
1028 if (rc_src < 0)
1029 return rc_src;
1030
1031 /* The only possible suppressing exception: just deliver it */
1032 if (rc_dest == PGM_TRANSLATION_SPEC || rc_src == PGM_TRANSLATION_SPEC) {
1033 clear_vsie_icpt(vsie_page);
1034 rc_dest = kvm_s390_inject_program_int(vcpu, PGM_TRANSLATION_SPEC);
1035 WARN_ON_ONCE(rc_dest);
1036 return 1;
1037 }
1038
1039 /*
1040 * Forward the PEI intercept to the guest if it was a page fault, or
1041 * also for segment and region table faults if EDAT applies.
1042 */
1043 if (edat) {
1044 rc_dest = rc_dest == PGM_ASCE_TYPE ? rc_dest : 0;
1045 rc_src = rc_src == PGM_ASCE_TYPE ? rc_src : 0;
1046 } else {
1047 rc_dest = rc_dest != PGM_PAGE_TRANSLATION ? rc_dest : 0;
1048 rc_src = rc_src != PGM_PAGE_TRANSLATION ? rc_src : 0;
1049 }
1050 if (!rc_dest && !rc_src) {
1051 pei_block[0] = pei_dest;
1052 pei_block[1] = pei_src;
1053 return 1;
1054 }
1055
1056 retry_vsie_icpt(vsie_page);
1057
1058 /*
1059 * The host has edat, and the guest does not, or it was an ASCE type
1060 * exception. The host needs to inject the appropriate DAT interrupts
1061 * into the guest.
1062 */
1063 if (rc_dest)
1064 return inject_fault(vcpu, rc_dest, dest, 1);
1065 return inject_fault(vcpu, rc_src, src, 0);
1066 }
1067
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org