From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH v2] Intel IOMMU patch to reprocess RMRR info Date: Fri, 28 Sep 2012 07:21:53 -0600 Message-ID: <1348838513.2320.288.camel@ul30vt.home> References: <20120918164955.12296.28799.sendpatchset@tmingo.houston.hp.com> <1348778200.2320.241.camel@ul30vt.home> <9774516974AF5F4C8A2C3C69CD3412332338F452@G1W3651.americas.hpqcorp.net> <1348781647.2320.264.camel@ul30vt.home> <20120928094301.GH10549@amd.com> <1348836008.2320.284.camel@ul30vt.home> <20120928125246.GK10549@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120928125246.GK10549-5C7GfCeVMHo@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Joerg Roedel Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "Khan, Shuah" , David Woodhouse , "Mingarelli, Thomas" List-Id: iommu@lists.linux-foundation.org On Fri, 2012-09-28 at 14:52 +0200, Joerg Roedel wrote: > On Fri, Sep 28, 2012 at 06:40:08AM -0600, Alex Williamson wrote: > > On Fri, 2012-09-28 at 11:43 +0200, Joerg Roedel wrote: > > > > I don't think so. The concept of RMRR is just not defined well enough > > > (like the concept of unity mappings on the AMD side which is similar to > > > RMRR). The definition says, that any memory region must be mapped at > > > any time for the device. But that is not true (at least I have no > > > counter-example yet). The right definition would be, that the RMRR > > > regions are only necessary as long as the operating system does not > > > control the particular device. And assigning a device to a guest also > > > counts a 'taking control over the device'. > > > > I think HP folks would be very unhappy with that definition. As David > > indicates, that's how things like USB use RMRR, but the actual > > definition in the spec leaves much more room for abuse. Thanks, > > To my experience, for a hardware designer, existing software overrides > any Spec because it is much worse to break existing software than it is > to break a Spec :) So, unless we break existing hardware/firmware, I > still suggest that we use the assumption that OS controlled devices do > not need RMRR/unity-mapped regions anymore. HP has been shipping hardware that makes use of RMRRs for other purposes for a while. > Is HP doing anything in their firmware which would not work with that? Yes, I'll let them fill in the details. > For the USB controlers, they only generate DMA to the RMRR/unity-mapped > region until the OS takes over control from the firmware. After > the USB driver is initialized the RMRR region should not be necessary > anymore. I agree that was probably the intent, but vendors have found loopholes as their opportunity to innovate. Thanks, Alex