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

[Xen-devel] virtual, physical and bus address on Dom0

Consider the code:

dma_addr_t dma_addr, dma_addr2;
phys_addr_t phys_addr;
cpu_addr = pci_alloc_consistent(pdev, size, &dma_addr);
phys_addr = virt_to_phys(cpu_addr);
dma_addr2 = virt_to_bus(cpu_addr);

In Dom0 the outputs are:

dma_addr: 0xbc800000
phys_addr: 0x5b000000
dma_addr2: 0x5b000000

Why the addresses are different in dma_addr and dma_addr2?
Which one is the correct value I should use in DMA operations?


Xen-devel mailing list



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