[arm-platforms:kvm-arm64/ptrauth-fixes 29/29] arch/arm64/kvm/hyp/debug-sr.c:188:19: sparse: sparse: incorrect type in assignment (different address spaces)
From: kernel test robot <hidden>
Date: 2020-06-06 22:45:16
Also in:
oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/ptrauth-fixes head: 393909d3365ca0d4400b444d18e4b8b00f09e84c commit: 393909d3365ca0d4400b444d18e4b8b00f09e84c [29/29] KVM: arm64: Remove host_cpu_context member from vcpu structure config: arm64-randconfig-s032-20200607 (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-247-gcadbd124-dirty git checkout 393909d3365ca0d4400b444d18e4b8b00f09e84c # save the attached .config to linux build tree make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> sparse warnings: (new ones prefixed by >>)
quoted
arch/arm64/kvm/hyp/debug-sr.c:188:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct kvm_cpu_context *host_ctxt @@ got struct kvm_cpu_context [noderef] <asn:3> * @@ arch/arm64/kvm/hyp/debug-sr.c:188:19: sparse: expected struct kvm_cpu_context *host_ctxt arch/arm64/kvm/hyp/debug-sr.c:188:19: sparse: got struct kvm_cpu_context [noderef] <asn:3> *
arch/arm64/kvm/hyp/debug-sr.c:210:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct kvm_cpu_context *host_ctxt @@ got struct kvm_cpu_context [noderef] <asn:3> * @@ arch/arm64/kvm/hyp/debug-sr.c:210:19: sparse: expected struct kvm_cpu_context *host_ctxt arch/arm64/kvm/hyp/debug-sr.c:210:19: sparse: got struct kvm_cpu_context [noderef] <asn:3> * --
quoted
arch/arm64/kvm/hyp/switch.c:547:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct kvm_cpu_context *ctxt @@ got struct kvm_cpu_context [noderef] <asn:3> * @@ arch/arm64/kvm/hyp/switch.c:547:14: sparse: expected struct kvm_cpu_context *ctxt arch/arm64/kvm/hyp/switch.c:547:14: sparse: got struct kvm_cpu_context [noderef] <asn:3> * arch/arm64/kvm/hyp/switch.c:718:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct kvm_cpu_context *host_ctxt @@ got struct kvm_cpu_context [noderef] <asn:3> * @@ arch/arm64/kvm/hyp/switch.c:718:19: sparse: expected struct kvm_cpu_context *host_ctxt
arch/arm64/kvm/hyp/switch.c:718:19: sparse: got struct kvm_cpu_context [noderef] <asn:3> *
arch/arm64/kvm/hyp/switch.c:823:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct kvm_cpu_context *host_ctxt @@ got struct kvm_cpu_context [noderef] <asn:3> * @@
arch/arm64/kvm/hyp/switch.c:823:19: sparse: expected struct kvm_cpu_context *host_ctxt
arch/arm64/kvm/hyp/switch.c:823:19: sparse: got struct kvm_cpu_context [noderef] <asn:3> *
arch/arm64/kvm/hyp/switch.c:656:13: sparse: sparse: dereference of noderef expression
arch/arm64/kvm/hyp/switch.c:668:13: sparse: sparse: dereference of noderef expression
vim +188 arch/arm64/kvm/hyp/debug-sr.c
170
171 void __hyp_text __debug_switch_to_guest(struct kvm_vcpu *vcpu)
172 {
173 struct kvm_cpu_context *host_ctxt;
174 struct kvm_cpu_context *guest_ctxt;
175 struct kvm_guest_debug_arch *host_dbg;
176 struct kvm_guest_debug_arch *guest_dbg;
177
178 /*
179 * Non-VHE: Disable and flush SPE data generation
180 * VHE: The vcpu can run, but it can't hide.
181 */
182 if (!has_vhe())
183 __debug_save_spe_nvhe(&vcpu->arch.host_debug_state.pmscr_el1);
184
185 if (!(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY))
186 return;
187
> 188 host_ctxt = &__hyp_this_cpu_ptr(kvm_host_data)->host_ctxt;
189 guest_ctxt = &vcpu->arch.ctxt;
190 host_dbg = &vcpu->arch.host_debug_state.regs;
191 guest_dbg = kern_hyp_va(vcpu->arch.debug_ptr);
192
193 __debug_save_state(vcpu, host_dbg, host_ctxt);
194 __debug_restore_state(vcpu, guest_dbg, guest_ctxt);
195 }
196
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 35783 bytes
- (unnamed) [text/plain] 176 bytes · preview