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

Re: [PATCH 11/22] x86: add a boot option to enable and disable the direct map



Hi,

On 12/01/2024 07:47, Jan Beulich wrote:
On 11.01.2024 19:25, Elias El Yandouzi wrote:
On 11/01/2024 14:09, Jan Beulich wrote:

What about maddr_to_virt()? For instance, in the function
xen/arch/x86/dmi_scan.c:dmi_iterate(), we need to access a very low
machine address which isn't in the directmap range.

I'm afraid I don't follow: Very low addresses are always in the
direct map range, which - on x86 - always starts at 0.


I reckon it was poorly phrased. IIUC, we'd like to remove every use of *_to_virt() in the case the directmap option is disabled. So I meant that in this situation, the helper arch_mfns_in_direct_map() would return false.

How would you proceed? Calling vmap() seems to be a bit overkill for
just a temporary mapping and I don't really want to rework this function
to use map_domain_page().

In such case, how would you proceed? What do you suggest?

fixmap may be an option to consider, but I also don't see why you
apparently think using vmap() would be a possibility while at the
same time making use of map_domain_page() is too much effort.

I thought about using vmap() as it allows to map a contiguous region easily. It is also used in the follow-up patch 17/22, so I thought it could be viable.

I was reluctant to use map_domain_page() for two reasons. 1) it only allows to map one page at the time, so I'd need to rework more deeply the function dmi_iterate() 2) because the mapcache wouldn't be ready to use at that time, the mapping would end up in PMAP which is meant to map the page tables, nothing else.

--
Elias



 


Rackspace

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