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

Re: [XEN][RFC PATCH v3 09/14] xen/iommu: Introduce iommu_remove_dt_device()


  • To: Vikram Garhwal <fnu.vikram@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 14 Mar 2022 17:50:07 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=xiG+/a6mvwD6GubzpusYumkwSGLXGuQwmI4TO6kbxUY=; b=eTfVB9ifjLvugLr2TRIeqlKUs4awO7mRLAkE05IVMbteoYhstD87sgjHPzTnOG+GzcNc2e7vXogrx1J7KtlMAClH0pdCC2GlAgYxW1XxtGB4IwQ+W6iEoGlcHfETnMCrqbsfEhq+vWcS3wMfUl+0tZfR3x2YD4BbmGOZKX2X6yE/GAvK0Kq1MYcd8N9MiF18/wQjjMLeUd49dCBz733Tp9x7Q4EU2pNbKdbT9rE0MEX03nHCnjAdeTWzZ6CClXgXHlE4YAoMDFqbe6CsuOmAT9Smni/0CUBo7HKr7fJhsAa5lz7ZCNVM9iQtUG2NEP1govtG4G53vQ0wYDeJx2YrGw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JVv1wg57utP8vH/2pxROAY3hK+PdBK4AbqiRyqQtEC9G/AuZRDg9AaLNWI4F6bfx8FMS3GtYd/LBy1p5f5UkxqL99zyjElCW0mG/gtqdemjC47Mi0metAggEY25fyJKHGuyr+gf2Pd9eOWWef7viFqOkBwV3cGJ4ujmNZ7jdZmd7dIZaKMgqhONO3EjA9CyRVbzwPb7ZOHfYc/CkFc9OLb43Sgi7Alnf/22aKbqkz3mWGIXfn6F3rLHlonb2pJTgQvYwKNIcD1wdu+PrjTice/tsg2OXGFDBhmo5+1sGUD3HAMvqgol3CqzKy3VLiI26L9U7o5KJd15EZuytqOjQOQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "volodymyr_babchuk@xxxxxxxx" <volodymyr_babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Mon, 14 Mar 2022 17:50:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYMyV0f/eLDa9bQkuzPbuk19t2X6y/MZYA
  • Thread-topic: [XEN][RFC PATCH v3 09/14] xen/iommu: Introduce iommu_remove_dt_device()

> +int iommu_remove_dt_device(struct dt_device_node *np)
> +{
> +    const struct iommu_ops *ops = iommu_get_ops();
> +    struct device *dev = dt_to_dev(np);
> +    int rc;
> +
> +    if ( !ops )
> +        return -EOPNOTSUPP;

Here we have that the counterpart iommu_add_dt_device returns EINVAL here and...

> +
> +    spin_lock(&dtdevs_lock);
> +
> +    if ( iommu_dt_device_is_assigned_lock(np) ) {
> +        rc = -EBUSY;
> +        goto fail;
> +    }
> +
> +    /*
> +     * The driver which supports generic IOMMU DT bindings must have
> +     * these callback implemented.
> +     */
> +    if ( !ops->remove_device ) {
> +        rc = -EOPNOTSUPP;

… here (for !ops->add_device), so I’m wondering if there is a mistake.

> +        goto fail;
> +    }
> +


 


Rackspace

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