From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
suravee.suthikulpanit@amd.com
Subject: Re: [PATCH] AMD IOMMU: fail if there is no southbridge IO-APIC
Date: Fri, 07 Feb 2014 10:12:17 -0500 [thread overview]
Message-ID: <52F4F7D1.9020906@oracle.com> (raw)
In-Reply-To: <52F4B38C020000780011A15D@nat28.tlf.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 2525 bytes --]
On 02/07/2014 04:21 AM, Jan Beulich wrote:
> ... but interrupt remapping is requested (with per-device remapping
> tables). Without it, the timer interrupt is usually not working.
>
> Inspired by Linux'es "iommu/amd: Work around wrong IOAPIC device-id in
> IVRS table" (commit c2ff5cf5294bcbd7fa50f7d860e90a66db7e5059) by Joerg
> Roedel <joerg.roedel@amd.com>.
>
> Reported-by: Eric Houby <ehouby@yahoo.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Tested-by: Eric Houby <ehouby@yahoo.com>
>
> --- a/xen/drivers/passthrough/amd/iommu_acpi.c
> +++ b/xen/drivers/passthrough/amd/iommu_acpi.c
> @@ -984,6 +984,7 @@ static int __init parse_ivrs_table(struc
> const struct acpi_ivrs_header *ivrs_block;
> unsigned long length;
> unsigned int apic;
> + bool_t sb_ioapic = !iommu_intremap;
> int error = 0;
>
> BUG_ON(!table);
> @@ -1017,8 +1018,15 @@ static int __init parse_ivrs_table(struc
> /* Each IO-APIC must have been mentioned in the table. */
> for ( apic = 0; !error && iommu_intremap && apic < nr_ioapics; ++apic )
> {
> - if ( !nr_ioapic_entries[apic] ||
> - ioapic_sbdf[IO_APIC_ID(apic)].pin_2_idx )
> + if ( !nr_ioapic_entries[apic] )
> + continue;
> +
> + if ( !ioapic_sbdf[IO_APIC_ID(apic)].seg &&
> + /* SB IO-APIC is always on this device in AMD systems. */
> + ioapic_sbdf[IO_APIC_ID(apic)].bdf == PCI_BDF(0, 0x14, 0) )
> + sb_ioapic = 1;
> +
> + if ( ioapic_sbdf[IO_APIC_ID(apic)].pin_2_idx )
> continue;
>
> if ( !test_bit(IO_APIC_ID(apic), ioapic_cmdline) )
I don't know whether 0:14:0 is set in stone, I don't remember seeing
anywhere that this is architectural.
In the (unlikely) event that it is moved somewhere else will the user be
able to overwrite where it is? Do you
think that sb_ioapic may need to be set to true if appropriate bit is
set in ioapic_cmdline?
-boris
> @@ -1041,6 +1049,14 @@ static int __init parse_ivrs_table(struc
> }
> }
>
> + if ( !error && !sb_ioapic )
> + {
> + if ( amd_iommu_perdev_intremap )
> + error = -ENXIO;
> + printk("%sNo southbridge IO-APIC found in IVRS table\n",
> + amd_iommu_perdev_intremap ? XENLOG_ERR : XENLOG_WARNING);
> + }
> +
> return error;
> }
>
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 3566 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-02-07 15:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 9:21 [PATCH] AMD IOMMU: fail if there is no southbridge IO-APIC Jan Beulich
2014-02-07 10:41 ` Andrew Cooper
2014-02-07 15:12 ` Boris Ostrovsky [this message]
2014-02-07 15:23 ` Jan Beulich
2014-02-07 15:38 ` Boris Ostrovsky
2014-02-07 15:50 ` Jan Beulich
2014-02-07 16:03 ` Boris Ostrovsky
2014-02-07 16:12 ` Jan Beulich
2014-02-07 17:14 ` Suravee Suthikulpanit
2014-02-10 5:33 ` Suravee Suthikulpanit
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=52F4F7D1.9020906@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xenproject.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.