[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] How to register a 64 bit BAR



On Tue, Sep 23, 2014 at 08:33:08PM +0000, Zytaruk, Kelly wrote:
> I have used pci_register_io_region() to register 32 bit BARs but how do I 
> register a 64 bit BAR?
> 
> Let's say my region uses BAR 2 and BAR 3 for a 64 bit address.  Do I register 
> them separately as in
> 
> pci_register_io_region (dev, 2, region_size, PCI_ADDRESS_SPACE_MEM, &my_func);
> pci_register_io_region (dev, 3, region_size, ???, &my_func);

No, that would register two different BARs.

> What would I specify as a region type for BAR 3?

Nothing, since you don't want two different BARs.

> Or is QEMU smart enough for me to register just BAR 2 and it will know 
> somehow that it is a 64 bit BAR?

Nop.

> I also want to call cpu_register_physical_memory() from within the callback 
> but the callback only takes a uint32_t as a physical address.
> I am having difficulty finding an example that uses a 64 bit BAR address.

Look for where PCI_ADDRESS_SPACE_MEM is define, and you will find how to
register a 64bit BAR.
Unless your are speaking about qemu-traditional and I'm not sure that is
possible.

After looking in the source code of qemu-traditional, it does not appear
to support 64bit BAR. Only QEMU upstream handle them (also called
qemu-xen).

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.