[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/12] xen/arm: if is_domain_direct_mapped use native UART address for vPL011


  • To: Julien Grall <julien@xxxxxxx>
  • From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
  • Date: Fri, 8 May 2020 17:07:17 -0700 (PDT)
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=epam.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XojeCPjyUHJaldrlTDJ9nO2YyaD6JRL0I9Lrsh9Rm68=; b=Qlm4O3ErfjYrX1XZvmYvwGemPUZEYnqtgAKazOBSEwyWAW/UX4CIUkos/AfkDsTDszRWw43zFBIJ3UkFXgfznx6gNM7VmESpCNyTL4Vqm7AYfm56cC0uVuHxFdvxoINMYnIIFlMwYYqMLJI6eEjfSdFhJSTPxKyp2L25Hn03+ioF02sfAQPmBH1y4spknw5Nyj5Yc2SkK1puKq+GNw+GIxTI2+ZFg5DidjmW87Osu9u778fCx+0cyeCgsBengWRf1ryL7etmlXXnX7WLuCkTct7NEMmmhC4EVr/U09KE7+5BlVHIlhDOMu+w27q5m6RmJLtWE0SczIZ9Ob6zTt6FbA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R7HVosScciPnnBGfHsRzlbBRGX/aCtR7cEwz97ZZXRN4ZlPlWmYJsgcc4rpPlo6NU5jGqfCZg2rj8eRn4XOcvoR26Mgs14uDfd1jZsOQwF90ZRmPEhyA7xwVJPWeBgh/+NcNvJHX0R7PNiU3vON4gKW9GonyFuGNVSpnOwW9nhGeMeD+Gib5GpP/UgYjTSAp7JicQObblifRvllTMWiFCztGb+fNGUnitXsIauUufWOfrPd2cAHqYRwcUl+M7eYyB1HIRPCny4DCMSuXEOSeRW+LYTk+lh2XWV9MjbngeD7s2+KJLkGZnAV32dLtlCwUJwmx66slWZ9c68N6X4VINw==
  • Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; epam.com; dkim=none (message not signed) header.d=none;epam.com; dmarc=bestguesspass action=none header.from=xilinx.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr_Babchuk@xxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
  • Delivery-date: Sat, 09 May 2020 00:07:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, 1 May 2020, Julien Grall wrote:
> On 01/05/2020 02:26, Stefano Stabellini wrote:
> > On Wed, 15 Apr 2020, Julien Grall wrote:
> > > Hi Stefano,
> > > 
> > > On 15/04/2020 02:02, Stefano Stabellini wrote:
> > > > We always use a fix address to map the vPL011 to domains. The address
> > > > could be a problem for domains that are directly mapped.
> > > > 
> > > > Instead, for domains that are directly mapped, reuse the address of the
> > > > physical UART on the platform to avoid potential clashes.
> > > 
> > > How do you know the physical UART MMIO region is big enough to fit the
> > > PL011?
> > 
> > That cannot be because the vPL011 MMIO size is 1 page, which is the
> > minimum right?
> 
> No, there are platforms out with multiple UARTs in the same page (see sunxi
> for instance).

But if there are multiple UARTs sharing the same page, and the first one
is used by Xen, there is no way to assign one of the secondary UARTs to
a domU. So there would be no problem choosing the physical UART address
for the virtual PL011.
 
 
> > > What if the user want to assign the physical UART to the domain + the
> > > vpl011?
> > 
> > A user can assign a UART to the domain, but it cannot assign the UART
> > used by Xen (DTUART), which is the one we are using here to get the
> > physical information.
> > 
> > 
> > (If there is no UART used by Xen then we'll fall back to the virtual
> > addresses. If they conflict we return error and let the user fix the
> > configuration.)
> 
> If there is no UART in Xen, how the user will know the addresses conflicted?
> Earlyprintk?

That's a good question. Yes, I think earlyprintk would be the only way.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.