From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsfT2-0007B1-4i for qemu-devel@nongnu.org; Sun, 14 Aug 2011 14:31:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QsfSz-0000ja-Bj for qemu-devel@nongnu.org; Sun, 14 Aug 2011 14:31:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsfSz-0000jQ-4c for qemu-devel@nongnu.org; Sun, 14 Aug 2011 14:31:21 -0400 Message-ID: <4E481474.8000508@redhat.com> Date: Sun, 14 Aug 2011 11:31:16 -0700 From: Avi Kivity MIME-Version: 1.0 References: <1313080198-730-1-git-send-email-avi@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1.1 18/24] versatile_pci: convert to memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 08/11/2011 02:53 PM, Peter Maydell wrote: > On 11 August 2011 17:29, Avi Kivity wrote: > > -static uint32_t pci_vpb_config_readl (void *opaque, target_phys_addr_t addr) > > +static uint64_t pci_vpb_config_read(void *opaque, target_phys_addr_t addr, > > + unsigned size) > > { > > uint32_t val; > > - val = pci_data_read(opaque, vpb_pci_config_addr (addr), 4); > > + val = pci_data_read(opaque, vpb_pci_config_addr(addr), size); > > return val; > > } > > ...actually this looks a bit odd now, because the return type has > become uint64_t but val is still uint32_t (though pci_data_read() > still returns a uint32_t, so I suppose it's defensible). I probably should have left 64-bit data width until later. Note the core will never ask a device for 64-bit data unless the device declares it supports it. > I'm not sure why the local is there anyway, so I'd be tempted to > just return pci_data_read(...). > I'm making minimal, reviewable changes, not trying to improve things. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.