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

Re: [XEN PATCH v3] build: Fix x86 out-of-tree build without EFI


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 19 Sep 2022 13:02:52 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=02xU9hjYOfhnYP2ePWIEqxRClQxXIq7p6wgidrJu+3E=; b=FkF40NtYajTViYWvxkZwwRTBORAvxyaS2HfMwQBkGanASDqWyUB5R+YnJkIpLMIouw1Yxhs4JBFvorcxCOrT0Mm4OnD9aFBNtOg9YMETzt7ZkiS7VXcnW3oDsd6shGXH4AHczsjplgrg3HNlT7azBQZgnzJ51KPR471nea5ydVNIDOopUK9UVtdTucMbaFUhI+Xkof7HagCtdATRnXLMDkUet/5UOYjlL6vN901KqjyON+ME9wsZyJt9obyTRyE0kzs4mV72PZlP9S+eCn0g/Wr16tEtTPPFc75II75SpbTSOt9CKgJbL30ycZU5Hpn9G9cEtemu58xUKqtM5YnH8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EdwH/z2VCdt0FL1XFObizg86TlNKwzLQ1wmH76LPf/OxTC5vN7YQA+VwzKA0UUR37dCYkKh2Hj9yvmnEYZ09gdLqLCdmaSK2B1AQvGpoa2z0gMy0O3S9GxA1USSz5nCanLYgYOg3IXqlDVXxQn9cD00PIEVTfunH2AVw+Xbx9G1DT7ju6EZADYP0nu2k3MKWkYkXrNoj6yKboIVCJtjtmnxqNQDIYJje2nTbG+Bg1It++Ha/j85qG89/Yig6RAaxtLqwDpBevLf/aB+d5nE/c+vgjVahHV2LUAKudmHLBPGps2NcVkuoPaBq6/LEikiiUQmMYT0GkMkD3gZbzuKW/g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Chen <wei.chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 19 Sep 2022 11:03:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.09.2022 12:28, Anthony PERARD wrote:
> We can't have a source file with the same name that exist in both the
> common code and in the arch specific code for efi/. This can lead to
> confusion in make and it can pick up the wrong source file. This issue
> lead to a failure to build a pv-shim for x86 out-of-tree, as this is
> one example of an x86 build using the efi/stub.c.
> 
> The issue is that in out-of-tree, make might find x86/efi/stub.c via
> VPATH, but as the target needs to be rebuilt due to FORCE, make
> actually avoid changing the source tree and rebuilt the target with
> VPATH ignored, so $@ lead to the build tree where "stub.c" doesn't
> exist yet so a link is made to "common/stub.c".
> 
> Rework the new common/stub.c file to have a different name than the
> already existing one, by renaming the existing one. We can hide the
> compat aliases that x86 uses behind CONFIG_COMPAT so a Arm build will
> not have them.
> 
> Also revert the change to the rule that creates symbolic links it's
> better to just recreate the link in cases where an existing file exist
> or the link goes to the wrong file.
> 
> Avoid using $(EFIOBJ-y) as an alias for $(clean-files), add
> "stub.c" directly to $(clean-files).
> 
> Also update .gitignore as this was also missing from the original
> patch.
> 
> Fixes: 7f96859b0d00 ("xen: reuse x86 EFI stub functions for Arm")
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with a remark and one more adjustment:

> ---
> 
> Notes:
>     v3:
>     - back to using common-stub.c

As said in person, I'm a little puzzled by this, as the v2 discussion
had no hint in that direction.

> --- a/.gitignore
> +++ b/.gitignore
> @@ -280,6 +280,7 @@ xen/arch/*/efi/ebmalloc.c
>  xen/arch/*/efi/efi.h
>  xen/arch/*/efi/pe.c
>  xen/arch/*/efi/runtime.c
> +xen/arch/*/efi/common-stub.c
>  xen/arch/*/include/asm/asm-offsets.h
>  xen/common/config_data.S
>  xen/common/config.gz

The new line wants inserting a few lines further up, to retain sorting.
Can perhaps be done while committing.

Jan



 


Rackspace

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