From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: linux@eikelenboom.it, xen-devel@lists.xen.org, keir@xen.org,
andrew.cooper3@citrix.com
Subject: Re: [PATCH V2] x86/AMD-Vi: Add additional check for invalid special->handle
Date: Thu, 29 Aug 2013 15:26:15 -0500 [thread overview]
Message-ID: <521FAE67.7080309@amd.com> (raw)
In-Reply-To: <521F11B602000078000EF4ED@nat28.tlf.novell.com>
On 8/29/2013 2:17 AM, Jan Beulich wrote:
>>>> On 28.08.13 at 19:34, <suravee.suthikulpanit@amd.com> wrote:
>> From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>>
>> This patch add an additional logic to check for the often case when the
>> special->handle is not initialized due to firmware bugs.
>> but the special->usedid is correct. If users overide this using the
>> command line option ivrs_ioapic, then it should use the value instead.
>> ---
>> This patch is supposed to follow the patches:
>> [Xen-devel] [PATCH RFC 2/2] AMD IOMMU: allow command line overrides for
>> broken IVRS tables
>>
>> Changes in V2:
>> - Fix logic to match the special->used_id with the value provided by users.
> As said in a previous reply - I'm convinced we can't fix things both
> ways with just a single command line option: We need to know
> which value to use as anchor (I'd generally think that ought to be
> the value inside the square backets) and which value to use as
> overrides.
>
> And since my earlier patch was inspired by the Linux one - I don't
> think Linux allows fixing up things the way you try to here either.
>
> Jan
>
Actually, on Linux, the it would try matching the handle (i.e. the value
in the square bracket). If it is specified via command line, it will
override the value in the IVRS. In case the entry contains the handle
value which is not list as IOAPIC in the ACPI APIC table, we should be
able to invalidate the entry. This same rule should also apply when
users specify invalid handle value. Also, I never see the case where
the special->used_id is incorrect. The other case I am seeing is when
the IVRS special entry is missing for IOAPIC, which this should already
be handled in your original patch.
I have also verified that this works on Linux. For example, on my
system, there are 2 IOAPICs with APIC ID 8 and 9 according to the ACPI
APIC table. However, in IVRS, the value in both special entries are
0xff. When I give the boot options "ivrs_ioapic[8]=00:14.0
ivrs_ioapic[9]=00:0.1", this allows IOMMU to initialize correctly.
Suravee
next prev parent reply other threads:[~2013-08-29 20:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 17:34 [PATCH V2] x86/AMD-Vi: Add additional check for invalid special->handle suravee.suthikulpanit
2013-08-29 7:17 ` Jan Beulich
2013-08-29 20:26 ` Suravee Suthikulpanit [this message]
2013-08-30 8:06 ` Jan Beulich
2013-08-30 20:35 ` Suravee Suthikulpanit
2013-09-04 9:57 ` Jan Beulich
2013-09-04 22:48 ` Suravee Suthikulpanit
2013-09-05 7:14 ` Jan Beulich
2013-09-11 22:31 ` Suravee Suthikulpanit
2013-09-12 7:11 ` Jan Beulich
2013-09-12 8:50 ` Jan Beulich
2013-09-12 18:02 ` Suravee Suthikulpanit
2013-09-12 18:03 ` 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=521FAE67.7080309@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=keir@xen.org \
--cc=linux@eikelenboom.it \
--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).