From: Cam Macdonell Subject: Re: IVSHMEM and limits on shared memory Date: Wed, 3 Mar 2010 15:09:17 -0700 Message-ID: <8286e4ee1003031409q2a097931nbcb6096caa7671e6@mail.gmail.com> References: <8286e4ee1003011017y7727e3fcp52a1a47e483285e1@mail.gmail.com> <1267467562-23539-1-git-send-email-cam@cs.ualberta.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Khaled Ibrahim Return-path: Received: from mail-iw0-f182.google.com ([209.85.223.182]:52166 "EHLO mail-iw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754430Ab0CCWJS convert rfc822-to-8bit (ORCPT ); Wed, 3 Mar 2010 17:09:18 -0500 Received: by iwn12 with SMTP id 12so1572451iwn.21 for ; Wed, 03 Mar 2010 14:09:18 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Mar 3, 2010 at 12:06 AM, Khaled Ibrahim wro= te: > > Hi Cam, > > I used your patches successfully to support shared memory on KVM and > used the test cases successfully, but qemu-kvm crashes when I increas= ed the > size of the shared memory.=A0 I > applied the ivshmem patch to qemu-kvm-0.12.3 (some manual patching wa= s > needed).=A0 It worked flawlessly for > up to 128MB of shared memory on my system. I am running on a machine = with 64GB > memory running opensuse (kernel 2.6.27) on AMD opteron. > > Qemu crashes=A0 with > smp=3D4 and the shared memory requested in 256MB, (512MB with smp=3D1= ), even though > the shared memory file is created. I debugged the problem and it seem= s that > some memory corruptions happens. Can you please provide the full command-line for the smp=3D1 instance? > > It crashes in the subpage_register for rtl8139 pci driver!, > tracked back to rtl8139_mmio_map. The problem starts with corrupted v= alue in > the config field in the struct for the rtl8139 driver. At offset 20 o= f this > field the address should indicate that the address is uninitialized a= t that > time of crash, but surprisingly the value changes over the course of = execution > and gets the SIZE of the shared memory allocated (related to ivshmem)= =2E I failed > to identify what changes/corrupts that field. I tried some padding fo= r > allocation but the field always gets updated with the size of the sha= red memory > in a very consistent way. > As far as you know does anything in the guest trigger the corruption? Does the corruption happen immediately or after running some of the test programs? Thanks, Cam