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

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 18 Aug 2022 13:24:26 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org 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=armh.onmicrosoft.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=arcselector9901; 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=bEsdoTEncAOGFBz4FcYUSTCExsceFCuBX+FI2byXY6M=; b=OtMEkjAafA5KOPtXHciNHyZ6enhirctW1veyfey7wpc6EPtNVP9MRpGsuNt9HGAAO+2Gi1XlyW1T07k0pJaT+O+yI0jRZElqk1WPC9Dm8pNNl83kvUh9RHM+HpWbVo7Ms/hynQEgahRXAEnfbWESpG0PpxdcgwbY9T6WsKepocgZj3LoLeiK7BO/V+r7EOgnbNaE2KtZRVmmIB8UgMGqkL9J+eKKZEZpXN6Y8x1b6WAy03JwxGttcwx/1txCx9sDGfyiVaMpfrt9SnMCYH80XcByLw83fukeZZnSTJ5linXp60R+Mrxi+290kbY0lfH8BdSu2Ex86kQ0DR3fxi8c5w==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=bEsdoTEncAOGFBz4FcYUSTCExsceFCuBX+FI2byXY6M=; b=LP4hannC/HZkZow8UJQu/dP4fF6POhf/wQRPraOiB0VtDmHSCs+7XmowRhcyF9RFdO2dPIHv9UhxZYoKjOV+wu/I88uMRP2K6winACV7i/sLvbBQsvYt5Wsle9jARzktuQXI9DvyPlVQvrP1dcyjWF7oj+SfTR6Qjr2S01sjg0YdgnRNIuLcGjRB4QG7M/l02qFnLnuN0uNafqRIMfhPtRcFbRucUHpQPRwqDdsd52hSE8z3Wdy5xSEtSHV8MM5PteXmVJIN7/QX9sd8Gdga2C002DpmOi42Jh4DmsOHMU/9orsqJnlJVcg3bb1FjWo6hI7PU9mvrlB6zprjZbczgA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=l1bzqxIN7c0HiAR05ijTChSOawEG678i0gfEEDcnjDayqya4eemxqcJs33mWqnhw6S887MfBffZLjOYl+oSmkh2HbU+ysnYuA+6Fp887V6Eh4Ts5scYlproriUk4ksCXQ7AnrYmVJ0t5ushlGWrhle5lSHqWlEwH6VQqrq2pvaQ+Z7gQOURg1GJt+NWtzIV2mUmsIKfykgn4gYo2s0LmguOGSZm2WLh6li8H3eNC37AdvsB1VR2jG1ix6IpFtLoAqAMGS9knnZg0a3nG4bBMWWjIQIvao1asXD3TQ4quyBMOnqmqvMdEt0bln5a2r//87BWAzkTjGvqK8j/XVLAFrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ktjBAqKpKG1GNvU0D7I/yY5Kt69jcbctYGm9MIRZP4pZ5UMpPMgRwA90gHYuypOX/tPAFD76pFMzZey2hBACGOVFFf7atP4ILJj0TTrKHWCqZJ378mwryNZboxa9B/O9TBob+sCaRHQc4uyF2qhIAsH2E6iT5RgjYsZU/p8WXfzUk8uUe/XlAFdAwDtx6z4nj2V4bc9oLLi9J9ZgV/wyIkfMMSyVkhinx7YrNrP9CgZpDHWwQamhBI2GceTXNEoU0gxYwUcWo7/0q+L2c7AzWV4M+VgFUzMbWQ+ROUjA0ugGvdUchORweYkTuf7e9gQBZ8Cl+8k6JK0zw2rirnVojQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "leo.yan@xxxxxxxxxx" <leo.yan@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Peter Griffin <peter.griffin@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Thu, 18 Aug 2022 13:24:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYsigvymQYV/In6UeZ0JR6afFs5q2zEzOAgAEyTYCAAAZ4AIAAW2OA
  • Thread-topic: [PATCH] xen/arm: acpi: Support memory reserve configuration table

Hi Julien,

> On 18 Aug 2022, at 08:57, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Leo,
> 
> On 18/08/2022 08:34, Leo Yan wrote:
>> On Wed, Aug 17, 2022 at 03:17:53PM +0200, Jan Beulich wrote:
>>> Furthermore - what if Linux decided to change their structure? Or
>>> is there a guarantee that they won't? Generally such structures
>>> belong in the public interface, guaranteeing forward compatibility
>>> even if Linux decided to change / extend theirs (at which point
>>> consuming code there would need to do translation, but maybe using
>>> a Xen-defined struct [plus translation in Linux] right away would
>>> be best).
>> I saw Ard has helped to answer this question in his email.  As Ard
>> said, the general way is to rely on Linux EFI stub to allocate the
>> data structure for MEMRESERVE configuration table.
>> Given Xen uses pseudo EFI booting (the ACPI table is passed via DT), in
>> short term I don't think Xen can support Linux EFI stub,
> 
> I agree that using Linux EFI stub will require more effort. I would also need 
> to go through the mailing list archives (or maybe Stefano remember?) to 
> understand why we decided against using the EFI stub.

I think the problem was that EFI also includes some functions and to have a 
proper EFI stub we would need to support those (console, mapping, disk access).
Maybe this is something we could discuss but that would require to have some 
kind of binary providing those services that we put in EL1 or at least a stub 
calling Xen for those functions.
One other solution of course is to run uboot and boot linux from this.

> 
>> so we need to
>> maintain this structure in Xen as well.
> 
> I have looked at the commit message. IIUC, if this table is not created then 
> Kexec will not work. Is there anything else that would not work?
> 
> IOW, would Linux be unusable if we don't create MEMRESERVE?

No it works perfectly fine.
There are some warnings and as pointed out later kexec is not useable (but is 
not supported anyway).

> 
>> This structure eventually will not change frequently, so I assume
>> later we will have little effort for maintainence it
> The problem is not really "maintainance" here. It is more that if Linux is 
> updating the structure in a non-backward compatible way, then new
> version of Linux would not boot on older Xen.
> 
> We would have similar probable with new Xen booting older Xen because the 
> hypervisor doesn't know (and should not need to know) which OS is used.
> 
> In the nutshells, Xen should only use stable interface. If MEMRESERVE is 
> really necessary then we should either switch to the Linux EFI stub or 
> standardize MEMRESERVE.

As we do support kexec on arm right now I think the current status should be 
kept.
Those questions would need answering if we support kexec one day.

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

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