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

Re: [PATCH 06/12] xen: generate hypercall interface related code


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 18 Oct 2021 17:39:54 +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=zUPUgUGRp82d2oHDYxtXqy24gz5P2252wrJjPKdhjwo=; b=kjcj9iJsI56tH18KHS2n5+sGF5eTUNgqAAthQ0nLQAaiJ6QM2dZsK29GTpRqy251PN5AcqQtkbosYf3BkzkZEBUE1MS9xFKh6Wzx1CPyzur9VV2125AVxpGFls6uwR075YuUIwDEx9+qjAlc9CBeUHOgASZ69+AynZ/nkzOFnJMd5pbtcNB+LpDFWUCoK9mSv33obOX6blIglygPKmlK53PWJdTfDQJ0+R1nKT8T3jN4P8OjCtUj5TDXriY4vXLK6F92/JnaR60YZvOTvWlm3INtq1GCMqXd7Z6vmZezcNqLVTsS4bEkxLIVbLCHCxn0JSxJ/jnW1erI7PLfYLnrAw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ib8hlUX8KXdi0BkzIIkHZ4z7yeqlyDWsULTVb5GrXyvGsJKWXFJKd2uqJimjK/DSvWWFhi2Uo4PpnQGrBNWp2rUNWlw2B5MRv+mur98EOFFvNb8NMVi4+XW/kyu6sT/B7+2Cl6sQR6DlFd27x9mM2hBOZyEetwKgX++ikMEHI/5WNBvMoohizm1JczCI5JlczVe6t/mbIjdG5iw/FlskyCLXRA6h0YT1LqUwASCxGRczYQRh7BhJtq9pj872IvvK8cW/b+dsz9gMziEiquPyecKgID/WuNe/lIB0o59BguSeKt3XuuGSPof7Xh98nmg5wKJnxBT2MDS8GJspPy0IJg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 18 Oct 2021 15:40:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.10.2021 17:28, Juergen Gross wrote:
> On 18.10.21 14:58, Jan Beulich wrote:
>> On 15.10.2021 14:51, Juergen Gross wrote:
>>> Instead of repeating similar data multiple times use a single source
>>> file and a generator script for producing prototypes and call sequences
>>> of the hypercalls.
>>>
>>> As the script already knows the number of parameters used add generating
>>> a macro for populating an array with the number of parameters per
>>> hypercall.
>>
>> Isn't that array intended to go away?
> 
> I thought so, yes, but on Arm there is a case where it is needed.
> 
> So generating it from the available data is the sensible thing to do
> IMO.

Absolutely, if such a table continues to be needed.

>>> @@ -466,6 +468,14 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: asm-offsets.s
>>>       echo ""; \
>>>       echo "#endif") <$< >$@
>>>   
>>> +quiet_cmd_genhyp = GEN     $@
>>> +define cmd_genhyp
>>> +    awk -f scripts/gen_hypercall.awk <$< >$@
>>> +endef
>>> +
>>> +include/xen/hypercall-defs.h: include/hypercall-defs.i 
>>> scripts/gen_hypercall.awk FORCE
>>> +   $(call if_changed,genhyp)
>>
>> As per patch 5 there are quite a few sources including xen/hypercall.h
>> and hence (in one of the next patches) the header generated here. If
>> this one gets re-generated for a benign reason (i.e. without changing
>> the header), all dependents will get rebuilt for no reason. Use
>> $(move-if-changed ...)?
> 
> The reasons for re-generating are quite limited. The most probable case
> is a .config change, which will trigger quite some rebuild anyway.

Oh, good point - I should also have considered the dependencies here,
which are pretty limited. Please disregard my remark then.

Jan




 


Rackspace

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