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

Re: [XEN][PATCH v8 09/19] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller


  • To: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 21 Aug 2023 08:32:46 +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=Oox7X6dqDFrH8db/lL1C3csEOWheN1jNkxceHeJOEA4=; b=XD8wvzmLS/IDs6BpuCCYmIyZFcnVbhkGz1IHGokLggV4OlP8w/82wBl2NEm295665EJxGrXnMVQUY7ZLSM4kwtCFQFS52RhQWsKnLGbv8JszGDGuIUO5jYxqkER95xPwE9IEY1JFPZGcCUt4G2mfqFF1IOODT4i08joqIMkC77qqlTxdjOOJksskix259lwPDNcTxQORJmi7pAiuexY3yRoxediJcNblAaYLU+MzbRegbzko1eov7YlkwPFOf9UaqPuJ1pstAiC9DsVO4DjKiFnVk1TXwdDoVqWkM3ThcoJn9mwXdu8WgFG1sih52kPakG9VaJePnf4ePtuUyhRHeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nObhOLZFAIvNbnLSeOJOaa3hZ6E0xqUKcpnBPRoxSSnz86Tte8eMqWVWgIRcUDKXjc5SofQerZc44yPc3ay/ITOPtCmYQtZ5rwzFAYn+YC76qLqSg5B11wJUx5772LWr3gFlZhWuoziStqYr63UnlY3gxBU2Zn7RwF50qKa7zdxR/4MgOXju0yYVoLpigr5X1JAhUkfV50GyG/km8u1Ao/79IP74rEoOgQNLALOPku/4ASoZlcDoxcLxOnRiVJfjBxlICFJEl14nnsgNcH5i/0sDK6WsmOo/bfiVV2fdKPRn88DJr0iXsr2Tj3Hmz1NFGfJwi/B9Uer7MIhfh4b/PA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: michal.orzel@xxxxxxx, sstabellini@xxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 21 Aug 2023 06:32:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.08.2023 21:52, Vikram Garhwal wrote:
> On Thu, Aug 17, 2023 at 09:05:44AM +0200, Jan Beulich wrote:
>> On 17.08.2023 02:39, Vikram Garhwal wrote:
>>> --- /dev/null
>>> +++ b/xen/include/xen/iommu-private.h
>>
>> I don't think private headers should live in include/xen/. Judging from only
>> the patches I was Cc-ed on, ...
> Thank you for suggestion. Do you where can i place it then?

Irrespective of Julien's reply (potentially rendering this moot), see ...

> Please see another comment down regarding who might be using this function.
>>
>>> @@ -0,0 +1,28 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +/*
>>> + * xen/iommu-private.h
>>> + */
>>> +#ifndef __XEN_IOMMU_PRIVATE_H__
>>> +#define __XEN_IOMMU_PRIVATE_H__
>>> +
>>> +#ifdef CONFIG_HAS_DEVICE_TREE
>>> +#include <xen/device_tree.h>
>>> +
>>> +/*
>>> + * Checks if dt_device_node is assigned to a domain or not. This function
>>> + * expects to be called with dtdevs_lock acquired by caller.
>>> + */
>>> +bool_t iommu_dt_device_is_assigned_locked(const struct dt_device_node 
>>> *dev);
>>> +#endif
>>
>> ... I don't even see the need for the declaration, as the function is used
>> only from the file also defining it. But of course if there is a use
>> elsewhere (in Arm-only code, as is suggested by the description here), then
>> the header (under a suitable name) wants to live under drivers/passthrough/

... my earlier reply.

Jan

>> (and of course be included only from anywhere in that sub-tree).
>>
> This is also use in smmu.c:arm_smmu_dt_remove_device_legacy(). This is added 
> in
> 12/19 patch(xen/smmu: Add remove_device callback for smmu_iommu ops).
> 
> I will make sure to cc you for all the patches in v9 series. I plan to send
> it today.
> 
>> Jan




 


Rackspace

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