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

Re: [PATCH v2 00/15] xen: drop hypercall function tables


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 8 Nov 2021 09:36:59 +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=n4Xis5gh//tZd1OL25Ne0yN/fy0rOcDVpGLF3Fzq7A8=; b=EYKvuXtwupolFWrqYZNXWDONpnouk9sOFEXZRoa04InQaA0oZl3miiU6D7WUol0CFW7/DGuJJl7co4z7gfMT3qPl0l4BYo7cIf175e1F+MYzatk+SNejgU+kBflq80C5KKD6Ij6ywNjM4+0U/IUvLLL2wzIzE9PzcUJYKlqkh+Kt6hQ1LdmFNhjZIHsEqLQk4TXU3/qZRwYZcAB9z/rvlc1OxCn1J0j3HUGjnOc2PaQvBhGR9HkeFecl9GQ4koA9rh0J9rUgGQwuaGhEayGdn6u6vcg2EY+QJjVh1d2DZTTlgeweWcebBeZd/WjuoZJG4FcjF6wLJiK/VdnOraL6Tw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ToWgMnaZk+dVKaVgAyQEqsGJhB+K39cXRJb8FPb9AsDuLeJ6zM+rin22UCvCEi2oxKXdmn9EVmE9lJPzrLo+wBWA2MiaCnjXBG33iz5Sjm2kMb/l3OEm4rCSDkqprkAW2O4UC2v6hm/M+V5RSEaSGKgrwvy3HWl5v2AJ9te3HMNLx5aQRPHgzrAzr5DxGq7jhODOfwIthl+BR2Otx8akJziKXyIeo2uqV3vhswOqfIFKyS9fLgGdDuDTBRUP0q+ncf2vYDnWEJAWTlEodSuiBezR9DokguXkWdcYhyJeOdn2QN5WnXYTlUypDIj54KbyDLwbhXWRLCL1Jk6GUv45Sw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Christopher Clark <christopher.w.clark@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 08 Nov 2021 08:37:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05.11.2021 15:18, Andrew Cooper wrote:
> On 01/11/2021 15:20, Juergen Gross wrote:
>> In order to avoid indirect function calls on the hypercall path as
>> much as possible this series is removing the hypercall function tables
>> and is replacing the hypercall handler calls via the function array
>> by automatically generated call macros.
>>
>> Another by-product of generating the call macros is the automatic
>> generating of the hypercall handler prototypes from the same data base
>> which is used to generate the macros.
>>
>> This has the additional advantage of using type safe calls of the
>> handlers and to ensure related handler (e.g. PV and HVM ones) share
>> the same prototypes.
>>
>> A very brief performance test (parallel build of the Xen hypervisor
>> in a 6 vcpu guest) showed a very slim improvement (less than 1%) of
>> the performance with the patches applied. The test was performed using
>> a PV and a PVH guest.
>>
>> Changes in V2:
>> - new patches 6, 14, 15
>> - patch 7: support hypercall priorities for faster code
>> - comments addressed
>>
>> Juergen Gross (15):
>>   xen: limit number of hypercall parameters to 5
>>   xen: move do_vcpu_op() to arch specific code
>>   xen: harmonize return types of hypercall handlers
>>   xen/x86: modify hvm_memory_op() prototype
>>   xen: don't include asm/hypercall.h from C sources
>>   add .gitignore entries for *.[is] below xen
>>   xen: generate hypercall interface related code
>>   xen: use generated prototypes for hypercall handlers
>>   x86/pv-shim: don't modify hypercall table
>>   xen/x86: don't use hypercall table for calling compat hypercalls
>>   xen/x86: call hypercall handlers via generated macro
>>   xen/arm: call hypercall handlers via generated macro
>>   xen/x86: add hypercall performance counters for hvm, correct pv
>>   xen: drop calls_to_multicall performance counter
>>   tools/xenperf: update hypercall names
> 
> https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/1752237172
> 
> Something here causes
> 
> hypercall.c: In function 'hvm_hypercall':
> hypercall.c:174:23: error: unused variable 'r8' [-Werror=unused-variable]
>   174 |         unsigned long r8 = regs->r8;
>       |                       ^~
> hypercall.c:190:22: error: unused variable 'edi' [-Werror=unused-variable]
>   190 |         unsigned int edi = regs->edi;
>       |                      ^~~
> cc1: all warnings being treated as errors
> 
> I suspect it will be "call hypercall handlers via generated macro", but
> I haven't investigated further.

I suspect that's a randconfig build with !HYPFS + !ARGO. The hypfs and
argo hypercalls are the only ones with 5 parameters that HVM wires up.
A similar issue ought to exist in PV hypercall handling though, as the
compat form of update_va_mapping_otherdomain is the only other one
taking 5 arguments.

As to possible solutions - besides maybe adding (void)r8 to the -ENOSYS
path, I was wondering anyway in how far the local variables are still
warranted to retain.

Jan




 


Rackspace

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