From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01000C3A5A9 for ; Sat, 2 May 2020 19:44:20 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B91BF20731 for ; Sat, 2 May 2020 19:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="tOS889RZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B91BF20731 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUy3L-00033T-7Z; Sat, 02 May 2020 19:43:59 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUy3J-00033N-RZ for xen-devel@lists.xenproject.org; Sat, 02 May 2020 19:43:57 +0000 X-Inumbo-ID: 42fdcb28-8cad-11ea-b07b-bc764e2007e4 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 42fdcb28-8cad-11ea-b07b-bc764e2007e4; Sat, 02 May 2020 19:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kW0zjqnP9wTG7XNLFLNKwa2GDumnd5MVp8hUu8yOTO8=; b=tOS889RZ4gH6WWmkCA3SePCKL9 aEfOptqFCfVByEScs91tnPy8LwnixqYI9kgCa1mWwdYvC+EglHkCDdSeBDv+rkHKjWN+bXgG/ogK3 wpSOTigpPg94TUdeJdkhAcJiyDq3bYGKdlljrOUEr4PZZML6Xgj5AixkAAWAjG2l5GsY=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUy3I-0004pG-F8; Sat, 02 May 2020 19:43:56 +0000 Received: from [54.239.6.185] (helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jUy3I-0005cz-7K; Sat, 02 May 2020 19:43:56 +0000 Subject: Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU To: Elliott Mitchell , Corey Minyard References: <20200501114201.GE9902@minyard.net> <20200502021647.GG9902@minyard.net> <4f6ef562-e213-8952-66d6-0f083bf8c593@xen.org> <20200502173529.GH9902@minyard.net> <20200502184836.GA96674@mattapan.m5p.com> From: Julien Grall Message-ID: <00800979-6202-b2c1-7e1f-d05184d187a6@xen.org> Date: Sat, 2 May 2020 20:43:53 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200502184836.GA96674@mattapan.m5p.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Roman Shaposhnik , jeff.kubascik@dornerworks.com, Julien Grall , xen-devel@lists.xenproject.org, Stefano Stabellini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi Elliott, On 02/05/2020 19:48, Elliott Mitchell wrote: > On Sat, May 02, 2020 at 12:35:29PM -0500, Corey Minyard wrote: >> On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: >>> >>> On 02/05/2020 03:16, Corey Minyard wrote: >>>> >>>> Nope. If you say 4096M of RAM, your issue is almost certainly DMA, but >>>> it's not (just) the Linux code. On the Raspberry Pi 4, several devices >>>> cannot DMA to above 1024M of RAM, but Xen does not handle this. The >>>> 1024M of RAM is a limitation you will have to live with until Xen has a >>>> fix. >>> >>> IIUC, dom0 would need to have some memory below 1GB for this to work, am I >>> correct? >> >> No. If I am understanding this correctly, all the memory in dom0 below >> 1GB would have to be physically below 1GB. >> >> The Linux patch set starts at: >> >> https://lore.kernel.org/linux-iommu/20191015174616.GO13874@arrakis.emea.arm.com/t/ >> > > Actually, things get worse. What if someone wants to run an X-server in > DomU and have a DomU accessing the graphics hardware? Really needs to be > a case of allocating DMA-capable memory means talking to Xen. I am confused, if you passthrough a device to your DomU then you most likely going to want to protect using an IOMMU. So are you talking with or without IOMMU? Lets imagine that you want to do without an IOMMU. The easiest way would be to direct-map your domain (e.g host physical == guest physical) because you require no modification in your guest. Only the toolstack and Xen would require modification. Stefano has been working on a solution in the dom0less case (see [1]). The approach is to let the user select the region of RAM to use for a given guest. > As pointed out in that discussion different boards are going to have the > DMA-borderline in different places. There could be enough variation that > it needs to be settable at run time. Then some boards might have some > DMA devices which can access all memory, and some which cannot (full-DMA > versus limited-DMA?). > > Cheers, [1] https://lore.kernel.org/xen-devel/91b9d1d9-6e6f-c8b9-55ac-a3477b20a17b@xen.org/T/#t -- Julien Grall