On 08/11/2011 02:53 PM, Peter Maydell wrote:
On 11 August 2011 17:29, Avi Kivity<a...@redhat.com> 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.