[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V4] xen/gnttab: Store frame GFN in struct page_info on Arm
- To: Oleksandr <olekstysh@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 14 Dec 2021 17:45:06 +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=qMZVw8TI2E2IED6ByzTbPC6NglxWEODXw8SstT5zBac=; b=OXCRq2zZz3ZceTNtbPDY/CulO6c6+siIyykjyxOvU6S2BD/9vqbZjBmU7Q7VXZEgKl4d4zZfcxTwJ5Myo05R+r+08RkQOBiNX5ueo9eaIfGLSs4LEmKzRwlO2SbdLgh87jWkqSkWCWvMifqC87N7iifo+PS2E8vPBD7kPyb0BPomAbBrNOkHmFMDK0bHUFqRYhmRlzb+VlYjSuN1cRcwxdqb3VaPieOTPdebswXO2yEH8ALbqZMQTA/CzEM8XS59+Dj4pfgWnT5GNRCl2edrD5QhXtxRdzJ+mhYza6PzrSw2ul8YMU3+9i4/rzdfb3zwYnnHbDHvbToc9bYiYBfy+A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MsvZDWWWbsAV+V8cpLoGR2jEtVYtYkdHBH+4AFSNva2oN5mfa7rg+44dKJjK97sactuUAKjHn+jegSAryzzFXplIVK7LaENdrNEm24CQ+3frhYz+L5tcTmwbjEFR8NC3EgARMvVFMF0Zg/3ZZgtrK/HXfKntSDjsUhe7SKSOQJ7M+XiYBZvq/wLk5G0sqaDEjL2fjYPyvtdVhlx5C8+fS52IvOC9dKvp6/Pi/0Fq35jjOhmRGf2qhCRSlh1q5M9oScEajc/X87p2youfEqj/Ggn4O5bpUH83K10SOUNt4NbEEoCwY6jKLPrLL5fTXs2o8y6AFj6SK4WZa7KrwWznVw==
- 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>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>
- Delivery-date: Tue, 14 Dec 2021 16:45:22 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 14.12.2021 17:26, Oleksandr wrote:
> On 14.12.21 15:37, Jan Beulich wrote:
>> On 03.12.2021 21:33, Oleksandr Tyshchenko wrote:
>>> @@ -2177,14 +2181,22 @@ void *alloc_xenheap_pages(unsigned int order,
>>> unsigned int memflags)
>>>
>>> void free_xenheap_pages(void *v, unsigned int order)
>>> {
>>> + struct page_info *pg;
>>> + unsigned int i;
>>> +
>>> ASSERT(!in_irq());
>>>
>>> if ( v == NULL )
>>> return;
>>>
>>> + pg = virt_to_page(v);
>>> +
>>> memguard_guard_range(v, 1 << (order + PAGE_SHIFT));
>> ... this really want to (logically) move into the new arch hooks.
>> That'll effectively mean to simply drop the Arm stubs afaict (and I
>> notice there's some dead code there on x86, which I guess I'll make
>> a patch to clean up). But first of all this suggests that you want
>> to call the hooks with base page and order, putting the loops there.
>
> I see your point and agree ... However I see the on-list patches that
> remove common memguard_* invocations and x86 bits.
> So I assume, this request is not actual anymore, or I still need to pass
> an order to new arch hooks? Please clarify.
Well, that patch (really just the Arm one) effectively takes care of
part of what I did say above. Irrespective I continue to think that
the hook should take a (page,order) tuple instead of getting invoked
once for every order-0 page. And the hook invocations should be placed
such that they could fulfill the (being removed) memguard function
(iirc that was already the case, at least mostly).
Jan
|