[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: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 14 Feb 2022 14:33:24 +0100
  • 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=Dr9WkXqtGYwxIT7piuJg17fN4Mt626Z5W09wOvRyZPo=; b=CQxWfOrPXTGLAvM2lX2cZ01px125THIlG728pZpcF2OeNJNYjGsLqThxZDi30TsNV4QAdCzgtNArMCjsFKfXghHNVn2h+6OTs57VJV9eKu9CBonaFW+CdfRr2560f8k3ZZiVfWv9a3SWqx+WZ4HYjLZBlKK9Qn8xwGHd5LDhh7Q4hkDSD7u0iKUSP8KMWEnFiUf7abgoLjhLqKBJqybwfgLtiGnqv1mh6nxVqxi+QbTu+GBZzhfywi8Mcv2Qr3iY5bBNzNPEFyI7C7lR30uBV04dAknhVtmsqoW2qljZ7a5+KWHrc03PodRGj5+poaoMRyuujG5JpsReZPxkNGoXRg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XjWlX9bFIMAdTG3CaUgt/WfQ6sKkx2sr75xcJGq3WIJfY+ZTLD9CpN+v0VFi5+moSie6GIHmZxy0VIzJ4bx3atDK6Lp5kmi83J9WEnFosHNw1ZqHuxh1a8qwHqIkBxDmzcYS5FVGwFtv1HB3t1Ial47yoSEoCpF7rdHhKs8U+hmHoyqkzxkp8Kr3Aby75/1fFbruBTqDPmlwG8j2lm0SZvabbipwFJpKod/j2MFiO8hnA//SpXy3fPIdhdnkG/GcjRMOsWN+cmtx3vg0EGbeWUmrQD1x+X6vzD0mkJZmX3QYo3BgiK4BUQFptcERNqs3yhcW94jQ/nspxOUsYbHxsg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 14 Feb 2022 13:33:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

> --- 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 ...

Jan




 


Rackspace

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