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

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <luca.fancellu@xxxxxxx>
  • Date: Wed, 10 Nov 2021 14:02:28 +0000
  • 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=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=toxIxcKXn8WUm0gB/eJFIEBN9ACaVaDEcTMLhUrMhz0=; b=aFtEYiEFuWktnKzqi2HVPKiLGcfGih4QEOYkLlBTHq2qb7/PPGkV7rzblh5wyFwZfG6oSTwcq0BUi1CRlhyYbMSbXA7g1yLyGrAUncDidfGnTFZ3REmnagexIn8vKAnPgAzaDLEf22SBuiBpuKSM3qGgBSPXNoNuwWtKHBb4rZH1BvrIDKVG8TnGcsmj9gUuZ0vbgxjEe2n1mPds9xxpqgdBFkr3bl/Ansm87adkUKH6LymkOIaRskT4IVh1JnN73lCrA4pjdL70A/sP2VTv0/kdc93CV8RU0Bt3IgG/ZcO8kSA2QoyXBpydYn1CG2rojmCZ/EfOrovG7zY2UQ6Fpg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J88rDXfg+Ub3LOwgb9DVFr9q2OUwBR+VwXpDcB5e5kAjfhdkivHPZ8WmRb2bAzpwXQ7w4VBFboQBMxn2xCtycKSSa72cC1fWTURtlOqg0Ply0KBNeT/+7zzem53+ocdWMAjVVz2t+N7odUP1Q+qp+y8xg1phMaaZdmITolP8FY5pjnUbtoI9q0ns3KHxGQP06iQ4FTsgzTmHM4XZ6fSK7L7YXF3SZQmubmRNmz8iCO03t+sdtHCmHSIGqxwAjOqCm/gige4KD2orobr/n7pTMDM8nVdJPCbCPALAI38EbbQKJr7EJSjSu4RAvuJAudiNnPZZC4KZmt0vvV+/fNiIWQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, wei.chen@xxxxxxx, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 10 Nov 2021 14:03:29 +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;


> On 10 Nov 2021, at 13:36, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Luca,
> 
> On 10/11/2021 13:05, Luca Fancellu wrote:
>> I thought having the EFI_FILE_HANDLE global in efi-boot.h was a “no go”, but 
>> if it’s not then instead of
>> calling get_parent_handle in efi_check_dt_boot (that is the main issue with 
>> EDK2+Grub2), we can do
>> something like this:
> 

Hi Julien,

> fs_dir_handle is only used by callees of efi_check_boot_dt_boot(). So the 
> global variable is not an option for me because the risk is not worth it (it 
> is easy to misuse a global variable).
> 
> Instead, I think fs_dir_handle should be an argument of 
> allocate_module_file() and propagated up to the first call in 
> efi_check_dt_boot().
> 

Yes you are right, changing the interface of handle_dom0less_domain_node, 
handle_module_node, allocate_module_file to host also an argument 
EFI_FILE_HANDLE *dir_handle
avoids the use of the global, then the handle is requested in 
allocate_module_file only once and closed in efi_check_dt_boot only if it’s not 
null.

Cheers,
Luca

> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

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