xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Demi Marie Obenour <demiobenour@gmail.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Milan Djokic <milan_djokic@epam.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	alejandro.garciavallejo@amd.com
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH] xen/arm: XEN_DOMCTL_get_address_size hypercall support
Date: Mon, 6 Oct 2025 12:28:29 +0100	[thread overview]
Message-ID: <22b118f4-febc-4134-8049-ae258c7571a6@xen.org> (raw)
In-Reply-To: <b77c44c3-b348-423d-b197-c719db6ec386@gmail.com>

Hi Demi,

On 03/10/2025 17:03, Demi Marie Obenour wrote:
> On 10/3/25 06:14, Julien Grall wrote:
>> Hi Demi,
>>
>> On 02/10/2025 19:27, Demi Marie Obenour wrote:
>>> On 10/2/25 06:10, Andrew Cooper wrote:
>>>> On 01/10/2025 9:01 pm, Milan Djokic wrote:
>>>>> Signed-off-by: Milan Djokic <milan_djokic@epam.com>
>>>>>
>>>>> ---
>>>>> XEN_DOMCTL_get_address_size hypercall is not implemented for arm (only for x86)
>>>>> It would be useful to have this hypercall supported for arm64, in order to get
>>>>> current guest addressing mode and also to verify that XEN_DOMCTL_set_address_size
>>>>> performs switch to target addressing mode (instead of relying on its returned error code only).
>>>>
>>>> Please don't copy this misfeature of x86 PV guests into ARM.
>>>>
>>>> Letting domains be of variable bitness after domain create leads to a
>>>> whole lot of bugs, many security relevant.
>>>>
>>>> 32bit vs 64bit should be an input to domain_create(), not something that
>>>> is edited after the domain has been constructed.
>>>
>>> Does this mean that Xen guests cannot support multiarch?
>>
>> I can't speak for x86. But for Arm, the endianess of EL1 (OS) is fixed
>> when the vCPU is booting. You could in theory have a domain with a mix
>> of 64-bit and 32-bit vCPUs. But that's not supported by Xen (all vCPUs
>> should have the same bitness) and also I am not aware of any mainstream
>> OS able to deal with multiple bitness. Most likely, you will need to run
>> two OSes and create your custom OS.
>>
>> Also, I believe XEN_DOMCTL_get_address_size would not be suitable for
>> such setup.
> 
> I meant multiarch in userspace.  Running a 32-bit kernel makes no sense.

I think some people may disagree :). We are in process of adding support 
for 32-bit MPU in Xen.

> If that is something Arm OSs just don't support that's fine too.

HCR_EL2.RW is only forcing 64-bit in EL1 (kernel mode). It is still 
possible to run 32-bit applicate in userland as long as the process 
supports it.

Cheers,

-- 
Julien Grall



  reply	other threads:[~2025-10-06 11:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 20:01 [PATCH] xen/arm: XEN_DOMCTL_get_address_size hypercall support Milan Djokic
2025-10-02 10:10 ` Andrew Cooper
2025-10-02 11:10   ` Milan Djokic
2025-10-02 12:43     ` Julien Grall
2025-10-03  9:26       ` Milan Djokic
2025-10-02 18:27   ` Demi Marie Obenour
2025-10-03 10:00     ` Alejandro Vallejo
2025-10-03 10:14     ` Julien Grall
2025-10-03 16:03       ` Demi Marie Obenour
2025-10-06 11:28         ` Julien Grall [this message]
2025-10-03 10:05 ` Alejandro Vallejo

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=22b118f4-febc-4134-8049-ae258c7571a6@xen.org \
    --to=julien@xen.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=demiobenour@gmail.com \
    --cc=michal.orzel@amd.com \
    --cc=milan_djokic@epam.com \
    --cc=sstabellini@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).