All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1/4] AMD IOMMU: don't BUG() when we don't have to
Date: Fri, 15 Feb 2013 12:34:42 -0500	[thread overview]
Message-ID: <511E71B2.7010007@oracle.com> (raw)
In-Reply-To: <511E6E3502000078000BED4A@nat28.tlf.novell.com>

On 02/15/2013 11:19 AM, Jan Beulich wrote:
> find_iommu_for_device() can easily return NULL instead, as all of its
> callers are prepared for that.

This patch is obsoleted by the second patch ("[PATCH 2/4] AMD IOMMU: 
cover all functions of a device even if ACPI only tells us of func 0"), 
isn't it?

-boris

>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
> +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
> @@ -32,8 +32,8 @@ struct amd_iommu *find_iommu_for_device(
>   {
>       struct ivrs_mappings *ivrs_mappings = get_ivrs_mappings(seg);
>   
> -    BUG_ON ( bdf >= ivrs_bdf_entries );
> -    return ivrs_mappings ? ivrs_mappings[bdf].iommu : NULL;
> +    return ivrs_mappings && bdf < ivrs_bdf_entries ? ivrs_mappings[bdf].iommu
> +                                                   : NULL;
>   }
>   
>   /*
>
>
>

  reply	other threads:[~2013-02-15 17:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 16:13 [PATCH 0/4] AMD IOMMU: misc adjustments Jan Beulich
2013-02-15 16:19 ` [PATCH 1/4] AMD IOMMU: don't BUG() when we don't have to Jan Beulich
2013-02-15 17:34   ` Boris Ostrovsky [this message]
2013-02-18  7:58     ` Jan Beulich
2013-02-15 16:20 ` [PATCH 2/4] AMD IOMMU: cover all functions of a device even if ACPI only tells us of func 0 Jan Beulich
2013-02-15 17:21   ` Boris Ostrovsky
2013-02-18  8:00     ` Jan Beulich
2013-02-15 16:21 ` [PATCH 3/4] IOMMU, AMD Family15h Model10-1Fh erratum 746 Workaround Jan Beulich
2013-02-25 21:33   ` Suravee Suthikulanit
2013-02-26  7:42     ` Jan Beulich
2013-02-15 16:22 ` [PATCH 4/4] AMD IOMMU: use __ioapic_read_entry() instead of open coding it Jan Beulich
2013-02-15 17:28   ` Boris Ostrovsky

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=511E71B2.7010007@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=sherry.hurwitz@amd.com \
    --cc=xen-devel@lists.xen.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 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.