qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: kvm-devel@lists.sourceforge.net,
	Laurent Vivier <Laurent.Vivier@bull.net>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [kvm-devel] [ kvm-Bugs-1802223 ] nics have same hw address	(rtl8139)
Date: Thu, 27 Sep 2007 11:41:13 +0200	[thread overview]
Message-ID: <46FB7AB9.30502@qumranet.com> (raw)
In-Reply-To: <20070926161131.GC29729@redhat.com>

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.

      reply	other threads:[~2007-09-27  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1IaFcv-0003fu-Oi@sc8-sf-web22.sourceforge.net>
2007-09-26 15:47 ` [Qemu-devel] Re: [kvm-devel] [ kvm-Bugs-1802223 ] nics have same hw address (rtl8139) Laurent Vivier
2007-09-26 15:55   ` Daniel P. Berrange
2007-09-26 16:02     ` Laurent Vivier
2007-09-26 16:11       ` Daniel P. Berrange
2007-09-27  9:41         ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46FB7AB9.30502@qumranet.com \
    --to=avi@qumranet.com \
    --cc=Laurent.Vivier@bull.net \
    --cc=berrange@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).