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

Re: [PATCH v3 2/3] arm/mpu: Introduce `v8r_el1_msa` device tree property for domains


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 9 Apr 2026 07:50:41 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=citrix.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UuW+HS+xOH0ClkWDUm7JfLOYmsWBrFu7Gz03zcthstY=; b=jGvdpsnupClK9QiVag/Y+yML3VkHP7lLr04REHWi3jEJrTAo+obvcz+720C/F4WT95f1aaRfnQd2IZUL0NFNu45i1XAI2FtJbS0ESceCKMl4MrGpIl+VrCCLk1c+mNXuLwZiUVieTezmWicHMjGLLtA0n07yhxcnkz2vn4O823gPokH0Raczyw++SMjHwuh6IU/OibweI4dERK0ChFQZEaDzCmUHck0ZSSDRGpszT4Y78Djx/D+k0QsviXfYEo++gDRYRpUO8sjPjNUCK6j4TIS8L/2e9Akwo9AFiZniGHvrRyYAISU1yXTPYm2Na5yi1jkKvCFTb1TIrZI/7mJbzQ==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UuW+HS+xOH0ClkWDUm7JfLOYmsWBrFu7Gz03zcthstY=; b=dDsMVtT/M9fOzOu8nOvAk83QmmPi4vc3dPEia62QXZcdc3yrf7RXzFWPkpHvuh+tOrje/PQQ4uXLTaQbf4TcoaHnraNLtjdWriHkiYDvf+jHoH5O7slCc+4/CMMwTJq1MKPSD80Ia90W06HxnEGhF9MZ9K9/uvrIF6/0AitraVz0q7WnHXuMXuXDgiqvjQXQF4URu/IiNQN8dgeFoobLeVntnErZrgrUE7d3JEeUHsN5JZP0mZ5Qsz8ZODAcy0RIH9d06JIC2olR3hUDOSdn3QokY0mfg449jl2QdJcPUnyiwD09smkbk1macTK+ZNNInGrVFyBnDCZ/Gg+Tu5rDLg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=h72mnjlfxQVz7BSl7rcnYIgKDU4QlJeCuwNXUBv/2YSaaOn5l5fVpUPr+LhRDb3RFts3xjUL+Muu07uViFrxpw7HMQpW+Pi8BKs7d+5gz1zD0/VNNBk4e5S3Bj/LCBX23fNvnisyZqbqpYs1DdwWuqqXZA6LoS6d2eciDCwxSUGnXoVnQHF6UspO1ctxQCNW6WdNddVI5FkglRtVBMBUo29v0TFMo4OFDV3OiZ4Oy+VfCNUP/5a/9PdQOpVn79215pwVLhKMYYLpvW7X6ZUiWV4ng8BltMWV6TNvfrDWJjxtKGBXZjdGPfCcgbqZAlYUzFk5haZVY5+pX1RX1ebqLg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H2S52KgddQyB/f7hMrYrIixpQptOD50dV485Xy0RQxO0StwBYl0OjuFPDqe60jEQLVACI6X0jzcLLMycdu0Qddk6jS1Qau1VDk2fAItcv6xAqU3X93a5Cq67niVqrarIcGAb0RUA7KpINP/HDaGItJmlMW9KuuDJclbK9Q4F7ryERztu5FGvBCG3BMsQGTE+hGCaWUgePojm2fNvoeeEk8Z0GKSL59LkyMn2pYjM9TdC3GoJE1xNEXhFC6T8MfjzTzGU7SvKfj6+bTU6+yH6exwVyfRYP1htiJxM74WQLW2WB2vXPhHqQo1dyyiJTJQ0JRLVx6PMthCkos4jdzQyeQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Harry Ramsey <Harry.Ramsey@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 09 Apr 2026 07:51:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHcx1925wGns5uRCkO+Bld4rDba9bXVTXKAgAEOy4A=
  • Thread-topic: [PATCH v3 2/3] arm/mpu: Introduce `v8r_el1_msa` device tree property for domains

Hi Andrew,

> On 8 Apr 2026, at 16:40, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> 
> On 08/04/2026 2:55 pm, Luca Fancellu wrote:
>> diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
>> index cd563cf70684..23df2f24cb09 100644
>> --- a/xen/include/public/arch-arm.h
>> +++ b/xen/include/public/arch-arm.h
>> @@ -355,6 +355,8 @@ struct xen_arch_domainconfig {
>>     uint32_t clock_frequency;
>>     /* IN */
>>     uint8_t arm_sci_type;
>> +    /* IN */
>> +    uint8_t v8r_el1_msa;
>> };
>> #endif /* __XEN__ || __XEN_TOOLS__ */
>> 
> 
> This isn't ok as the singular change to the public headers.  (Also, I
> haven't had time to fix the other API abuses that have crept into ARM's
> arch domain config)
> 
> You're introducing a new hypercall input parameter (which is fine), but
> has no defines (ones private to xen/arch/arm/include/asm/domain.h are
> not permitted for use in the public API), and for which there is no
> input validation.  Userspace can currently pass any arbitrary byte here
> which will be copied into d->arch.v8r_el1_msa, not that there's any
> consumer of this field I can see in the series.
> 
> Frankly, I think this series is chopped up too much.  You really must
> not be introducing new hypercall parameters like this without the whole
> series which lets you `xl create` such a VM.

Thanks for this feedback, while reworking this patch I was wrongly assuming I 
had always
zero from the toolstack as this is not supported atm, while instead it’s not 
true for malicious
userspace hypercall callers.

The full branch is available at 
https://gitlab.com/xen-project/people/lucafancellu/xen/-/commits/r82_rebased?ref_type=heads,
but it doesn’t support domain creation by the toolstack, only by Dom0less.

For the defines, should I have something in the file 
xen/xen/include/public/arch-arm.h like this:

#define XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_PMSA      0
#define XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_VMSA      1

And check the value of config->arch.v8r_el1_msa against them in 
arch_sanitise_domain_config?

Cheers,
Luca


 


Rackspace

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