[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v9 8/8] xen: retrieve reserved pages on populate_physmap
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Penny Zheng <Penny.Zheng@xxxxxxx>
- Date: Tue, 9 Aug 2022 08:07:59 +0000
- Accept-language: en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=9kCQSUP1KNF16XoRASwxg0ZiuNazY6sZKtoDPBN1gBk=; b=mRZSEQbzdQwzekbzDSHv9ajiP5nlo82iysTcsWYWIg9v5MWMc3wKyhf051SJiFleWnmC8IdWVmiO1kkj+HAYXY1UwEjTkK2zPdN4JRzbAftA2N2cSjc1smZtUFlhvodpMvI2tFAgy7t8rsZhFFYdZj8IPAq3ryTuYiehQ3wEBNcAhjtOSutqBJsFlVWd5cfETFzk4WV6tVafSoE932jXyTD6LGgx+axkzDyyO2DxJ42pxsQT7UCXVMkm4YbPZUYzU3zYV6c/5JenVsC0VYJKJvVt8oFdbfBkwHdYzoO3ZFNeDEdKZ8aaqlGMzC9T95lJ+VBlsT37J/t02U9Ekjy4Ow==
- 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=9kCQSUP1KNF16XoRASwxg0ZiuNazY6sZKtoDPBN1gBk=; b=VooDAHp86T2g2H9QOEZX66P3+XVxQUugqu+qeXUTNwZ0xNfscIvsVewKgHbM7lxh0dL1TcpXl/zYBAthBdPkiWM/ES4UOak6Bzsij/2BrnrkDjAAY7BXzd+vZkbZ5oHreMLmOA1tCqKxPjxll4faD99Lb4/ZM/+NA3okAuwPHjRg3OcJn0TGdIxNaGo3tGzNJPk1jX3gJ0LKDQUtXfUcoGY+eLziTpbVgQQyuV8YK/rb3F3nQvjnekPI7Fg9iRTCoFpbNm7y9AELBgXZpaLlOZw4U95PnhgEahFM9ToIRGi4c3Zt1OCA0D9iN1FZVvc2ta65r9Q2KMyF5V9FaoQ4ZA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=nRUZ7HZ5yovfmYihyLxrVHr8/UE36gi4O74optTVREjGA7NLkx1e88CEUTE3rDuoejqqEyIRPJLSAjVR2k5fJvJbavu7dZqqyftaKkRFZV1SAlXI8E9C+auUf+T7qtPN/0mmH3qxJEG3Cvu3TVssIVHbEquqBczxEq8CYqrTTdliIw9ZhlAVUS87jY0DjlhRz9/LYJg5KAOC/lHrrlqcFKfgU38AIwIyYNds6iD5P74CL2oF5E+qFd18xhRMV0c42XeDd3udtbNfgrLZeTmJzEpPafXNnjqJzA1PiJarRVQe8Vx3QLCm+YDBKcuyHxzqaJ5yu0ZOAgdVQkAT2Kb49g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CFs1uFSfcjMer+XFlRY0h59ho0XzMRcCmMYEUTGmVIYTt6wDEVTI4VuVvrEqjgEwRgVnxwDF/T7cOL6sl/2ZLT0QE2b4j53JQisTLLz8wwgpWEbHEJwi4OHdqTRK4wuWYVEDZMteSzdlEtn5V1qQeJjyQw3Y+RQwKXjOhlwB6YcbRFAQ7F0hdGis857hWhL8YdviEsrc5iyB9C68YWJrgQ14NhRCCFrZ1+HCbgWaR41kOSMI9/UL75105QQ2LogXhXWK7v+bQ5gAW49lWQT85YTE5cx9/gxQ0nOMCdDU1sP3CSaOSM1JzXGAGU4u3GasZ1n8d9bv7bcdb0sekmR7xw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 09 Aug 2022 08:08:15 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHYm/wqv1nrEHMOJUyQDyAePQJHla2PQtqAgBcOCRCAAALrAIAAAXbw
- Thread-topic: [PATCH v9 8/8] xen: retrieve reserved pages on populate_physmap
Hi jan
> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Tuesday, August 9, 2022 3:59 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Wei Chen <Wei.Chen@xxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; George Dunlap <george.dunlap@xxxxxxxxxx>;
> Julien Grall <julien@xxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>;
> Wei Liu <wl@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v9 8/8] xen: retrieve reserved pages on
> populate_physmap
>
> On 09.08.2022 09:53, Penny Zheng wrote:
> >> -----Original Message-----
> >> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> >> Jan Beulich
> >> Sent: Monday, July 25, 2022 11:44 PM
> >>
> >> On 20.07.2022 07:46, Penny Zheng wrote:
> >>> When a static domain populates memory through populate_physmap at
> >>> runtime, it shall retrieve reserved pages from resv_page_list to
> >>> make sure that guest RAM is still restricted in statically
> >>> configured memory
> >> regions.
> >>> This commit also introduces a new helper acquire_reserved_page to
> >>> make
> >> it work.
> >>>
> >>> Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> >>> ---
> >>> v9 changes:
> >>> - Use ASSERT_ALLOC_CONTEXT() in acquire_reserved_page
> >>> - Add free_staticmem_pages to undo prepare_staticmem_pages when
> >>> assign_domstatic_pages fails
> >>
> >> May I suggest to re-consider naming of the various functions? Undoing
> >> what "prepare" did by "free" is, well, counterintuitive.
> >>
> >
> > How about change the name "prepare_staticmem_pages" to
> "allocate_staticmem_pages"?
>
> Perhaps - if what the function does really resembles allocation in some way.
> So far I wasn't really certain in that regard, and hence I was wondering
> whether "prepare" doesn't better describe what it does, but then its inverse
> also doesn't really "free" anything.
>
Hmmmm, “prepare” with “destroy” in its inverse? Do you have any suggestion in
mind?
> Jan
|