From: Ayan Kumar Halder <ayankuma@amd.com>
To: Julien Grall <julien@xen.org>,
Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Cc: xen-devel@lists.xenproject.org, Penny Zheng <penny.zheng@arm.com>,
Wei Chen <wei.chen@arm.com>,
sstabellini@kernel.org, bertrand.marquis@arm.com,
michal.orzel@amd.com, Jan Beulich <jbeulich@suse.com>,
Volodymyr_Babchuk@epam.com
Subject: Re: [PATCH v3 2/4] xen: make VMAP only support in MMU system
Date: Tue, 20 Aug 2024 12:48:13 +0100 [thread overview]
Message-ID: <e7882491-e916-43c6-ac61-12da83e9c086@amd.com> (raw)
In-Reply-To: <55a91ace-a76f-40b9-bdb2-49f816006612@xen.org>
Hi Julien/Jan,
On 19/08/2024 10:58, Julien Grall wrote:
>
>
> On 19/08/2024 10:55, Julien Grall wrote:
>> Hi Ayan,
>>
>> On 19/08/2024 10:45, Ayan Kumar Halder wrote:
>>> I am ok with this. This has the benefit that the change can be
>>> contained within arch/arm if we do the following :-
>>>
>>> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
>>> index cb2c0a16b8..26f7406278 100644
>>> --- a/xen/arch/arm/setup.c
>>> +++ b/xen/arch/arm/setup.c
>>> @@ -329,7 +329,9 @@ void asmlinkage __init start_xen(unsigned long
>>> boot_phys_offset,
>>>
>>> setup_mm();
>>>
>>> +#ifdef CONFIG_MMU
>>> vm_init();
>>> +#endif
>>>
>>> /* Parse the ACPI tables for possible boot-time configuration */
>>> acpi_boot_table_init();
>>>
>>> Are we ok with this ?
>>>
>>> The definition of vm_init() is in xen/include/xen/vmap.h. If I
>>> enclose it using any CONFIG_XXX (like I have done in the current
>>> patch), then I need to introduce it in common/Kconfig and define it
>>> for x86 and PPC. I would prefer to contain the change within
>>> arch/arm only if possible.
>>
>> Just to clarify, are you suggesting to just protect the call
>> vm_init(). In other word, common/vmap.c would still be included in
>> the final binary for the MPU?
>>
>> If yes, then I think it would be a bit odd... Someone could still
>> call vmap() and this would not break until runtime.
>>
>> So I don't see how we could get away from modifying the common code.
>
> Readying my previous reply again. I think the confusion comes from:
>
> > But maybe ARCH_VMAP was an incorrect suggestion. It might be better
> to gate with the !MMU (IIRC this would imply MPU).
>
> This was specifically referring to the branch predictor Kconfig. This
> was not a suggestion to avoid introducing ARCH_VMAP.
Thanks for clarifying this. Yes, I misunderstood your previous comment.
So I will do :-
1. HARDEN_BRANCH_PREDICTOR will depend on MMU.
2. ARCH_VMAP will be selected by PPC and RISCV. The reason is below.
3. xen/common/vmap.c will be conditionally compiled on ARCH_VMAP and the
"#ifdef VMAP_VIRT_START .. endif" will be from removed within the file.
As VMAP_VIRT_START is defined by RISCV and PPC, thus #2 is needed.
Julien, Jan :- Please let me know if you are ok with #3. This was in
response to Michal's comment. While his suggestion makes sense, I am not
sure if extending the changes to other architectures is the correct
approach. Or do you prefer keeping xen/common/vmap.c unchanged.
Kind regards,
Ayan
>
> Cheers,
>
next prev parent reply other threads:[~2024-08-20 11:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 17:13 [PATCH v3 0/4] xen: arm: Split MMU code in preparation for MPU work (part 2) Ayan Kumar Halder
2024-08-13 17:13 ` [PATCH v3 1/4] xen: arm: Add a new helper update_boot_mapping() Ayan Kumar Halder
2024-08-14 12:50 ` Michal Orzel
2024-08-20 11:27 ` Ayan Kumar Halder
2024-08-13 17:13 ` [PATCH v3 2/4] xen: make VMAP only support in MMU system Ayan Kumar Halder
2024-08-14 6:37 ` Jan Beulich
2024-08-14 10:55 ` Ayan Kumar Halder
2024-08-14 11:35 ` Jan Beulich
2024-08-14 12:33 ` Ayan Kumar Halder
2024-08-14 13:04 ` Jan Beulich
2024-08-16 9:28 ` Michal Orzel
2024-08-16 16:00 ` Ayan Kumar Halder
2024-08-16 16:40 ` Julien Grall
2024-08-19 9:45 ` Ayan Kumar Halder
2024-08-19 9:55 ` Julien Grall
2024-08-19 9:58 ` Julien Grall
2024-08-20 11:48 ` Ayan Kumar Halder [this message]
2024-08-20 12:51 ` Jan Beulich
2024-08-19 11:39 ` Jan Beulich
2024-08-19 12:12 ` Julien Grall
2024-08-19 12:24 ` Jan Beulich
2024-08-19 13:01 ` Julien Grall
2024-08-13 17:13 ` [PATCH v3 3/4] xen: arm: Move the functions of domain_page to MMU specific Ayan Kumar Halder
2024-08-14 12:59 ` Michal Orzel
2024-08-13 17:13 ` [PATCH v3 4/4] xen: arm: Enclose access to EL2 MMU specific registers under CONFIG_MMU Ayan Kumar Halder
2024-08-14 13:07 ` Michal Orzel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e7882491-e916-43c6-ac61-12da83e9c086@amd.com \
--to=ayankuma@amd.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=ayan.kumar.halder@amd.com \
--cc=bertrand.marquis@arm.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=penny.zheng@arm.com \
--cc=sstabellini@kernel.org \
--cc=wei.chen@arm.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.