From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxJom-0007QQ-9d for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:48:16 -0400 Received: from [140.186.70.92] (port=47468 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxJok-0007P3-UH for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:48:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxJof-0000L6-UD for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:48:15 -0400 Received: from mx20.gnu.org ([199.232.41.8]:39718) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxJof-0000Kz-SK for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:48:09 -0400 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NxJoe-0001Bf-N3 for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:48:09 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: [PATCH 0/5] *** SUBJECT HERE *** Date: Thu, 1 Apr 2010 12:48:05 +0000 References: <1270052612-18351-1-git-send-email-pbonzini@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201004011348.05539.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , Paolo Bonzini > > 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. I agree. Most of the uses of TARGET_PAGE_SIZE are simply an optimization - it's a convenient buffer size for DMA transfers. Other uses are probably incorrect. None of virtio.c, virtio-{blk,net,serial} or virtio-{pci,syborg} should know about CPU properties. Virtio-s390 might because it's implementing magic CPU instructions. Paul