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

Re: [PATCH v5 1/4] xen: XENMEM_exchange should only be used/compiled for arch supporting PV guest

  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 5 Jul 2021 10:41:44 +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-SenderADCheck; bh=Qi0/A/ZDdzvWCMcpib3gmxbhoynEIspq/aq0JQvdtrs=; b=OJtRFTJbZlrBp8hKa+NVSNYoRK1F4bBxc9btoXMDILIcylIVn59ncm2JjHgi7PqUo6sDARf/EHlxxMuHrEA3lYsIYF9vPfsZv0JP1ozJeEYpmWYvp4f77QlxDKCN1BWJW1Tg7JvsN4JMnNOI6U3V4w1T0l6vnZgchbQO8zYWmWJ8Q4pDssH4TaJgjqt6sjH4Lbme/fsyOHcFo8Ijk0pOglSUTggwi9gB+bO4YJJ/y7yjsj9V9Gh6IbSbsGdDO+hyclNKWaUMveqbv96fCsT9BS2l7MvMpnA1TS/P8Ju9NewQ1UcVLDJoTtCvf2m20lZFA1TEa64VcE7FzVp5GxJL0g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NWQkJElLYjG8sFAen/WyPc6hNfr9ropa+4mNxpgK5X6nUqEnqzU3JcLARCsGwHI/ULJwETfDKEuqHolopBLvlHacM1/GbQfLs9MQlZ3qnIDwbV0Qwps9SwVS5Rm8skfisMr29OmVHdlg9pb0X/9ShMzKvublN7YBLcG9Gba6wltiubB0imhsUZ+wi/gtjj0V+IDpUVntfmt2uVGzF7vCURcBZVSVShfTnVZFg9K+gSvlI2MmjlFNMYMp8medAtTlXydfWtDK8MReJQ7rBcmkL9Y1QsqRKS6OPt55fQO8yWKlehRE/TTJcUQiQOioqh9zTOUh1XiIGB5TjVtBV4ADbw==
  • 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: Julien Grall <jgrall@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 05 Jul 2021 08:41:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.07.2021 19:11, Julien Grall wrote:
> Changes in v5:
>     - Removed the #ifdef CONFIG_X86 as they are not necessary anymore
>     - Used paging_mode_translate() rather than is_pv_domain()

Is there a particular reason you use this in favor of steal_page()'s

> @@ -815,6 +812,9 @@ static long 
> memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg)
>      if ( __copy_field_to_guest(arg, &exch, nr_exchanged) )
>          rc = -EFAULT;

I'm afraid that for correctness of the interface you need to keep
this part even in the !PV case.

Seeing the 2nd use of steal_page() I wonder if it was too much to
ask you to do a similar transformation for gnttab_transfer(), even
if it's not directly related to the immediate purpose of this
series. If you're not going to do so, I guess I'd put it on my list
(perhaps together with moving x86'es steal_page() and dropping
Arm's stub).




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