qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 0/5] *** SUBJECT HERE ***
Date: Wed, 31 Mar 2010 21:08:27 +0200	[thread overview]
Message-ID: <20100331190827.GA19306@hall.aurel32.net> (raw)
In-Reply-To: <r2hf43fc5581003311008k2e0a1f64xfc6d68151648c3cc@mail.gmail.com>

On Wed, Mar 31, 2010 at 08:08:52PM +0300, Blue Swirl wrote:
> On 3/31/10, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > On 03/26/2010 08:02 PM, Blue Swirl wrote:
> >  > Comments, anyone?
> >
> >  Sorry I'm late.
> >
> >  I don't really like the changes introduced here, because they make
> >  devices very very tied to the boards.  Hopefully this could be changed
> >  one day with qdev, and patches like this make this task more complicated.
> 
> The real solution is to insert a byte swapping bus where needed and
> also make devices use some kind of memory API which goes through any
> buses (including byte swapping buses) in between the device and
> memory.
> 
> >  One example is the openpic page size pointed out downthread.
> >
> >  What about something like this (doesn't change all the places affected
> >  by your series, compile-tested only)?
> 
> In general (with vmport and maybe virtio as the only exceptions), the
> devices have no business knowing _any_ CPU properties, like page size
> or endianness. If there really was a device that really cared about
> CPU page size, the size should be also known by the board and should
> be passed down from there via qdev property. Byte swapping should be
> handled by the bus, bus controller or memory controller.

If the device don't have to know about any CPU properties, it's probably
better to remove the wrong dependency on the CPU property, instead of
hardcoding values, like for example to 4096 for the page size.

Note also that we are talking about devices that are usually part of the
CPU like openpic, that's why there are really tight with the CPU.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2010-03-31 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 19:02 [Qemu-devel] [PATCH 00/10] Today's compilation fixes Blue Swirl
2010-03-31 16:23 ` [Qemu-devel] [PATCH 0/5] *** SUBJECT HERE *** Paolo Bonzini
2010-03-31 17:08   ` [Qemu-devel] " Blue Swirl
2010-03-31 19:08     ` Aurelien Jarno [this message]
2010-04-01 12:48     ` 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=20100331190827.GA19306@hall.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@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).