From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 12/13] xen/arm: Add the property "protected-devices" in the hypervisor node Date: Thu, 03 Apr 2014 22:51:03 +0100 Message-ID: <533DD7C7.8090803@linaro.org> References: <1394552999-14171-1-git-send-email-julien.grall@linaro.org> <1394552999-14171-13-git-send-email-julien.grall@linaro.org> <1395161280.11824.21.camel@kazak.uk.xensource.com> <5328A7E3.3070402@linaro.org> <1395225206.10203.43.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WVpXO-0006Hv-UC for xen-devel@lists.xenproject.org; Thu, 03 Apr 2014 21:51:07 +0000 Received: by mail-wi0-f173.google.com with SMTP id z2so189253wiv.0 for ; Thu, 03 Apr 2014 14:51:04 -0700 (PDT) In-Reply-To: <1395225206.10203.43.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, Sorry, I forgot to answer to this email... On 19/03/14 10:33, Ian Campbell wrote: > On Tue, 2014-03-18 at 20:09 +0000, Julien Grall wrote: >> Hi Ian, >> >> On 03/18/2014 04:48 PM, Ian Campbell wrote: >>> On Tue, 2014-03-11 at 15:49 +0000, Julien Grall wrote: >>>> DOM0 is using the swiotlb to bounce DMA. With the IOMMU support in Xen, >>>> protected devices should not use it. >>>> >>>> Only Xen is abled to know if an IOMMU protects the device. The new property >>>> "protected-devices" is a list of device phandles protected by an IOMMU. >>>> >>>> Signed-off-by: Julien Grall >>>> >>>> --- >>>> This patch *MUST NOT* be applied until we agreed on a device binding >>>> the device tree folks. DOM0 can run safely with swiotlb on protected >>>> devices while LVM is not used for guest disk. >>> >>> LVM works these days I think. >> >> With this patch series applied, LVM will be broken if the hard drive is >> protected by an IOMMU. > > How/why? If the guest is using LVM for its block, bouncing via the swiotlb with IOMMU enabled will result to wrong mapping. If I remember correctly it's because SWIOTLB DMA address is a physical address and not an IPA. So the IOMMU will rejected the request. So we have to by-pass swiotlb in this case. > >> It's the case on midway, the platform will crash just after the guest >> begins to boot. > > This configuration works today (osstest tests it) so this would be a > regression. Can you sort this please? As said above with IOMMU enabled I won't be able to sort it until my patch series for Linux will be upstreamed. Regards, -- Julien Grall