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

Re: [PATCH V7 2/2] xen/gnttab: Store frame GFN in struct page_info on Arm


  • To: Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 11 Oct 2022 13:59:59 +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=XatgHpPKUxXVOOyNfudNkIqba4tIM7LNzz3DahNNyR0=; b=e6L51KQusJJNldmen6TAMC9P4f7DA01DBQrXVMfQwsXJOfjharkdBcGe5m6UFKE56LnN6uSoYLTDNtQRKs03PEp7Qxnd+c3cVqG09U/N5+SCZjM08YrRrDU7h3P6oK9SID6Dn5Hor2us8ppxUYfRCcJQd0equEj6zpqaKjdJzqft2xEqUf4AlUy8QeOVPk86sEzh8OYBZrr6u35A9eU+i5vtSlCm2DanQZCmwMnrGc9WZEGKiu5xy2PgpBCSTCmmcJ6VF/ksArqWbw8z5GFzIKKQCSGpX3+k9vi9PAWWYfFXKL63ILOzQdgKxuDEH6jKNsQSZEtMOOq5NDTmSYCxpg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LGh+6mIDFH03iyWvLNoDUhDHfXY3QVuY83jbw7u+aQSi6ga/kBxCB2zr1XSi0yyetJpJEQjAP61EuX06pEV6k+yuAWtGgQZ4WD2ko2mt5p9KKhZ5c926zJ8ALSMEW7MVIOKq2Kjg8qceiGTw2iwn/z9XW28RDXVYrUC4Jlwsebc6OS1vDxpdB77UO4+aKemT+vUMzE/44YSikVuiL0agRuPBLrQEax6zflWHL9l3f3Z2wi8U0Oc5SYR1UqMRLGHhP6ynkgW+WVg5bFLldVHsESty9bWx4FD/JQgQGTCXvhfmCHSyTdxJw7BIQ/RD4CN+PzhRvGSZhF+CCfTnihNb7w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Tue, 11 Oct 2022 12:00:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.07.2022 16:56, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
> 
> Rework Arm implementation to store grant table frame GFN
> in struct page_info directly instead of keeping it in
> standalone status/shared arrays. This patch is based on
> the assumption that a grant table page is a xenheap page.
> 
> To cover 64-bit/40-bit IPA on Arm64/Arm32 we need the space
> to hold 52-bit/28-bit + extra bit value respectively. In order
> to not grow the size of struct page_info borrow the required
> amount of bits from type_info's count portion which current
> context won't suffer (currently only 1 bit is used on Arm).

I'm afraid this isn't true: There's no requirement for a guest to pass
all different GFNs to VCPUOP_register_vcpu_info, yet map_vcpu_info()
tries to obtain a reference for every vCPU. With my adding of GFN
(really gaddr) based registration of the runstate area (already
looking towards 4.18) the maximum possible count is to further grow.

I guess this went unnoticed because Linux presumably uses different
GFNs for every vCPU, so the issue doesn't surface. But I'm afraid this
is a regression (unless I'm overlooking something, perhaps a
mitigating factor) which wants fixing for 4.17.

Jan



 


Rackspace

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