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

Re: [Multiple reverts] [RFC PATCH] build: include/compat: figure out which other compat headers are needed


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 12 Jan 2023 08:46:23 +0100
  • 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=OxTiy6rSNDxEOG8bK3nQOB5HR719EEuYnrmIBeGlZNE=; b=OWlC+wemmu7ahqBg8/h/gF96wOk4vPuGoDfZ9zJVsBkiMfOp/dOsyrfdRxrNxZoVLipWlcCkwB31dDeHI5GIbb9MpI3wnV6zk50zZzsLD/gq/JaT4T7sX6pZ1Jo1MU2MvBPJNfDeVYsSXh3Wdy+Ib6qM2BeHK0BPjKs3l+IaUy/LdSEbHphgX2RD34Wx+elbFeBDD5c75JxiN2irlApahvwiCQ507mK3Xk8Q8lpqT/qfoUJMnAY/91kbX2Jn+g40w0a3bOHaT6oilIAIcRx+LcrNDbUhxyD4k+evjHB5vN3j3xDBNSZShse/vmOMtWABu+wU7OfueK+SSELaZQDgHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j4H4N8WRQ2tEzPALPcFJFmT1prtTp02cRF0chXsVul01B4sOMBPy8KD6DfdiCp+UrbQw/Viw2JZ/cVZqYwGoRwu4Sxequ/uA4P4Xh/qhZy09v+sqWkFb6GFlHJWG9hfUwgRakVmZvJLCzfFglsGntvlagjUXrrbb6FIsjYgNcRfbs3EBgcoasb8xK6ihA3IL0ATscI1QKAMcINv0+ylQhWlKKk6tryD4ts56qDIgx0VSRN74atPcVcWJk2DExddH8asC1KFqkNTRrXZkX9JRv6/s5vvF/HLQlHHONWaiGbTFWmlz0X08mQ85r7ysrbjN58Zu4DxkVzAnZukI2mLwTQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Jan 2023 07:46:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.01.2023 23:29, Andrew Cooper wrote:
> For posterity,
> https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/3585379553 is
> the issue in question.
> 
> In file included from arch/x86/hvm/hvm.c:82:
> ./include/compat/hvm/hvm_op.h:6:10: fatal error: ../trace.h: No such
> file or directory
>     6 | #include "../trace.h"
>       |          ^~~~~~~~~~~~
> compilation terminated.
> make[4]: *** [Rules.mk:246: arch/x86/hvm/hvm.o] Error 1
> make[3]: *** [Rules.mk:320: arch/x86/hvm] Error 2
> make[3]: *** Waiting for unfinished jobs....
> 
> 
> All public headers use "../" relative includes for traversing the
> public/ hierarchy.  This cannot feasibly change given our "copy this
> into your project" stance, but it means the compat headers have the same
> structure under compat/.
> 
> This include is supposed to be including compat/trace.h but it was
> actually picking up x86's asm/trace.h, hence the build failure now that
> I've deleted the file.
> 
> This demonstrates that trying to be clever with -iquote is a mistake. 
> Nothing good can possibly come of having the <> and "" include paths
> being different.  Therefore we must revert all uses of -iquote.

I'm afraid I can't see the connection between use of -iquote and the bug
here.

> But, that isn't the only bug.
> 
> The real hvm_op.h legitimately includes the real trace.h, therefore the
> compat hvm_op.h legitimately includes the compat trace.h too.  But
> generation of compat trace.h was made asymmetric because of 2c8fabb223.
> 
> In hindsight, that's a public ABI breakage.  The current configuration
> of this build of the hypervisor has no legitimate bearing on the headers
> needing to be installed to /usr/include/xen.
> 
> Or put another way, it is a breakage to require Xen to have
> CONFIG_COMPAT+CONFIG_TRACEBUFFER enabled in the build simply to get the
> public API headers generated properly.

There are no public API headers which are generated. The compat headers
are generate solely for Xen's internal purposes (and hence there's also
no public ABI breakage). Since generation is slow, avoiding to generate
ones not needed during the build is helpful.

Jan



 


Rackspace

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