__va() vs phys_to_virt()
Can someone explain where it's appropriate to use __va() and where phys_to_virt() should be used instead? Or are they truly synonymous, and we should phase out one or the other?
Signature · 9 lines
Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
I thought they are the same. phys_to_virt() essentially calls __va().
Xin
Quoted 9 lines · Hollis Blanchard
Can someone explain where it's appropriate to use
__va()and wherephys_to_virt()should be used instead? Or are they truly synonymous, and we should phase out one or the other?--
Hollis Blanchard
IBM Linux Technology Center
Quoted 10 lines
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xen-devel
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 1 line · Xin Zhao
I thought they are the same.
phys_to_virt()essentially calls__va().
They are implemented the same on x86, but that does not imply they mean the same thing.
Quoted 19 lines · Hollis Blanchard
Quoted 18 lines
Can someone explain where it's appropriate to use
__va()and wherephys_to_virt()should be used instead? Or are they truly synonymous, and we should phase out one or the other?--
Hollis Blanchard
IBM Linux Technology Center-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xen-devel
Signature · 9 lines
Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 5 lines · Hollis Blanchard
Quoted 1 line · Xin Zhao
I thought they are the same.
phys_to_virt()essentially calls__va().They are implemented the same on x86, but that does not imply they mean the same thing.
A quick grep shows that most platforms implement __va and phys_to_virt the same way, as addr + PAGE_OFFSET. But alpha seems to do phys_to_virt a little differently. There may be others though, it was only a quick scan.
Jesse
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 10 lines · Jesse Barnes
Quoted 5 lines · Hollis Blanchard
Quoted 1 line · Xin Zhao
I thought they are the same.
phys_to_virt()essentially calls__va().They are implemented the same on x86, but that does not imply they mean the same thing.
A quick grep shows that most platforms implement
__vaandphys_to_virtthe same way, as addr +PAGE_OFFSET. But alpha seems to dophys_to_virta little differently. There may be others though, it was only a quick scan.
I should clarify that I'm not talking about Linux, but rather the Xen core. Linux's use is obviously related, as Xen was a copy-and-paste job, but I'm asking specifically how/if the meanings of these functions differ in Xen.
Signature · 9 lines
Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 3 lines · Hollis Blanchard
Can someone explain where it's appropriate to use
__va()and wherephys_to_virt()should be used instead? Or are they truly synonymous, and we should phase out one or the other?
One minor thing on some Linux arches is that virt_to_phys() is volatile, __pa() is just a macro, so they have different optimization rules.
-- Dave
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click