xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: suravee.suthikulpanit@amd.com, xen-devel@lists.xen.org,
	jbeulich@suse.com
Subject: Re: [PATCH v3] AMD IOMMU: Introduce support for IVHD block type 11h
Date: Thu, 26 May 2016 11:15:29 +0100	[thread overview]
Message-ID: <5746CCC1.2040702@citrix.com> (raw)
In-Reply-To: <1464231047-11223-1-git-send-email-suravee.suthikulpanit@amd.com>

On 26/05/16 03:50, suravee.suthikulpanit@amd.com wrote:
> From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
>
> Along with the IVHD block type 10h, newer AMD platforms also come with
> types 11h, which is a superset of the older one. Having multiple IVHD
> block types in the same platform allows backward compatibility of newer
> systems to work with existing drivers.  The driver should only parse
> the highest-level (newest) type of IVHD block that it can support.
> However, the current driver returns error when encounters with unknown
> IVHD block type. This causes existing driver to unnecessarily fail IOMMU
> initialization on new systems.
>
> This patch introduces a new logic, which scans through IVRS table looking
> for the highest-level supporsted IVHD block type. It also adds support
> for the new IVHD block type 11h. More information about the IVHD type 11h
> can be found in the AMD I/O Virtualization Technology (IOMMU) Specification
> rev 2.62.
>
>     http://support.amd.com/TechDocs/48882_IOMMU.pdf
>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> with two minor
style issues (which can be fixed on commit if necessary).

> @@ -978,6 +966,25 @@ static void __init dump_acpi_table_header(struct acpi_table_header *table)
>  
>  }
>  
> +#define to_ivhd_block(hdr) \
> +    container_of(hdr, const struct acpi_ivrs_hardware, header)
> +#define to_ivmd_block(hdr) \
> +    container_of(hdr, const struct acpi_ivrs_memory, header)
> +
> +static inline bool_t is_ivhd_block(u8 type)
> +{
> +    return ( type == ACPI_IVRS_TYPE_HARDWARE ||
> +             type == ACPI_IVRS_TYPE_HARDWARE_11H );
> +}
> +
> +static inline bool_t is_ivmd_block(u8 type) \

Stray \

> @@ -1102,15 +1110,16 @@ static int __init get_last_bdf_ivhd(
>  {
>      const union acpi_ivhd_device *ivhd_device;
>      u16 block_length, dev_length;
> +    size_t hdr_size = get_ivhd_header_size(ivhd_block) ;

Stray space.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-05-26 10:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  2:50 [PATCH v3] AMD IOMMU: Introduce support for IVHD block type 11h suravee.suthikulpanit
2016-05-26 10:15 ` Andrew Cooper [this message]
2016-05-27 13:06 ` 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=5746CCC1.2040702@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=suravee.suthikulpanit@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 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).