On Fri, Dec 20, 2013 at 4:43 PM, Jan Beulich <JBeulich@suse.com> wrote:
>>> On 19.12.13 at 17:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:That would still require further special casing in map_domain_page().
> However, for hardware pieces like this which are set up once at the
> start of day, and have the hardware pointed at a chosen region, would it
> be acceptable to allocate their frames low enough to be covered by the
> direct map area (protected by BUG()s?) and set up their base virtual
> addresses knowing that there will always be a valid mapping from any Xen
> pagetables? This seems better than constantly playing around with the
> mappings.
In the case here, and with 32-bit no longer a concern, a virtual
mapping should rather be obtained at boot time once and for all
using vmap().
A question about map_domain_page. If I understand correctly, currently map_domain_page will still do page table setup with virtual address in mapcache area. Why can't we just map all physical memory to XEN's virtual address slot, and do mfn_to_virt to get the virtual address?
-Kai