qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: Compile files only once: some planning
Date: Wed, 24 Mar 2010 22:32:47 +0200	[thread overview]
Message-ID: <f43fc5581003241332u15d2ffd6h3b27ad7831e0ef57@mail.gmail.com> (raw)
In-Reply-To: <20100324202429.GA11172@redhat.com>

On 3/24/10, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Wed, Mar 24, 2010 at 10:24:12PM +0200, Blue Swirl wrote:
>  > On 3/24/10, Michael S. Tsirkin <mst@redhat.com> wrote:
>  > > On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote:
>  > >  > On 3/24/10, Michael S. Tsirkin <mst@redhat.com> wrote:
>  > >  > > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote:
>  > >  > >  > rtl8139.c, e1000.c: need to convert ldl/stl to cpu_physical_memory_read/write.
>  > >  > >
>  > >  > >
>  > >  > > I don't see how it would help. These still get target_phys_addr_t which
>  > >  > >  is per-target. Further, a ton of devices do
>  > >  > >  cpu_register_physical_memory/qemu_register_coalesced_mmio.
>  > >  > >  These are also per target.
>  > >  >
>  > >  > I don't know what I was eating yesterday: there are no references to
>  > >  > ldl/stl in either rtl8139 or e1000. In fact, the conversion is simple
>  > >  > for the device itself, just add a property "be". The attached patch
>  > >  > performs this part.
>  > >  >
>  > >  > But now there is a bigger problem, how to pass the property to the
>  > >  > device. It's not fair to require the user to remember to set it.
>  > >
>  > >
>  > > I still don't fully understand how come e1000 cares about
>  > >  target endianness.
>  >
>  > It shouldn't. Maybe the real fix is to remove the byte swapping.
>
>
> Presumably it's there for a reason?
>
>
>  > >  > >  A simple solution would be to change all of cpu_XX functions to
>  > >  > >  get a 64 bit address. This is a lot of churn, if we do this
>  > >  > >  anyway we should also pass length to callbacks, this way
>  > >  > >  rwhandler will get very small or go away completely.
>  > >  >
>  > >  > It's not too much effort to keep the target_phys_addr_t type.
>  > >
>  > >
>  > > I don't understand - target_phys_addr_t is different for different
>  > >  targets to we will need to recompile the code for each target.
>  > >  What am I missing?
>  >
>  > target_phys_addr_t is 64 bit on a 64 bit host, on a 32 bit host it's
>  > size will be either 64 or 32 bits depending on the target. So the
>  > files are compiled once on 64 bit host, twice on 32 bit host if both
>  > 32 and 64 bits targets are selected.
>
>
> How about just making it 64 bit unconditionally?
>  How much do we save by using a 32 bit address value?

On a 32 bit host, probably a lot because of register pressure. And
it's not too much effort to keep the target_phys_addr_t type logic.

  reply	other threads:[~2010-03-24 20:32 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 21:43 [Qemu-devel] Compile files only once: some planning Blue Swirl
2010-03-24  9:17 ` [Qemu-devel] " Juan Quintela
2010-03-24 17:56   ` Blue Swirl
2010-03-24 19:28     ` Juan Quintela
2010-03-24 22:47       ` Paul Brook
2010-03-24 22:57         ` Anthony Liguori
2010-03-25  3:08           ` Jamie Lokier
2010-03-25  2:54   ` Jamie Lokier
2010-03-24  9:47 ` Paolo Bonzini
2010-03-24 11:19   ` Richard Henderson
2010-03-24 14:45     ` Paolo Bonzini
2010-03-24 14:56       ` Paul Brook
2010-03-24 16:18         ` Paolo Bonzini
2010-03-24 17:27           ` Paul Brook
2010-03-24 17:07       ` Richard Henderson
2010-03-24 20:12         ` Richard Henderson
2010-03-24 18:00     ` Blue Swirl
2010-03-24 19:39 ` Michael S. Tsirkin
2010-03-24 20:05   ` Blue Swirl
2010-03-24 20:08     ` Michael S. Tsirkin
2010-03-24 20:24       ` Blue Swirl
2010-03-24 20:24         ` Michael S. Tsirkin
2010-03-24 20:32           ` Blue Swirl [this message]
2010-03-24 20:28         ` Anthony Liguori
2010-03-24 21:00         ` Aurelien Jarno
2010-03-24 22:33     ` Paul Brook
2010-03-24 22:50       ` Anthony Liguori
2010-03-24 23:05         ` Paul Brook
2010-03-24 23:07           ` Anthony Liguori
2010-03-25  8:21             ` Michael S. Tsirkin
2010-03-25 12:01               ` Paul Brook

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=f43fc5581003241332u15d2ffd6h3b27ad7831e0ef57@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=mst@redhat.com \
    --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).