From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iaphk-0000eX-Nt for qemu-devel@nongnu.org; Thu, 27 Sep 2007 05:30:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iaphi-0000cX-Vm for qemu-devel@nongnu.org; Thu, 27 Sep 2007 05:30:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iaphi-0000cB-Oe for qemu-devel@nongnu.org; Thu, 27 Sep 2007 05:30:42 -0400 Received: from il.qumranet.com ([82.166.9.18]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iaphi-0005fi-6E for qemu-devel@nongnu.org; Thu, 27 Sep 2007 05:30:42 -0400 Message-ID: <46FB7AB9.30502@qumranet.com> Date: Thu, 27 Sep 2007 11:41:13 +0200 From: Avi Kivity MIME-Version: 1.0 References: <46FA7F08.4070109@bull.net> <20070926155531.GB29729@redhat.com> <46FA828D.1080303@bull.net> <20070926161131.GC29729@redhat.com> In-Reply-To: <20070926161131.GC29729@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [kvm-devel] [ kvm-Bugs-1802223 ] nics have same hw address (rtl8139) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: kvm-devel@lists.sourceforge.net, Laurent Vivier , qemu-devel@nongnu.org Daniel P. Berrange wrote: > On Wed, Sep 26, 2007 at 06:02:21PM +0200, Laurent Vivier wrote: > >> Daniel P. Berrange wrote: >> >>> On Wed, Sep 26, 2007 at 05:47:20PM +0200, Laurent Vivier wrote: >>> >>>> Hi, >>>> >>>> I think there is a bug in qemu RTL8139. >>>> >>>> RTL8139 uses: >>>> >>>> cpu_register_physical_memory(addr + 0, 0x100, s->rtl8139_mmio_io_addr); >>>> >>>> But in the comment of cpu_register_physical_memory() we have: >>>> >>>> "'size' must be a multiple of the target page size." >>>> >>>> And I think 0x100 is not a multiple of target page size.... :-P >>>> >>> Latest upstream QEMU has fixed its memory handling so that MMIO regions >>> do not need to be a multiple of page size. Changing RTL8139 to use a >>> block of size 0x1000 is a reasonable short term hack around the problem, >>> but syncing with latest QEMU is the real solution, since there are other >>> places in the code which will have similar issues. >>> >>> >> So this explains why rtl8139.c from QEMU CVS always uses 0x100. >> >> Thank you for the comment. >> >> Avi, you know what you have to do ;-) >> > > I did start on back porting the QEMU subpage handling fixes to KVM for > Fedora 7, but in the end went for the simpler s/0x100/0x1000/ quick hack. > I'm attaching the patch which I started against kvm-24 in case it is useful, > though note that the only testing I did with it was to see if a F7 guest > booted and saw distinct MAC addrs. It should apply with minor fuzz/offsets > to at least kvm-35. > Everything points to a qemu merge being sorely needed. Does anyone have any experience with recent versions? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.