Received: from eggs.gnu.org ([2001:4830:134:3::10]:36842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIHGc-0001Gb-Ho for qemu-devel@nongnu.org; Thu, 23 Jul 2015 10:14:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIHGY-0002Im-PA for qemu-devel@nongnu.org; Thu, 23 Jul 2015 10:14:34 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:36747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIHGY-0002IV-LJ for qemu-devel@nongnu.org; Thu, 23 Jul 2015 10:14:30 -0400 Received: by qkdv3 with SMTP id v3so173881188qkd.3 for ; Thu, 23 Jul 2015 07:14:29 -0700 (PDT) Date: Thu, 23 Jul 2015 10:14:26 -0400 From: Kevin O'Connor Message-ID: <20150723141426.GA18216@morn.localdomain> References: <1437494626-3773-1-git-send-email-markmb@redhat.com> <1437494626-3773-3-git-send-email-markmb@redhat.com> <20150722042434.GB27877@morn.localdomain> <20150722103112.1d97386b@markmb_rh> <20150722171804.GA2717@morn.localdomain> <55B0E86E.2030209@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Stefan Hajnoczi , QEMU Developers , "Richard W.M. Jones" , Gerd Hoffmann , Paolo Bonzini , Marc =?iso-8859-1?Q?Mar=ED?= , Laszlo Ersek On Thu, Jul 23, 2015 at 02:35:05PM +0100, Peter Maydell wrote: > On 23 July 2015 at 14:13, Laszlo Ersek wrote: > > On 07/22/15 19:18, Kevin O'Connor wrote: > >> Another possibility would be to place the new fw_cfg dma register > >> address into a named fw_cfg "file" (eg, "fw_cfg_dma"). The firmware > >> could then use the existing select/data fw_cfg interface to check if > >> the new dma interface is available by scanning for that "fw_cfg_dma" > >> file. This has the advantage of not requiring a new "magic address", > >> but has the disadvantage of a more complex probe. > > > > I like this one so much that I'm worried I'm missing some details. :) > > This requires the device itself to know its own address, which > is in QEMU possible but ugly enough to be worth avoiding. > > For ARM MMIO the obvious answer is "the new register should > just go next to the first one". Does x86 do something that > means we can't put it somewhere equally straightforward > or do discovery via whatever x86 uses for discovering MMIO? On x86 the fw_cfg select/data registers are in IO space at address 0x510 and 0x511. I suspect one could put a "transfer descriptor address" register in IO space at 0x514-0x51c (or 0x518-0x520 if alignment is a concern, or even 0x510-0x518 if willing to play tricks with read/write size). I didn't see any conflicts after a quick search - does anyone know if it would be a problem? -Kevin