[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 4/5] xen/arm: retrieve reserved pages on populate_physmap
- To: Penny Zheng <Penny.Zheng@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 30 Mar 2022 11:58:40 +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=vz3FBfUI0XZC0vRPupOdJkYmWe1uH6DSENETWncMJIA=; b=P9Mvm56Y7LF2Eujk28ZZjAYLKcEY+pAHnoln38m72XT6fE1g9WZzKWD939vuB0sUdU3uh+p4QvZVnssIRSaVQ/+TKdpf/c7BAjEwHGYqSpJ1TaYpZSr+vkO8c4kHw7kdckswGSXut0s0SFgzxqUntO2quMkWCvLePVbiECDdZgckduVlHY6EXiym7wR88L1GPv3PIB59Ni8KYq3/EYlDCfkypcAdS530JSpN5VHhTTtwFgswZvqsPRzBpbLccCFvd7KJ04KE26K7r/okIDjMboBxckEibesWsAqotsgfMknH7VdvFhcjpNxP6Ps3eOwwOua3yBNKW0PT6taDmW14RA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SDIDPZi9AXT3uMrrJ192Vk+UvJAnEPHh69d2v9uv23VUBD/YhmvF5xf9LV3yvdlBGgxlP1MI/uIeG8ItN6Aqp8tTcO3gsAR/4MLhnU7syQ9hlI4HIKKwa/9+bDVBWsbICK32FwE4ibRO6LKgQKTX+1xfg/iRcE73vTH1b3p9OsiQBtwA+HSKsClSYVnDGHL9Po8kZoHISczzAEnYiUxNi/cdl9KvuLbzUkqEzO0ue1cg4l74PWTTLr8Dt4ZX6o0pjnXx3ZQguaUZwMDLGf6+ETSvTQyx2j7QFiZmWcEl2MhdFQbevqHwoS/oxgi7ImpYyBmzzRxhK+nFR0W3AWsJzA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: wei.chen@xxxxxxx, henry.wang@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
- Delivery-date: Wed, 30 Mar 2022 09:58:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 30.03.2022 11:36, Penny Zheng wrote:
> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -249,6 +249,26 @@ static void populate_physmap(struct memop_args *a)
>
> mfn = _mfn(gpfn);
> }
> +#ifdef CONFIG_STATIC_MEMORY
> + else if ( is_domain_on_static_allocation(d) )
> + {
> + for ( j = 0; j < (1U << a->extent_order); j++ )
> + {
> + page = page_list_remove_head(&d->resv_page_list);
How do you guarantee the pages are contiguous, as required by a non-zero
a->extent_order? Did you perhaps mean to forbid non-zero-order requests
in this configuration?
> + if ( unlikely(!page) )
> + {
> + gdprintk(XENLOG_INFO,
> + "Could not allocate guest page number
> %lx\n",
> + gfn_x(_gfn(gpfn)));
> + goto out;
And earlier allocated pages are simply lost / leaked?
Jan
|