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

Re: [PATCH v2 2/6] gnttab: allow setting max version per-domain


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 15 Oct 2021 13:47:41 +0200
  • 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=oHRBOLdnfasBwrRmnIyqCz064wyayF1zWhy6MAvALLw=; b=GWuQwnlN0sXCOYf2CAZR1HoxAaunfvcoi/dObj4meGH/Bkl8t1ZP++i0S+hpwveFLBkxXiZwYBuKPpDPJPvTC8q+EJUbtA8VtJl9vHuVPLz6KmdCNQq48DL05+SobyO0YCctULh3bXTNWhx6dk9ZlhVBT7/HKtsfblB+qqnEK+Kosa8AZNKwwWvAhVunJ0tUFfdyeqwC+MQAJUTHGJfepGeyo+iXIORn4ZCyD9lzana16rMaEEzhg5qDqpDIeQV/qzvQioxNJ56LF044GG7QGf7Ojw217Kzz6/eWkHpyFB109BeX/BChxqXH7IpgWEqQB3UXuBky4MeX1xBrcUE/QA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KTkgfL0vzllWNthidoxtGojAmNyFgtbk+hcJvOQNO+daabsRYpWCKQo+dlJFUD22XSf8m04SjyTeppkFhSOdmhlRAdoL+G+j6L6RVcha1NyOSIB5kz0gjYHxYj12ujfD6MeZTQEDBFmONJWuMHPyR4B+fqGDU3E2vC/K5I2Gl8TOutv24dghMpvDrO0Pbq0o+3c8v25H0LpVxyUpVqfC1puuJyEd5rLb8TcEA+x13VXu9GUvXAZ57Yd4eWG0OVDWkwThw4QSOP/yzbiYsilc1ZnAJaqDn3PxMzUgBzOa2jP2TBblQF2XabCLW8sT3rxOnM123IQzkU6Qti7UVFUCCA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 15 Oct 2021 11:47:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.09.2021 10:21, Roger Pau Monne wrote:
> @@ -1917,11 +1918,27 @@ active_alloc_failed:
>  }
>  
>  int grant_table_init(struct domain *d, int max_grant_frames,
> -                     int max_maptrack_frames)
> +                     int max_maptrack_frames, unsigned int options)
>  {
>      struct grant_table *gt;
> +    unsigned int max_grant_version = options & XEN_DOMCTL_GRANT_version_mask;
>      int ret = -ENOMEM;
>  
> +    if ( max_grant_version == XEN_DOMCTL_GRANT_version_default )
> +        max_grant_version = opt_gnttab_max_version;
> +    if ( !max_grant_version )
> +    {
> +        dprintk(XENLOG_INFO, "Invalid grant table version 0 requested\n");
> +        return -EINVAL;
> +    }
> +    if ( max_grant_version > opt_gnttab_max_version )
> +    {
> +        dprintk(XENLOG_INFO,
> +                "Requested grant version (%u) greater than supported (%u)\n",
> +                max_grant_version, opt_gnttab_max_version);
> +        return -EINVAL;
> +    }

To aid diagnosis of issues, maybe also log the affected domain in
both cases?

Jan




 


Rackspace

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