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

Re: [PATCH 16/16] x86/P2M: the majority for struct p2m_domain's fields are HVM-only


  • To: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 14 Feb 2022 17:07:59 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=EhY03lxHPMCG6Jq0lSqJfOp+8hAqqZYyfYrGfCPZ/c4=; b=hhZmA6i3Xa0R1mbZx5wdpEtDwQRlHRV0rpBIRZNnmYzw03l4n4qeKxxd0yFlQT3kn/shI0mrQo1JMQG8X+T0vZoKkMfGVkywggr6MYrlzNyZzb+PwRFjZRon8lU67BQuuu9f/xLvKKWsAQKSzv5H1tBd+z6duWeiKWK1QrsjabLvfM0jVQdJZyB/BWD+B4+wy8A57AUfPWKivEF5ob4gzg8MJxjZr1gKvGokcbAFLucvAPQwGjJa9kjTdnSQoX++B6AGGFZ2+DOhjgsxqCYK5D3Ioq2UQAWZD0v/EnJzvZ8tq2stZ7eAA+gGw2torYILWJ2nFT7UPDfSxVuwhP1Ntw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fvq4mZ6o5e8SyLw6aXs1rIgQ+k3IewY/H/d4QOhmeo/Q23ZYwHeBYFvkIL7kHPD5/N+yX29LAkgKYuV2auj68uBWJl+ZamEsX3sroPKDbt7rwOTtF7xrGpOpYNUa1IhY5AtHldc78HYsG6IApGWdcavFH0DNVPHhHGGAUNcVH2t1uPkXWfoAlef2WdAibZIrbJvNAyoBiQc53JYpQMCLKxYaVz9xlr3i9rb+hqhB8kBRxTTVqZk9tnQ8iO9B664NQw1efMsx/OuR4dSgzhDgFBNJHZaj9kJJRCzcD41x4oHZCoYFqIWUO9T8G9ameY+ydjDpTu0hV0KgLHkt5ZM5+Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Mon, 14 Feb 2022 16:08:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.02.2022 16:51, George Dunlap wrote:
> 
> 
>> On Jul 5, 2021, at 5:15 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>
>> ..., as are the majority of the locks involved. Conditionalize things
>> accordingly.
>>
>> Also adjust the ioreq field's indentation at this occasion.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

Thanks.

> With one question…
> 
>> @@ -905,10 +917,10 @@ int p2m_altp2m_propagate_change(struct d
>> /* Set a specific p2m view visibility */
>> int p2m_set_altp2m_view_visibility(struct domain *d, unsigned int idx,
>>                                    uint8_t visible);
>> -#else
>> +#else /* CONFIG_HVM */
>> struct p2m_domain *p2m_get_altp2m(struct vcpu *v);
>> static inline void p2m_altp2m_check(struct vcpu *v, uint16_t idx) {}
>> -#endif
>> +#endif /* CONFIG_HVM */
> 
> This is relatively minor, but what’s the normal for how to label #else macros 
> here?  Wouldn’t you normally see “#endif /* CONFIG_HVM */“ and think that the 
> immediately preceding lines are compiled only if CONFIG_HVM is defined?  
> I.e., would this be more accurate to write “!CONFIG_HVM” here?
> 
> I realize in this case it’s not a big deal since the #else is just three 
> lines above it, but since you took the time to add the comment in there, it 
> seems like it’s worth the time to have a quick think about whether that’s the 
> right thing to do.

Hmm, yes, let me make this !CONFIG_HVM. I think we're not really
consistent with this, but I agree it's more natural like you say.

Jan




 


Rackspace

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