[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v6 03/11] xen/arm: disable EFI boot services for MPU systems
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Wei Chen <Wei.Chen@xxxxxxx>
- Date: Tue, 8 Nov 2022 03:02:59 +0000
- Accept-language: 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=STeUKApHJS6WR6W/DZRdXQ90R5pmFtOSHxb0g5mnbDA=; b=Iq70/eqtcc/kMtuTldkUH/59cJSY/RMvSA/xglPhQi0G3D8XKEDMvUiw3ORFTt5VakEuv46oAVWk5qvjTokcEqzBHysZKQ/UpKB3tP8+Oxr1xbI0jaDTG2M7UKVaiVnB55Gxs7kVNXOHrfZDm9oY49A+Z6eMgj4HF7cspTjR/DLpflw4nhDKrkh009cW+CFh63BpgJuH91rSq/lYtusvlFYh8K4egr95TXKothOdvT16TJ25ckL1Mi0ZS89O7FETMsUeyFVWJko3ttXjAHZaRJYaWUhg1ccsj1NgARfGO/PpD249AYGV1bK3Ja3zeTJtGfZ1w3BRiTKQI/jMCdfDMQ==
- 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=STeUKApHJS6WR6W/DZRdXQ90R5pmFtOSHxb0g5mnbDA=; b=LcQ9QkBP2/LXhq7RT/t0AqihrmimNuB9XY8rUGgconyxRhB7fiMY5vHjWDAki8+eeVtIq0aPNSbgi6P+tsdEqQeqe2jOCKDi6hosnjTeoUfAu9PlA6ann36kbfHWtnoj0yp3gEyBBjpO2EHCKii1PJcWm9e6XVPC59jH2g1BLRCS2LBjKdJ/T6QX0lthMtFe10Mhm+kz0ncXJkZVu/1E2sAN1X1X5/tvlNTmipRzMa5t6e6IFSQdPBli75B9VOT6+Y7KBuKkzSiTlXJE//mwaaepc3CSwWZuUKTTd1PITOvAm7crZWmZYCjB+nn+Ax5SG8dR462vAOX5GpCiTv/RAw==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ZRnlx7fKLE+ISrKjV2v5gI7fuee0byriiohCpNoaPgJbh4kpRYlTnFcMvwAqX0jHgkojCtzOsEPLZ+51OgB6YyNQ7fUEINiTEtHbstGtDUffOS0e3fmm79zWzTCag6j0Zv89Qu+y1MdrhStOshs+TQvl4fnj8/8PzNvRN/QKpTP4J48K5bDHpYTkLsQGK8UxuQJ0EYo76C7QziMOPDrperpG8xjXSoqh5fR7+zGIxIhoFsNKHFQXf9pAI3C8Gixamjj4OWyuklOGGcANn9RTG2yzw6wyejpc4l8d51j/jtu9Ivm+UBGUGN6FImSbXVS0yRZPqgyJWGY+ojw75CZW5w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e9/uACBT/aCt8rZNXyQylrdIZ81ckOhKZmKL86scQFE3ewU2hMg6QtrIPfySX+HvreBhF125PXtYXRdyjiPWvUmF2DF5he92/OZnddzmZ+eUGn30LelazhzzeCri54POGHD0rjGTtf2HkYu+rvh3mwHFUAnrtjaKzrQf4vOqA+3bOVb0IeK0PfFa03RVmuHjDN30TJb//OTYjgDUER8ia0hRV47vufr7xKLsx7vvyTWJ3KKGhqj6TcTJ1sfX/NG/iNAYo+JrolRVBwTPd/5vja6GclAO4nEELvZCOgByHumNZJV9q38akWXh4fiJkGxqs/Z9D9cMxDFAC7ylVT7Kow==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: nd <nd@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 08 Nov 2022 03:03:19 +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: AQHY8DVhHYvazJgosk2Tv3EbzhgfNq4yRv2AgAIMODA=
- Thread-topic: [PATCH v6 03/11] xen/arm: disable EFI boot services for MPU systems
Hi Julien,
> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: 2022年11月7日 3:12
> To: Wei Chen <Wei.Chen@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: nd <nd@xxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; Bertrand
> Marquis <Bertrand.Marquis@xxxxxxx>; Volodymyr Babchuk
> <Volodymyr_Babchuk@xxxxxxxx>
> Subject: Re: [PATCH v6 03/11] xen/arm: disable EFI boot services for MPU
> systems
>
> Hi Wei,
>
> On 04/11/2022 10:07, Wei Chen wrote:
> > Current EFI boot services support of Arm64 could not
> > work well for Armv8-R64 system that only has MPU in
> > EL2. That is because EFI boot services may need some
> > relocation support or partial PIE/PIC support.
>
> I am a bit confused with argument. We have nothing in Xen today to deal
> with relocation/partial PIE/PIC support. So what is the exact problem?
> Is it because UEFI can load Xen anywwhere?
>
> > But these will not be supported in the initial stage of
> > porting Xen to MPU systems. So in this patch, we
> > disable EFI boot services support for Arm MPU systems.
> >
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> > xen/arch/arm/Kconfig | 2 +-
> > xen/arch/arm/arm64/head.S | 8 ++++++--
> > 2 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> > index 1fe5faf847..ad592367bd 100644
> > --- a/xen/arch/arm/Kconfig
> > +++ b/xen/arch/arm/Kconfig
> > @@ -7,7 +7,7 @@ config ARM_64
> > def_bool y
> > depends on !ARM_32
> > select 64BIT
> > - select ARM_EFI
> > + select ARM_EFI if !HAS_MPU
>
> I think it would make sense to allow ARM_EFI to be disabled even without
> the MPU support. So this would remove nearly 3K lines (just using wc -l
> *.c in the efi directories) for someone that don't need to boot using EFI.
>
Ok, how about address this comment in NUMA patch set#3 (Arm implementation),
because about making ARM_EFI invisible to users, we had some discussions
for NUMA RFC and V1.
> > select HAS_FAST_MULTIPLY
> >
> > config ARM
> > diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> > index ad014716db..ccedf20dc7 100644
> > --- a/xen/arch/arm/arm64/head.S
> > +++ b/xen/arch/arm/arm64/head.S
> > @@ -172,8 +172,10 @@ efi_head:
> > .byte 0x52
> > .byte 0x4d
> > .byte 0x64
> > - .long pe_header - efi_head /* Offset to the PE header.
> */
> > -
> > +#ifndef CONFIG_ARM_EFI
> > + .long 0 /* 0 means no PE header. */
> > +#else
> > + .long pe_header - efi_head /* Offset to the PE header. */
> > /*
> > * Add the PE/COFF header to the file. The address of this
> header
> > * is at offset 0x3c in the file, and is part of Linux "Image"
> > @@ -279,6 +281,8 @@ section_table:
> > .short 0 /* NumberOfLineNumbers (0 for
> executables) */
> > .long 0xe0500020 /* Characteristics (section flags) */
> > .align 5
> > +#endif /* CONFIG_ARM_EFI */
> > +
> > real_start:
> > /* BSS should be zeroed when booting without EFI */
> > mov x26, #0 /* x26 := skip_zero_bss */
>
> Shouldn't the function efi_xen_start be stubbed as well?
>
Reply for your next email:
Yes, this is a good point, efi_xen_start should be protected. I will fix it.
Cheers,
Wei Chen
> Cheers,
>
> --
> Julien Grall
|