On 11/11/2022 07:56, Wei Chen wrote:
Hi Julien,

-----Original Message-----
From: Julien Grall <[email protected]>
Sent: 2022年11月10日 2:30
To: Wei Chen <[email protected]>; [email protected]
Cc: nd <[email protected]>; Stefano Stabellini <[email protected]>; Bertrand
Marquis <[email protected]>; Volodymyr Babchuk
<[email protected]>
Subject: Re: [PATCH v6 07/11] xen/arm: implement FIXMAP_ADDR for MPU
systems



On 09/11/2022 06:46, Wei Chen wrote:
Hi Julien,

Hi Wei,


-----Original Message-----
From: Julien Grall <[email protected]>
Sent: 2022年11月7日 3:45
To: Wei Chen <[email protected]>; [email protected]
Cc: nd <[email protected]>; Stefano Stabellini <[email protected]>;
Bertrand
Marquis <[email protected]>; Volodymyr Babchuk
<[email protected]>
Subject: Re: [PATCH v6 07/11] xen/arm: implement FIXMAP_ADDR for MPU
systems

Hi Wei,

On 04/11/2022 10:07, Wei Chen wrote:
FIXMAP is a special virtual address section for Xen to map some
physical ram or device memory temporarily in initialization for
MMU systems. FIXMAP_ADDR will return a virtual address by index
for special purpose phys-to-virt mapping usage. For example,
FIXMAP_ADDR(FIXMAP_CONSOLE) for early console mapping and
FIXMAP_ADDR(FIXMAP_MISC) for copy_from_paddr.

To me, we are bending quite a bit the definition of the fixmap. There
are not many use of the FIXMAP within the code and I think it would
simply be better to abstract the use (or removing it when possible) and
avoid defining FIXMAP_ADDR() & co for MPU.


I agree, if we don't mind to add some CONFIG_HAS_MPU in some generic
code.

FAOD, this is not what I had in mind. Instead, it was to provide helper
which for !HAS_MPU would call fixmap and for HAS_MPU would do the work
to map the region in the MPU.


Sorry, I am still confused about this comment, did you mean we can provider
Some generic helpers like: early_map_console / eary_map_guest_memory.
For non-MPU system, we still can call fixmap in these callers, but for
MPU system, we have to map the region to MPU region?

Yes.

Cheers,

--
Julien Grall

Reply via email to