public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
To: Auger Eric <eric.auger@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	marc.zyngier@arm.com, alex.williamson@redhat.com
Cc: will.deacon@arm.com
Subject: Re: [PATCH 2/2] vfio: type1: conditionally check MSI remapping at irq domain level
Date: Thu, 2 Mar 2017 13:38:19 +0100	[thread overview]
Message-ID: <4304c447-0523-08a0-3327-e974bedc3c73@suse.com> (raw)
In-Reply-To: <164781c3-af63-b3a1-332f-420b54384b5f@redhat.com>

On 03/02/2017 11:24 AM, Auger Eric wrote:
> Hi,
> 
> On 02/03/2017 11:01, Mian Yousaf Kaukab wrote:
>> Check only if irq domains are available.
>>
>> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
>> ---
>>   drivers/vfio/vfio_iommu_type1.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
>> index bd6f293c4ebd..e3ed50e40ead 100644
>> --- a/drivers/vfio/vfio_iommu_type1.c
>> +++ b/drivers/vfio/vfio_iommu_type1.c
>> @@ -1287,8 +1287,9 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
>>   	INIT_LIST_HEAD(&domain->group_list);
>>   	list_add(&group->next, &domain->group_list);
>>   
>> -	msi_remap = resv_msi ? irq_domain_check_msi_remap() :
>> -				iommu_capable(bus, IOMMU_CAP_INTR_REMAP);
>> +	msi_remap = resv_msi && IS_ENABLED(CONFIG_IRQ_DOMAIN) ?
>> +			irq_domain_check_msi_remap() :
>> +			iommu_capable(bus, IOMMU_CAP_INTR_REMAP);
> Is that patch actually needed after [PATCH 1/2] irqdomain: add empty
> irq_domain_check_msi_remap. irq_domain_check_msi_remap() should be
> defined and if you follow my suggestion, would return false. Anyway in
> your case resv_msi should be false.
I agree its an overkill if resv_msi is guaranteed to be false. What I am 
unsure about is that, if iommu have IOMMU_RESV_MSI regions that would 
mean that irq domains are selected in the build. If this is not 
guaranteed, then we need to add this check.

> 
> Thanks
> 
> Eric

BR,
Yousaf

  reply	other threads:[~2017-03-02 12:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 10:01 [PATCH 1/2] irqdomain: add empty irq_domain_check_msi_remap Mian Yousaf Kaukab
2017-03-02 10:01 ` [PATCH 2/2] vfio: type1: conditionally check MSI remapping at irq domain level Mian Yousaf Kaukab
2017-03-02 10:19   ` Marc Zyngier
2017-03-02 10:24   ` Auger Eric
2017-03-02 12:38     ` Mian Yousaf Kaukab [this message]
2017-03-02 13:46       ` Auger Eric
2017-03-02 15:01         ` Mian Yousaf Kaukab
2017-03-02 10:16 ` [PATCH 1/2] irqdomain: add empty irq_domain_check_msi_remap Marc Zyngier
2017-03-02 10:29   ` Auger Eric
2017-03-02 10:24 ` Auger Eric
2017-03-02 12:23   ` Mian Yousaf Kaukab
2017-03-02 13:12     ` Auger Eric
2017-03-02 13:31       ` Mian Yousaf Kaukab

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=4304c447-0523-08a0-3327-e974bedc3c73@suse.com \
    --to=yousaf.kaukab@suse.com \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=will.deacon@arm.com \
    /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