From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Jan Beulich <JBeulich@suse.com>,
Sander Eikelenboom <linux@eikelenboom.it>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Keir Fraser <keir@xen.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [RESEND] Re: [PATCH RFC 2/2] AMD IOMMU: allow command line overrides for broken IVRS tables
Date: Wed, 28 Aug 2013 12:33:40 -0500 [thread overview]
Message-ID: <521E3474.9040308@amd.com> (raw)
In-Reply-To: <521E36AF02000078000EF2FD@nat28.tlf.novell.com>
On 8/28/2013 10:43 AM, Jan Beulich wrote:
>>>> On 28.08.13 at 16:59, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> wrote:
>> The current patch does not handle the case where the "handle" value is
>> mis-configured in the IVRS.
> Right, but I don't think we can handle all possible cases here.
>
> And in any case (not the least because your patch seems to be
> incremental to my earlier one) - do you still see any issues with that
> one, or does the mail here represent sort of an ack to that earlier
> one (in its split form - as indicated earlier, I broke out the actual
> bug fixes from the workaround, which really is an enhancement)?
With the previous 2 patches, it would work fine for the case when the
IVHD special is missing for an IOAPIC.
The code looks fine, but I don't have such systems which I can test on.
If it's working for Sander,
then I think it should be sufficient testing.
Acked-by: Suravee Suthikulpanit <suravee.suthikulapanit@amd.com>
However, it is not handling the case (which I have seen a lot) where,
the special->handle is bad, but the special->used_id is ok. For this case,
we should be able to match the used_id to the BDF values given by users.
That's what my patch is trying to handle (but apparently failed... see
below).
>
>> I have also included the patch which has additional check. Below is the
>> output from the patch.
>>
>> (XEN) AMD-Vi: IVHD Device Entry: type 0x48 id 0 flags 0xd7
>> (XEN) AMD-Vi: IVHD Special: 0000:00:14.0 variety 0x1 handle 0xff used_id
>> 0xa0
>> (XEN) AMD-Vi: IVHD Special: Usinging command override value for IO-APIC 0x8, bdf=0xa0
>> (XEN) AMD-Vi: IVHD Device Entry: type 0x48 id 0 flags 0xd7
>> (XEN) AMD-Vi: IVHD Special: 0000:00:14.0 variety 0x2 handle 0 used_id 0xa0
>> (XEN) AMD-Vi: IVHD Device Entry: type 0x48 id 0 flags 0
>> (XEN) AMD-Vi: IVHD Special: 0000:00:00.1 variety 0x1 handle 0xff used_id 0x1
>> (XEN) AMD-Vi: IVHD Special: Usinging command override value for IO-APIC 0x8, bdf=0xa0
>> (XEN) AMD-Vi: IOMMU 0 Enabled.
>> (XEN) I/O virtualisation enabled
> Which already indicates that you apparently only considered the
> single IO-APIC case, because on a multi IO-APIC system ...
Oops, my logic broke when I was cleaning up the code. I'll fix this. I
am planning to handle both IOAPICs.
>
>> @@ -715,29 +717,43 @@ static u16 __init parse_ivhd_device_special(
>> */
>> for ( apic = 0; apic < nr_ioapics; apic++ )
>> {
>> - if ( IO_APIC_ID(apic) != special->handle )
>> - continue;
>> + apic_id = special->handle;
>>
>> - if ( special->handle >= ARRAY_SIZE(ioapic_sbdf) )
>> + if ( IO_APIC_ID(apic) != apic_id )
> ... this would otherwise trigger on all IO-APICs but the one we're
> currently supposed to deal with ...
Sorry, logic got messed up during code clean up. I will send out the fix
shortly.
Suravee
next parent reply other threads:[~2013-08-28 17:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <521E36AF02000078000EF2FD@nat28.tlf.novell.com>
2013-08-28 17:33 ` Suravee Suthikulpanit [this message]
2013-08-29 6:22 ` [PATCH RFC 2/2] AMD IOMMU: allow command line overrides for broken IVRS tables 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=521E3474.9040308@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 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.