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

Re: [PATCH v3 14/19] xen/arm: add Persistent Map (PMAP) infrastructure


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 28 Feb 2022 11:30:07 +0100
  • 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=3uRGGnjNNDfyD4Fb3eAqtsoKlIW1CI8VIMyjIbR8wMY=; b=Ff9fJDt2fLIZ6rOr+CY4oGXpo08AcW/Jv+bXpCH4fTNOuVDHfIkMrVrL/Q6XoNEhPqLUzurgx+lkEtM2YobKF52vhBwhVUr+AjiSeBaMgDHKp6uuq1xuudq5WM1+zQX6VG6tSbhW6tegrRupQYmUd6btQD+RhlFsbzDPJ1MWQgxhWHvOBqwfT/WdElKqeHs5qAcsvoEFBdifx5hFuNNnqFsJnmY0XjYzP9NqFyjqo3XhRX5SiNBZO1Jc2ybiJy43wOK8M0xYVh0eTC9BpBuV6cTd3hTBopesxQyYEvIaNOJ9ASvQ5iyyWRZ/VYwo8doAS8AtjX9o1e3XCoAacHqi6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VEjTO1k6H207ttR3bQ0+7ufA9bwhsKw5ULBGPL4bUgXXpZ8lBJkbNaXeBg4g+7mDfwit7oRoPqArDjSsfr68ETzVAMJ1EaO2UlkhyWAE7hn7J19VCIYBsmAWDio82xEvKtquCOETd8r/sGRhSXEBBhGeg1XAIdMYKwWsDaoT4DAmEo3bRXVTvPxAfuG7KFDstToByOhqHdxAvKI9AffVA3risCk11fhSKOCd9U7LWlY9ZeHZTeEJNBk1S5fiZN2+dZ//6kQnp/xrHeuhJ8GJ91dk0xN85ow4IYF/guiXOXO5SIRZ9bisvbPQyNZacJxfFyCu7BdkK1RAP+uS1noaxQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wei.liu2@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Hongyan Xia <hongyxia@xxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 28 Feb 2022 10:30:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.02.2022 11:20, Julien Grall wrote:
> On 28/02/2022 10:10, Jan Beulich wrote:
>> On 28.02.2022 10:55, Julien Grall wrote:
>>> On 22/02/2022 15:22, Jan Beulich wrote:
>>>> On 21.02.2022 11:22, Julien Grall wrote:
>>>>> +    /*
>>>>> +     * We cannot use set_fixmap() here. We use PMAP when there is no 
>>>>> direct map,
>>>>> +     * so map_pages_to_xen() called by set_fixmap() needs to map pages on
>>>>> +     * demand, which then calls pmap() again, resulting in a loop. 
>>>>> Modify the
>>>>> +     * PTEs directly instead. The same is true for pmap_unmap().
>>>>> +     */
>>>>> +    arch_pmap_map(slot, mfn);
>>>>
>>>> I'm less certain here, but like above I'm under the impression
>>>> that this comment may no longer be accurate.
>>>
>>> This comment is still accurate for Arm. I also expect it to be accurate
>>> for all architectures because set_fixmap() is likely going to be
>>> implemented with generic PT helpers.
>>>
>>> So I think it makes sense to keep it in common code. This explains why
>>> we are calling arch_pmap_map() rather than set_fixmap() directly.
>>
>> I guess I was rather after "when there is no direct map" alluding to the
>> planned removal of it on x86.
> It is one way to interpret it. The other way is that pmap will be used 
> when the directmap is not yet in place.
> 
> But I guess I could be less specific and refers to the fact the domain 
> page infrastructure is not yet setup. Would that be better for you?

That or simply add "(yet)" to what is there.

Jan




 


Rackspace

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