I just ran the static analyser "cppcheck" over the source code of the Linux Kernel. It said [linux-3.5-rc5/arch/powerpc/kvm/e500_tlb.c:325]: (warning) memset() called to fill 0 bytes of 'vcpu_e500' [linux-3.5-rc5/arch/powerpc/kvm/e500_tlb.c:328]: (warning) memset() called to fill 0 bytes of 'vcpu_e500' The source code is if (vcpu_e500->g2h_tlb1_map) memset(vcpu_e500->g2h_tlb1_map, sizeof(u64) * vcpu_e500->gtlb_params[1].entries, 0); if (vcpu_e500->h2g_tlb1_rmap) memset(vcpu_e500->h2g_tlb1_rmap, sizeof(unsigned int) * host_tlb_params[1].entries, 0); Suggest swap parameters 2 & 3 of the calls to memset.
Patch queued
A patch referencing this bug report has been merged in Linux v3.6-rc4: commit e8143ccb6b501f78bb95d9c5ee100d18423008cf Author: Alan Cox <alan@linux.intel.com> Date: Tue Aug 14 12:10:09 2012 +0000 ppc: e500_tlb memset clears nothing