From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUkxG-0005pr-M7 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:54:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUkxB-0005lq-Vy for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:54:58 -0500 Received: from [199.232.76.173] (port=50234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUkxB-0005li-RT for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:54:53 -0500 Received: from cantor.suse.de ([195.135.220.2]:48767 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NUkxB-0007Di-6V for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:54:53 -0500 Message-ID: <4B4CB76A.8030904@suse.de> Date: Tue, 12 Jan 2010 18:54:50 +0100 From: Alexander Graf MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 6/6] pci host: make pci_data_{write, read}() get PCIConfigAddress. References: <1263286378-10398-1-git-send-email-yamahata@valinux.co.jp> <1263286378-10398-7-git-send-email-yamahata@valinux.co.jp> <20100112101236.GD29926@redhat.com> <20100112104357.GE6257@valinux.co.jp> In-Reply-To: <20100112104357.GE6257@valinux.co.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: Blue Swirl , qemu-devel@nongnu.org, Paul Brook , Aurelien Jarno , "Michael S. Tsirkin" Isaku Yamahata wrote: > On Tue, Jan 12, 2010 at 12:12:36PM +0200, Michael S. Tsirkin wrote: > >> On Tue, Jan 12, 2010 at 05:52:58PM +0900, Isaku Yamahata wrote: >> >>> diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c >>> index d99b7fa..14a728a 100644 >>> --- a/hw/versatile_pci.c >>> +++ b/hw/versatile_pci.c >>> @@ -23,11 +23,29 @@ static inline uint32_t vpb_pci_config_addr(target_phys_addr_t addr) >>> return addr & 0xffffff; >>> } >>> >>> +static void vpb_pci_data_write(PCIHostState *s, target_phys_addr_t addr, >>> + uint32_t val, int len) >>> +{ >>> + PCIConfigAddress conf_addr; >>> + pci_host_decode_config_addr_valid(s, vpb_pci_config_addr(addr), >>> + &conf_addr); >>> + pci_data_write(&conf_addr, 0, val, len); >>> +} >>> + >>> +static uint32_t vpb_pci_data_read(PCIHostState *s, target_phys_addr_t addr, >>> + int len) >>> +{ >>> + PCIConfigAddress conf_addr; >>> + pci_host_decode_config_addr_valid(s, vpb_pci_config_addr(addr), >>> + &conf_addr); >>> + return pci_data_read(&conf_addr, 0, len); >>> +} >>> + >>> >> I thought we will get rid of vpb_pci_config_addr, and fill in >> fields in PCIConfigAddress directly. If we don't, and still >> recode into PC format, this is not making code any prettier >> so I don't really see what this buys us. >> > > I should have explain my plan. > > After introducing decode callback by Alexander patch, > I'd like to remove them. > I was waiting for his respin, but he seems to be busy. > So I created this patch series to make his respin easier (hopefully). > For that sake, I kept the original structures. > > I'm fine with either ways. Waiting for his patch merged or > make this patch series into shape. > Oh, I guess I read this mail too late. Sorry about that :-). Alex