All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Keir (Xen.org)" <keir@xen.org>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Jacob Shin <jacob.shin@amd.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Suravee Suthikulanit <suravee.suthikulpanit@amd.com>,
	Sherry Hurwitz <sherry.hurwitz@amd.com>
Subject: Re: [PATCH v3] AMD/intremap: Prevent use of per-device vector maps until irq logic is fixed
Date: Mon, 17 Jun 2013 11:01:14 +0100	[thread overview]
Message-ID: <51BEDE6A.1080103@citrix.com> (raw)
In-Reply-To: <51BEEC3402000078000DEBCF@nat28.tlf.novell.com>

On 17/06/13 10:00, Jan Beulich wrote:
>>>> On 17.06.13 at 10:55, George Dunlap <george.dunlap@eu.citrix.com> wrote:
>> On 15/06/13 02:13, Suravee Suthikulanit wrote:
>>> On 6/10/2013 7:25 AM, Jan Beulich wrote:
>>>>>>> On 04.06.13 at 18:38, Andrew Cooper <andrew.cooper3@citrix.com> 
>>>>>>> wrote:
>>>>> XSA-36 changed the default vector map mode from global to 
>>>>> per-device.  This is
>>>>> because a global vector map does not prevent one PCI device from
>>>>> impersonating
>>>>> another and launching a DoS on the system.
>>>>>
>>>>> However, the per-device vector map logic is broken for devices with 
>>>>> multiple
>>>>> MSI-X vectors, which can either result in a failed ASSERT() or 
>>>>> misprogramming
>>>>> of a guests interrupt remapping tables.  The core problem is not 
>>>>> trivial to
>>>>> fix.
>>>>>
>>>>> In an effort to get AMD systems back to a non-regressed state, 
>>>>> introduce a
>>>>> new
>>>>> type of vector map called per-device-global.  This uses per-device 
>>>>> vector maps
>>>>> in the IOMMU, but uses a single used_vector map for the core IRQ logic.
>>>>>
>>>>> This patch is intended to be removed as soon as the per-device logic 
>>>>> is fixed
>>>>> correctly.
>>>>>
>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>> Suravee, Jacob,
>>>>
>>>> no opinion on this at all? I've been talked into considering this
>>>> acceptable
>>> Sorry for late reply, and for having missed this conversation previously.
>>>
>>> If we have to go with this solution temporary until we have the 
>>> permanent fix.
>>> I think that is okay with me.  Although, would you mind pointing out 
>>> the affect
>>> of having "per-device" vs. "global" irq vector map?  I am not quite 
>>> familiar
>>> with the differences.
>>>
>>>> (with a small coding style fixup, and with the question on
>>>> the usefulness of the final warning message - imo redundant with the
>>>> immediately preceding message that is being left untouched)
>>> I also think the messages are quite confusing.  Actually, now that we 
>>> can have
>>> irq vector map and intremap map with different mode, we should be more 
>>> explicit
>>> in the message.
>>>
>>> Also, the message "Not overriding irq_vector_map setting" is confusing 
>>> to me.
>>>
>>> Would you mind considering the attached patch?  Here is the sample output
>>>
>>> (XEN) AMD-Vi: IOMMU 0 Enabled.
>>> (XEN) AMD-Vi BUG: per-device vector map logic is broken.  Using 
>>> per-device-global maps instead until a fix is found
>> At the very least it can't say BUG -- that needs to be reserved for 
>> things that actually cause the host to crash (a la BUG_ON()).
> That was worded this way in Andrew's original version of the patch
> too, and I had also already noted that this wording is too strong.
>
> Jan
>

I am not overly attached to the current wording, so feel free to tweak
if you wish.

As for my opinions of the revised patch:

The explicit print of the IOMMU mode is nice, although those in the know
could already work it out given the reference or lackthereof to XSA-36.

The explicit print of the vector map is wrong, and is liable to be
disappearing in 4.4 anyway.

On the face of it, the revised patch seems much more like a general
cleanup of the printing, rather than the temporary bugfix it is indented
to be.  I dont have a problem with the cleanup persay, but it should be
part of a separate patch.

~Andrew

  reply	other threads:[~2013-06-17 10:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 16:38 [PATCH v3] AMD/intremap: Prevent use of per-device vector maps until irq logic is fixed Andrew Cooper
2013-06-10 12:25 ` Jan Beulich
2013-06-14  8:45   ` Jan Beulich
2013-06-15  1:13   ` Suravee Suthikulanit
2013-06-17  8:19     ` Jan Beulich
2013-06-17  8:55     ` George Dunlap
2013-06-17  9:00       ` Jan Beulich
2013-06-17 10:01         ` Andrew Cooper [this message]
2013-06-26  9:54 ` Andrew Cooper
2013-06-26 23:28   ` Suravee Suthikulanit
2013-06-27  8:47     ` Jan Beulich
2013-06-27  9:13       ` Andrew Cooper
2013-06-27 11:20       ` 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=51BEDE6A.1080103@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=jacob.shin@amd.com \
    --cc=keir@xen.org \
    --cc=sherry.hurwitz@amd.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 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.