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

Re: [PATCH v2 8/9] x86/shadow: call sh_detach_old_tables() directly


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 12 Jan 2023 10:37:30 +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=+qval3siV5ZTKNWLhov1cDgk4NvpyHzDD1M+ttv7kF4=; b=gA7Gbjxf0pte2BFDicWtKQD9o6gAlgFet1bQWJhlvDTmICr2AXGaEQuBlr/168VGF7G/iasi8Wh6Nf5Od3Svty1YihnTW79xieCmAaZ9gQVaf7gAjKF1q3eV9l4y8Jva2JlMA9LB8O0dhcaWtvCIKWGxXOwudOqcXsZ+7S1jlhN7g6K18GXGhy5eb9ARXPKLnJEstXpH1DsuC3KZJVeRjq9z8IK8uQhFt7m0Gv+tFb7Snj5Z0CzHkwssF0rf+eS66hokUUaZVuG5gAbevUIPHPOorDth3G0ImtlN0iU3MzJyDxmL2hHxAv5CfY+CJYnyjwn+Z233vzf0R04O9iOX3A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JzR31wFCldoDt6e3WBOr51kRz2ZInlq8C/vsEUyEmkgxDSleoq5cVK+fh0qLFMMwPQg/xz+f9AbWJNXRnsgUz0btrZ92sh/dEVZSLtvKCbT8o1F2xDV/LLszwTBeqq//sAofccfmTqYjthtB4pNTpaYSo3E71bnAQZpykhN88xGZ103sgTwUDdG82mJaX805lNpLJaM0IM1Zoey/3CFX0SdOWBbeJzVmcqFKQ43+ASZPJDG9BDkyQszFQvkBRasVzmHTU8Y3wG1yjeAQCdRPTDqHzxGhDKnWMtlgeoaCsRyBbi36oC5Csk2U60RhRdEtt1h17iKbtbhICK/LwztDYQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "Tim (Xen.org)" <tim@xxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Jan 2023 09:37:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.01.2023 00:56, Andrew Cooper wrote:
> On 11/01/2023 1:57 pm, Jan Beulich wrote:
>> --- a/xen/arch/x86/mm/shadow/common.c
>> +++ b/xen/arch/x86/mm/shadow/common.c
>> @@ -2264,6 +2264,29 @@ void shadow_prepare_page_type_change(str
>>      shadow_remove_all_shadows(d, page_to_mfn(page));
>>  }
>>  
>> +/*
>> + * Removes v->arch.paging.shadow.shadow_table[].
>> + * Does all appropriate management/bookkeeping/refcounting/etc...
>> + */
>> +static void sh_detach_old_tables(struct vcpu *v)
>> +{
>> +    struct domain *d = v->domain;
>> +    unsigned int i;
>> +
>> +    ////
>> +    //// vcpu->arch.paging.shadow.shadow_table[]
>> +    ////
> 
> Honestly, I don't see what the point of this comment is at all.  I'd
> suggest just dropping it as you move the function, which avoids the need
> to debate over C++ comments.

As said in the remark, this style of comments is used elsewhere as well,
to indicate what data structure a certain piece of code in a function is
updating. Earlier on the function here also played with
vcpu->arch.paging.shadow.guest_vtable, at which point having such comments
was certainly not entirely useless.

> Preferably with this done, Acked-by: Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>

Thanks. I guess I'll drop it then; should the function become more
involved again, we could clearly resurrect comments in whatever shape is
then deemed best.

Jan



 


Rackspace

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