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

Re: [PATCH 0/6] xsm: refactoring xsm hooks


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 18 Jun 2021 22:21:19 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=NTA8X8eMw2UWAV74CePqAm/QBBr6ZrD0qMZ6isEI8F4=; b=NdlVAtwCgvix6oavZdc3j+d/Iwd7GmZJg6z77HMASzodBjPioiNgrjWMHbshTy5qiqi86pxgB9VEbvK7MkeTwQUYu9gq357y236Ih5a+X4aCyWq1kfr2Sdh8ZIyclj6d06eNtISZ6rF4wZFUsTF4i3Hg7wf0E4p/YhqqcsLYJHi2Fcqk0wrBXPpw4jtvaZ5QZBuWwVDDejj9axwHA5XBrB3X56ZLZCD7hpcPvYS9gP2WsYL6NlOMY3OOoUc0y2szaVLKeMV/2ktl9fBmgfXjBOpCcneK9mH4RTN8qSFLZtS9kpefUZeoFjRBtw/qKRtw6epROWRPBXXMuNCSxOYssw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QLxtDKyc0D/Yj8s7uwhzyaNDutC9YTTdLYZTQxDazrE3rNVB8XEzCqaPMZ7N04MmtDwH4ZlE792tsLIb1jZFcs5fGaDOljdszjSZRnRawoUlPWhFhHNQ57vz/SzgJi8b3uW4HKLMyHXnhut38JSuau7LjbMTXCe6Sz3CVlufTi1K1Ogj8Uc6pJcIiH4bkIQNbXjNvfCw6RWhY04pSqIWNZN9q+6/rrbIPI0Oked2Pd11yR3WidO+s/k4eInEAzUXoPreSUA8GjmHOzbHFfTE9f2CVfu2KfEAy0bX3dUeC6p8MJAzFYrNu5AQmtm2b9WHsIjd0LRts95eAyp5mm2lxQ==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, <persaur@xxxxxxxxx>, <christopher.w.clark@xxxxxxxxx>, <adam.schwalm@xxxxxxxxxx>, <scott.davis@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 18 Jun 2021 21:21:38 +0000
  • Ironport-hdrordr: A9a23:1dGfjqyJkq6vRuVJGRRoKrPxteskLtp133Aq2lEZdPULSKOlfp GV8MjziyWYtN9wYhAdcdDpAtjlfZquz+8L3WB3B8bfYOCGghrUEGgG1+XfKlLbalXDH4JmpM Fdmu1FeafN5DtB/LXHCWuDYq8dKbC8mcjC74eurAYZcegpUdAG0+4QMHfqLqQcfnglOXNWLu v42iMKnUvaRZxBBf7Ld0XtEtKz6eEi0/ndEFc7Li9izDPLoSKj6bb8HRTd9hACUwlXybNn1W TeiQT26oiqrvn+k3bnpi/uxqUTvOGk5spIBcSKhMRQAjLwijywbIAkf7GZpjg6rMym9V5vut jRpBULOdh19hrqDyCIiCqo/zOl/Ccl6nfkx1Pdq2Dku9bFSDUzDNcErZ5FczPCgnBQ+e1U4e Zu5Sa0ppBXBRTPkGDW/N7TTSxnkUKyvD4LjfMTtXpCSoETAYUh77D3xHklV6voIRiKrrzOSI JVfZjhDbdtABCnhknizy1SKIfGZAVqIv/uKXJyyPB80FBt7T1EJgUjtZcidtppzuN0d3B+3Z WyDk1frsAFciYnV9MIOA4/e7rANoXse2OBDIvAGyWpKEk4U0i94KIft49Fmt1CPqZ4lqcPpA ==
  • Ironport-sdr: J12I5d3PmPlDZmswEW4cKV5kkwYAbsQGT33WTo15HzQzNWgX98HfS7rMh9ev7etvVWMJpgooml 7XuoKwaBE8gwjyO3YzdOyZkCvZaJGNoO81T3u+A7J0QJcSDoAGMCYPRLUo5sX4WYMnq4oY1qm3 rGsA+qKG4Oq1f0+U4po/FFHv3K7WsPkVVEtUFa0Ry8qUMJSVscnsYQCVZ4tKU9WmS4WBNnIy5h KuwYtQVSQPiiZcC/08EaLRMYVoUv3iY89p+5uN4WgIH8j2vTcQ+Z++rg1EhEFJOssTpmh/yiQu blw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18/06/2021 12:48, Jan Beulich wrote:
> On 18.06.2021 12:14, Andrew Cooper wrote:
>> On 18/06/2021 00:39, Daniel P. Smith wrote:
>>> Based on feedback from 2021 Xen Developers Summit the xsm-roles RFC
>>> patch set is being split into two separate patch sets. This is the first
>>> patch set and is focused purely on the clean up and refactoring of the
>>> XSM hooks.
>>>
>>> This patch set refactors the xsm_ops wrapper hooks to use the 
>>> alternative_call
>>> infrastructure. Then proceeds to move and realign the headers to remove the
>>> psuedo is/is not enable implementation. The remainder of the changes are 
>>> clean up
>>> and removing no longer necessary abstractions.
>>>
>>> <snip>
>>>  51 files changed, 1309 insertions(+), 1413 deletions(-)
>> The diffstat is great, but sadly CI says no. 
>> https://gitlab.com/xen-project/patchew/xen/-/pipelines/323044913
>>
>> The problem is that ARM doesn't have alternative_vcall().  Given how
>> much of an improvement this ought to be for hypercalls, I don't want to
>> lose the vcalls.
>>
>> One option is to implement vcall() support on ARM, but that will leave
>> new architectures (RISC-V on the way) with a heavy lift to get XSM to
>> compile.
>>
>> Instead, what we want to do is make vcall() a common interface, falling
>> back to a plain function pointer call for architectures which don't
>> implement the optimisation.  So something like:
>>
>> 1) Introduce CONFIG_HAS_VCALL, which is selected by X86 only right now
>> 2) Introduce xen/vcall.h which uses CONFIG_HAS_VCALL to either include
>> asm/vcall.h or provide the fallback implementation
> A word on the suggested names: The 'v' in alternative_vcall() stands for
> "returning void", as opposed to alternative_call(). It's unclear to me
> what you see it stand for in the names you propose.

Urgh - yet another reason to prefer the Linux static_call() infrastructure.

Would a general alt_call name be acceptable?

~Andrew



 


Rackspace

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