All of lore.kernel.org
 help / color / mirror / Atom feed
From: Malcolm Crossley <malcolm.crossley@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, andrew.cooper3@citrix.com,
	xen-devel@lists.xen.org, paul.durrant@citrix.com,
	Aravind.Gopalakrishnan@amd.com, suravee.suthikulpanit@amd.com,
	yang.z.zhang@intel.com
Subject: Re: [PATCH v3] IOMMU: Prevent VT-d device IOTLB operations on wrong IOMMU
Date: Tue, 17 Jun 2014 17:15:15 +0100	[thread overview]
Message-ID: <53A06993.9010608@citrix.com> (raw)
In-Reply-To: <53A07589020000780001B253@mail.emea.novell.com>

On 17/06/14 16:06, Jan Beulich wrote:
>>>> On 17.06.14 at 16:37, <malcolm.crossley@citrix.com> wrote:
>> --- a/xen/drivers/passthrough/vtd/x86/ats.c
>> +++ b/xen/drivers/passthrough/vtd/x86/ats.c
>> @@ -120,6 +120,10 @@ int dev_invalidate_iotlb(struct iommu *i
>>      {
>>          sid = (pdev->bus << 8) | pdev->devfn;
>>  
>> +        /* Only invalidate devices that belong to this IOMMU */
>> +        if ( !pdev->iommu || pdev->iommu != iommu )
>> +            continue;
> 
> I meant to ask before and then forgot: What is the first half of this
> condition good/needed for?
>
Defensive coding to prevent a NULL pointer deference if the Intel or
core ATS code goes wrong.

Malcolm

> Jan
> 

  reply	other threads:[~2014-06-17 16:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 14:37 [PATCH v3] IOMMU: Prevent VT-d device IOTLB operations on wrong IOMMU Malcolm Crossley
2014-06-17 15:06 ` Jan Beulich
2014-06-17 16:15   ` Malcolm Crossley [this message]
2014-06-18 10:18     ` Jan Beulich
2014-06-18 10:24       ` Malcolm Crossley
2014-06-18 10:36         ` Jan Beulich

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=53A06993.9010608@citrix.com \
    --to=malcolm.crossley@citrix.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=kevin.tian@intel.com \
    --cc=paul.durrant@citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yang.z.zhang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.