From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH 1/2] Type-safe ioport callbacks Date: Wed, 27 Oct 2010 11:26:26 +0200 Message-ID: <4CC7F042.3040901@redhat.com> References: <1287934469-16624-1-git-send-email-avi@redhat.com> <1287934469-16624-2-git-send-email-avi@redhat.com> <4CC55554.4060103@redhat.com> <4CC68BE1.5010207@redhat.com> <4CC70D5D.4020109@redhat.com> <4CC70F65.7050506@codemonkey.ws> <4CC7115D.4050108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Blue Swirl Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54349 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060Ab0J0J0d (ORCPT ); Wed, 27 Oct 2010 05:26:33 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 10/26/2010 08:33 PM, Blue Swirl wrote: > > > > Why two types? I think some devices use PIO on a PC and MMIO on other > > architectures. Sharing the type would allow sharing code. > > Then there are the functions provided by rwhandler.c. I think that > interface makes even more sense compared to 8/16/32 (and 64?) bit > handlers in many cases. On the other hand, that makes the transition harder. Perhaps we can have a type with {read,write}(addr, width), and another built on top that provides the traditional {read,write}[bwl](addr) to ease the transition. -- error compiling committee.c: too many arguments to function