From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: libkvm: initialize no_pit_creation Date: Fri, 02 May 2008 14:22:06 +0300 Message-ID: <481AF95E.2030302@qumranet.com> References: <20080426005343.GA11096@dmt> <48147690.1040105@qumranet.com> <48161063.7040002@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Marcelo Tosatti To: Jan Kiszka Return-path: In-Reply-To: <48161063.7040002@siemens.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Jan Kiszka wrote: > Yeah, it is. Reminds me of another warning I recently came across > (offsets may vary due to other patches: > > ==5801== 1 errors in context 1 of 2: > ==5801== Conditional jump or move depends on uninitialised value(s) > ==5801== at 0x53F4AE: kvm_register_userspace_phys_mem (libkvm.c:552) > ==5801== by 0x521ACA: kvm_cpu_register_physical_memory (qemu-kvm.c:654) > ==5801== by 0x45FC82: pc_init1 (pc.c:809) > ==5801== by 0x461313: pc_init_pci (pc.c:1149) > ==5801== by 0x43081B: main (vl.c:9845) > > This silences valgrind and may even be correct (if I got the code path > right): > > Signed-off-by: Jan Kiszka > > --- a/libkvm/libkvm.c > +++ b/libkvm/libkvm.c > @@ -328,9 +328,10 @@ static int kvm_create_default_phys_mem(k > > #ifdef KVM_CAP_USER_MEMORY > r = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_USER_MEMORY); > - if (r > 0) > + if (r > 0) { > + kvm->physical_memory = NULL; > return 0; > - else > + } else > #endif > r = kvm_alloc_kernel_memory(kvm, memory, vm_mem); > if (r < 0) > > As related earlier, physical_memory is bogus, so I removed it. Let's pretend it never existed. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone