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

Re: [PATCH v2 04/70] x86/pv-shim: Don't modify the hypercall table


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Wed, 16 Feb 2022 22:17:28 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=2vtSUANBn5bNleSgmkYjLB8eOtq0KzrCK+Zol2UqbnA=; b=TVrh+AGcKCPzpYFcb7692zO2vp/m3gnprFFLQ3OdmnP2JzhdJo6B6gYDTSL+ncmy27WhBZskZWO9dZxJOMb4K3j9AGdEpvNN3VffG4575RPQOjX9kw47CCD3yR5AP8EkloDArUxubYhS0t17lYZyy0rWE/HBPGSMQplQw5uGvTs9zPFEC93o/ahBGEgKt+ndB1SdCSO183md/MdvkjlQUeardH+obu9Sag2qtoOM2RtPPR1XtOhDcWRxV+O+HCuknX279SMX4nbExipp81uCd4HG4M/0oYBqiP94gyMv25cxrUpZ62eQfxy5lxi1tlEmAwxTMDSBiuPEteycEpjuNA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MGkMNq4hA3ym1fEM8tbqDrZS1/L0yALn7p2tDfsp5l0EM3Yn1lPz8CBKWjTpsvG8CH9QXVVCpqpCbVtWSFypWV0C6WKGi2p8DYqZDWr5RUWeYXiynHbiFZEX+83xzjHaycn50xa5WqQcc7DXOJpZqqt8ikRd6CmZ8T0eiii+LWsebBrR064SUJR35EYv2I0e4yNBUpc7RjuUkJY94cH5kajhMDJbPdqeTRAEJbWFttGqhAM7Tp2ZpBswe9KK4zSnDUIVeCKNJqeYBJQwxeMFwbAd+tnVEh3e/seKKCOD+QgsZ0YrOzFP/Q0RF74uV8/Ps9oRRnoDu4xxPctBrq/paQ==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 16 Feb 2022 22:17:50 +0000
  • Ironport-data: A9a23:JDg+RqN+riwTtdrvrR1DkMFynXyQoLVcMsEvi/4bfWQNrUoh0TZUy GZJD2jXPa3bamvxKd4gbt7lpEMO6p+Em4MxGwto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6UUsxNbVU8En1500s9w7RRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYoweEmfZg+ etxiZ3zSTwoLKfKu/wbajANRkmSPYUekFPGCX22sMjVxEzaaXr8hf5pCSnaP6VBpLwxWzsXs 6VFdnZdNXhvhMrvqF6/YsBqit4uM4/AO4QHt2s75TrYEewnUdbIRKCiCdpwgmtr1psfTKm2i 8wxdxNGShfbWiB0OFYaN7klmdaSoGmnbGgNwL6SjfVuuDWCpOBr65D9PdyQdtGUSMF9mkeDu nmA72n/GgsdNtGU1XyC6H3Eru3AhyTgQ6oJCaa1sPVthTW7xGYeFRkXXluTuuSihwi1XNc3F qAP0nNw9+5orhXtF4SjGU3jyJKZgvICc+hdFcsr2T+x9quX4z2YFGICbSZHUfVz4afaWgcW/ lOOmtroAxlmv7uUVW+R+9+okN+iBcQGBTRcPHFZFGPp9/Gm+dhu1UyXEr6PBYbo1oWdJN3m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OjRSRDKw8s6QGIgz/twqX9CQKk0hAXVC4K6as+8E De+jaJpZmLgrWe8FvxxmXT55NZlJ/K0d1YHvGBjcATN3HFlhuoXoJ8QLeP1QpF4t1HqWxa1e UkkS1QePib2EmhOF1dZiGdgjUI5Qxer0MKD2Xo2UcL7/aJHw7SQPAx+r6xOiGplXbI+usMjZ 6jlljpx6a+R3n77VXAzsmNWBdwmkWup30+1eYVknxESIMbLKRctIoF4SpuYd099Q/Bmcga+d NVfYrhDTdtACenRmGcunMqzM2nX3w1EBvDSk8eutaN2zwTmHxi1UMXyMEWg39FrfsGOtV5zv WBNr4tmKBFT8cQY644DOAdQdGvAmiIRR7XKmqdLVnuCalCMXPQrJz85qkz+YiRCdE15Yp3nI 6EXEJTtGY0dU6rAcqS3IdT+hSIW2m5VSSF8LAW23G4gMyLeFPGC1zwdLkeqbrWnxxEOLypZx +aAuMiP8Pe
  • Ironport-sdr: w5QLhn1Kpfa99f4mK21Pj2JUGgc9doAvCNWy9F4dROV0l+AuOvlisfswTyvUs+3Jvc0m5axxiD ejjrdGIR4sgoMa/Ms6BKAmR8BEAamHFOA246n3GlBenEbfHoxt3tka48gNFGaj2HrjvhMKFd4z aTGThgq4ULMudnDLPCxoUqhbJnR5LZUbQsT3BgB1Q1i2z3MLNpvkCMrqByxuKKVLGxM+sJWpi5 WZuU0sSAbecaU0exSdHLBOH+vEAODXS8jyCNw2V++YHSZFRrChirEGjbhGxCn2w3YmLgnhm3j8 k6PGB32N2moPl4IRcaprjMEl
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYIaGhGuRO8pqNlkK4xub7I1FLsayTC50AgAAE4YCAAAF7gIADsLoA
  • Thread-topic: [PATCH v2 04/70] x86/pv-shim: Don't modify the hypercall table

