iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
To: Robin Murphy <robin.murphy@arm.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Cc: "joro@8bytes.org" <joro@8bytes.org>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	"eric.auger@redhat.com" <eric.auger@redhat.com>,
	"eric.auger.pro@gmail.com" <eric.auger.pro@gmail.com>,
	"peterx@redhat.com" <peterx@redhat.com>,
	"bharat.bhushan@nxp.com" <bharat.bhushan@nxp.com>,
	"tnowicki@caviumnetworks.com" <tnowicki@caviumnetworks.com>,
	"jayachandran.nair@cavium.com" <jayachandran.nair@cavium.com>,
	"kevin.tian@intel.com" <kevin.tian@intel.com>,
	"jintack@cs.columbia.edu" <jintack@cs.columbia.edu>
Subject: Re: [PATCH 2/4] iommu/virtio: Add probe request
Date: Wed, 11 Apr 2018 19:33:59 +0100	[thread overview]
Message-ID: <c6ae66ca-ddaf-09f6-cfee-87f4b99a7e8f@arm.com> (raw)
In-Reply-To: <8156517f-74b1-2923-2838-402f09a5c488@arm.com>

On 23/03/18 15:00, Robin Murphy wrote:
[...]
>> +	/*
>> +	 * Treat unknown subtype as RESERVED, but urge users to update their
>> +	 * driver.
>> +	 */
>> +	if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED &&
>> +	    mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_MSI)
>> +		pr_warn("unknown resv mem subtype 0x%x\n", mem->subtype);
> 
> Might as well avoid the extra comparisons by incorporating this into the 
> switch statement, i.e.:
> 
> 	default:
> 		dev_warn(vdev->viommu_dev->dev, ...);
> 		/* Fallthrough */
> 	case VIRTIO_IOMMU_RESV_MEM_T_RESERVED:
> 		...
> 
> (dev_warn is generally preferable to pr_warn when feasible)

Alright, that's nicer

[...]
>>   	/*
>>   	 * Last step creates a default domain and attaches to it. Everything
>>   	 * must be ready.
>> @@ -735,7 +849,19 @@ static int viommu_add_device(struct device *dev)
>>   
>>   static void viommu_remove_device(struct device *dev)
>>   {
>> -	kfree(dev->iommu_fwspec->iommu_priv);
>> +	struct viommu_endpoint *vdev;
>> +	struct iommu_resv_region *entry, *next;
>> +	struct iommu_fwspec *fwspec = dev->iommu_fwspec;
>> +
>> +	if (!fwspec || fwspec->ops != &viommu_ops)
>> +		return;
> 
> Oh good :) I guess that was just a patch-splitting issue. The group 
> thing still applies, though.

Ok

Thanks,
Jean

  reply	other threads:[~2018-04-11 18:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 14:53 [PATCH 0/4] Add virtio-iommu driver Jean-Philippe Brucker
2018-02-14 14:53 ` [PATCH 1/4] iommu: " Jean-Philippe Brucker
     [not found]   ` <20180214145340.1223-2-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2018-02-19 12:23     ` Tomasz Nowicki
2018-02-20 11:30       ` Jean-Philippe Brucker
2018-02-21 20:12     ` kbuild test robot
     [not found]       ` <201802220455.lMEb6LLi%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-02-22 11:04         ` Jean-Philippe Brucker
     [not found]           ` <e5ffc52f-4510-f757-aa83-2a99af3ae06b-5wv7dgnIgG8@public.gmane.org>
2018-02-27 14:47             ` Michael S. Tsirkin
2018-02-21 21:08     ` kbuild test robot
2018-03-21  6:43     ` Tian, Kevin
     [not found]       ` <AADFC41AFE54684AB9EE6CBC0274A5D19108B0FE-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2018-03-21 13:14         ` Jean-Philippe Brucker
2018-03-21 14:23           ` Robin Murphy
2018-03-22 10:06             ` Tian, Kevin
     [not found]             ` <AADFC41AFE54684AB9EE6CBC0274A5D19108DC42@SHSMSX101.ccr.corp.intel.com>
     [not found]               ` <AADFC41AFE54684AB9EE6CBC0274A5D19108DC42-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2018-03-23  8:27                 ` Tian, Kevin
2018-04-11 18:35                   ` Jean-Philippe Brucker
2018-03-23 14:48     ` Robin Murphy
2018-04-11 18:33       ` Jean-Philippe Brucker
2018-02-14 14:53 ` [PATCH 2/4] iommu/virtio: Add probe request Jean-Philippe Brucker
     [not found]   ` <20180214145340.1223-3-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2018-03-23 15:00     ` Robin Murphy
2018-04-11 18:33       ` Jean-Philippe Brucker [this message]
2018-02-14 14:53 ` [PATCH 3/4] iommu/virtio: Add event queue Jean-Philippe Brucker
     [not found]   ` <20180214145340.1223-4-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2018-02-22  1:35     ` kbuild test robot
2018-02-14 14:53 ` [PATCH 4/4] vfio: Allow type-1 IOMMU instantiation with a virtio-iommu Jean-Philippe Brucker
     [not found]   ` <20180214145340.1223-5-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2018-02-14 15:26     ` Alex Williamson
     [not found]       ` <20180214082639.54556efb-DGNDKt5SQtizQB+pC5nmwQ@public.gmane.org>
2018-02-14 15:35         ` Robin Murphy
2018-02-15 13:53           ` Jean-Philippe Brucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6ae66ca-ddaf-09f6-cfee-87f4b99a7e8f@arm.com \
    --to=jean-philippe.brucker@arm.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=Marc.Zyngier@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=alex.williamson@redhat.com \
    --cc=bharat.bhushan@nxp.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jasowang@redhat.com \
    --cc=jayachandran.nair@cavium.com \
    --cc=jintack@cs.columbia.edu \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=mst@redhat.com \
    --cc=peterx@redhat.com \
    --cc=robin.murphy@arm.com \
    --cc=tnowicki@caviumnetworks.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).