From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ql3qN-0001MP-Vo for qemu-devel@nongnu.org; Sun, 24 Jul 2011 14:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ql3qN-0004bR-0g for qemu-devel@nongnu.org; Sun, 24 Jul 2011 14:56:03 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:37918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ql3qM-0004bL-S8 for qemu-devel@nongnu.org; Sun, 24 Jul 2011 14:56:02 -0400 Received: by ywb3 with SMTP id 3so2297969ywb.4 for ; Sun, 24 Jul 2011 11:56:01 -0700 (PDT) Message-ID: <4E2C6AC0.3010203@codemonkey.ws> Date: Sun, 24 Jul 2011 13:56:00 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1311448659-17424-1-git-send-email-rth@twiddle.net> <1311448659-17424-2-git-send-email-rth@twiddle.net> <4E2C1E0D.4050100@codemonkey.ws> <4E2C4B5B.9030402@twiddle.net> In-Reply-To: <4E2C4B5B.9030402@twiddle.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/7] Export the unassigned_mem read/write functions. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On 07/24/2011 11:42 AM, Richard Henderson wrote: > On 07/24/2011 06:28 AM, Anthony Liguori wrote: >> On 07/23/2011 02:17 PM, Richard Henderson wrote: >>> Signed-off-by: Richard Henderson >> >> Why? > > So that I can write i/o functions like this: > > switch (addr) { > case 0: ... > case 64: ... > case 128: ... > ... > default: > unassigned_mem_readl(...) > } > > Perhaps Avi's rewrite makes this unnecessary; I browsed through > his patch set but didn't immediately see if there's a way for > the i/o function to return "failure". What is returned by totally unregistered MMIO is defined by the chipset. What's returned by an empty space in the MMIO space of a device is device specific. What does your device return if there's an access at 32? Regards, Anthony Liguori > > What I certainly don't want to do is write this with 100 tiny > functions registering 8 bytes each, registered some tiny > distance away from each other. > > > r~ >