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

Re: Ping: [PATCH v2] x86/time: switch platform timer hooks to altcall


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Thu, 24 Feb 2022 17:39:54 +0000
  • Accept-language: en-GB, en-US
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ho9uvsjSBrvHeOUTDVh9znup132sGvMrXoNo/3/hFJw=; b=TzbFthydbEX5QvzkPDrIAiUNKke42bT38nAgv4bbiwBbm/E6k4HTmF3rkmOvy+y9TloZN/hV1LRftFkoR0Rdm7nXyTKDbz0rpa7ec29W3rYlY/6wlr0sEHEv82Pp0lWqzVinxGxHHtvsCMS+CY1CUqHuy3ZrSFfF+uE1UIxLX+TExjSMYmK7py21Xo5MAIsIYGuyeLg1rtbEtHYw5WN+5H91vcrcev2AA8prQpQ+B4IyXPjHMc74E4OCbGjH1nCu3DxzQTnq9GXKoYKtIXC46n3EJw/LUNVsp1GRhkcD8esa4gafmsBfW2PbTST9S5iwdOi4TZiKJltRt95NbAA7Fg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mP+58IS9lKmMoz1Zq3I4JLjIdKgWZ6E81j8iW5nhWK8PgEe3gZ2GJHDPFMXKeJZ8R1CLD0WHW7THvsM5bu5iuLye26rcZe7S+Gq28ALj667MpZwmgzO7vu+cjLFejJsnPqTyU7fa6IlFKd6VvSTmTuxRMTNoAewxFsHTWhK5oU3pxlfmIg+Z6VyO94ZQgOGY9XwVc8OjJpi+wqRt5E/+fXVPMxnpDCp9Y7pXBYdb/7I1dXgigA+jf/Y1ZUs0Jp5oIPE0IM+tEC5YFPx5qjJMoG24sZ8+rqKCMp4HqWQxpmNIkt8YbIaIFd9YvUZlaMSXa8KHS78oC1/zPyCkp3I6eg==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 24 Feb 2022 17:40:09 +0000
  • Ironport-data: A9a23:38e7/a4P/89H1e4X1pU99AxRtCrHchMFZxGqfqrLsTDasY5as4F+v mIYUGqDb/mKMTTxKo9yPNmy/R5VsJLSzoM1SFZprHhnHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YLjX1vW0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurSXEgIQPJHyp9hHShdIQyU9L/Zt3LvYdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKs2vH16wC6fJvEhWZ3ZGI3B5MNC3Sd2jcdLdRrbT 5RFMmQ0NU2eC/FJEmwzAaM7ocuCvVnyLCRRt0PSvqcuwmeGmWSd15CyaYGIK7RmX/59gUKwt m/AuWPjDXkyJNGZjDaI7H+oruvOhj/gHpIfEqWi8fxni0HVwXYcYDUUX1ampfiyimalRslSb UcT/0ITQbMarRLxCIOnBlvh/SDC7kV0t8ds//M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far98Hv4IRY+yBnbWSRzBPWqOKRDsFb0BOXjKt5nriY9Frt2CadgN1t8/iZ 7BWFRXuSo7fF/vE9SH2NlR/hXEUAyGLELQIwFllu9EU5HHNcjW2He4OSMTeuOb0oAiPvE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYCH/zSGV6zWhCDUW+2oPSoHYB06yi0XUAgABomoA=
  • Thread-topic: Ping: [PATCH v2] x86/time: switch platform timer hooks to altcall

On 24/02/2022 11:25, Jan Beulich wrote:
> On 13.01.2022 14:17, Jan Beulich wrote:
>> Except in the "clocksource=tsc" case we can replace the indirect calls
>> involved in accessing the platform timers by direct ones, as they get
>> established once and never changed. To also cover the "tsc" case, invoke
>> what read_tsc() resolves to directly. In turn read_tsc() then becomes
>> unreachable and hence can move to .init.*.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> As this actually amends the IBT work, I would have hoped for it to be
> viewed as useful.

Sorry - it fell through the cracks.  Definitely useful.

>  Of course if accepted in general, it would now want
> to have __initconst_cf_clobber annotation addition included. Albeit
> there's a slight complication: Some of the structures are written to,
> so those couldn't really be "const".

The .init.cf_clobber section needs to container a pointer to every
target function.  For the current ops structures, we just put the whole
ops structure in.

For individual functions, the best plan I could come up with was a macro
which emits:

.pushsection .init.cf_clobber, a, @progbits
.quad fn
.popsection

wrapped up in #define cf_clobber(fn), so the end code result ought to
look like:

static void foo(param *bar)
{
    ...
}
cf_clobber(foo);

similar to command line parameters.


That said, in this case, can't we cf_clobber each platform_timesource ? 
It would require altcall()ing the resume hook too.  (the init hook won't
matter either way.)

~Andrew

 


Rackspace

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