On 14/02/2022 13:56, Jan Beulich wrote:
> On 14.02.2022 14:50, Andrew Cooper wrote:
>> On 14/02/2022 13:33, Jan Beulich wrote:
>>> On 14.02.2022 13:50, Andrew Cooper wrote:
>>>> From: Juergen Gross <jgross@xxxxxxxx>
>>>>
>>>> When running as pv-shim the hypercall is modified today in order to
>>>> replace the functions for __HYPERVISOR_event_channel_op and
>>>> __HYPERVISOR_grant_table_op hypercalls.
>>>>
>>>> Change this to call the related functions from the normal handlers
>>>> instead when running as shim. The performance implications are not
>>>> really relevant, as a normal production hypervisor will not be
>>>> configured to support shim mode, so the related calls will be dropped
>>>> due to optimization of the compiler.
>>>>
>>>> Note that for the CONFIG_PV_SHIM_EXCLUSIVE case there is a dummy
>>>> wrapper do_grant_table_op() needed, as in this case grant_table.c
>>>> isn't being built.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>> I don't think you sync-ed this with Jürgen's v3. There were only minor
>>> changes but having a stale version sent two months later isn't very
>>> nice.
>> I did resync.  What do you think is missing?
> A few likely() / unlikely() as far as I could see.

Oh those two.  I appear to have forgot to email.

They're wrong - observe they're in an ifndef block, not an ifdef block. 
Obligatory citation of the recommendation for humans not to try annotating.

>>>> --- a/xen/common/compat/multicall.c
>>>> +++ b/xen/common/compat/multicall.c
>>>> @@ -5,7 +5,7 @@
>>>>  EMIT_FILE;
>>>>  
>>>>  #include <xen/types.h>
>>>> -#include <xen/multicall.h>
>>>> +#include <xen/hypercall.h>
>>>>  #include <xen/trace.h>
>>>>  
>>>>  #define COMPAT
>>>> @@ -19,7 +19,6 @@ static inline void xlat_multicall_entry(struct mc_state 
>>>> *mcs)
>>>>          mcs->compat_call.args[i] = mcs->call.args[i];
>>>>  }
>>>>  
>>>> -DEFINE_XEN_GUEST_HANDLE(multicall_entry_compat_t);
>>>>  #define multicall_entry      compat_multicall_entry
>>>>  #define multicall_entry_t    multicall_entry_compat_t
>>>>  #define do_multicall_call    compat_multicall_call
>>> Jürgen's patch doesn't have any change to this file, and I'm afraid I
>>> also don't see how these adjustments are related here. The commit
>>> message sadly also doesn't help ...
>> The changes are very necessary to split it out of Juergen's series.
>>
>> Without the adjustment, the correction of compat_platform_op()'s guest
>> handle type from void to compat_platform_op_t doesn't compile.
> Interesting. That's quite far from obvious in this context, so clarifying
> the purpose in the description would seem helpful.
>
> Coming back to the syncing with v3: Was this change the reason then why
> you did drop my R-b?

My porting of this patch is a non-trivial modification from Juergen's
version, and not eligible to retain any tags.

I thought I'd discussed this, but I appear to have missed it from both
versions of the series.  Sorry.

Either way.  It's exactly the same purpose as before, but modified to
compile in isolation.

Juergen's second patch, subsequent to this one, is unmodified which is
why I retained your R-by there.

~Andrew

 


Rackspace

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