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

Re: Armv8A - use of Xen and hypervisor EL2 translation tables to extend bridge address span

  • To: Kris Chaplin <kris.chaplin@xxxxxxxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 20 Jan 2021 09:56:03 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=okplSXdWmuLnVdnNDYSmdSeVYvAORu/3lDCR90M3B8U=; b=UcjJfJ/nF/bj+OqEgnt9m9jj3KUyC9/nQvIyl+LmPoZmWvmZbBOwIRf6RxeAwSHvSSPxL1KYbL9JG4tAEs1yjc4QArbjk5yIhwVnP1kwKPUlmo41nJ0nboTlt4/IjLD+hL3d42Q2thYkCBYrqKkhAwoLfEJITF1xXLtVxq8L7vBajBc6SMtuHWmzWJIQO5VplvSKYqoFNBXxvOgofH6nRTADrY8CGjC9tyN15inFnvD+7OGFSHbqfo6Jo2yecxYJ3zOoLoHMPg8Gt+Im0SVZpEL3HYX5to/UIGxl+Ojg8zFh2qdrPCqjLQZBLyD/bCxLwnMrUAUSUlzYJLZoSDQl4w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTwuk4NAlIRinah0ghFBTCu8U5L/4FeEgPmOxIytSJWcFgMHVMXQKSPejlY0Fc2HXicwhIJMks5Nqhah4f344BNH73ocF+wFC96FLC807a8V0Acu18q9vszebnhWco/l4LZTT/bJB4QdTpSNn+HYJQsLlg/FEtGV7oD/4aRkEokOJhoSoM2d7R/Ovpg9UySFl1LSb2g32nMUb998BtS/cMhGx1MxuYPiEAjPshPRwpYwYSOo2W0e1wswEUM+qCbvVdNDJ7iC8InpHBzD1iLesMEgRFaZwcpfBoNQdaicXD1sApVbKNHsG00lxr3n6QwY8tNX3m0XCTHdaAgzBaCA3A==
  • Authentication-results-original: linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-users@xxxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 20 Jan 2021 09:57:09 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHW7OwHWgU8i6MuB0yrIGbtD5fajKowSxSA
  • Thread-topic: Armv8A - use of Xen and hypervisor EL2 translation tables to extend bridge address span

Hi Chris,

> On 17 Jan 2021, at 16:15, Kris Chaplin <kris.chaplin@xxxxxxxxxxxxxxx> wrote:
> Hello,
> I have a very specific challenge that I'm looking to solve, and I think that 
> a Hypervisor such as Xen, potentially with some modifications may help me get 
> there.
> In short, I have a ARM 64-bit v8A device (Cortex-A53) that has a bridge to 
> custom logic with a limited address span, and I'm looking to address more 
> range than this brige has capacity for in a way that is transparent to the 
> operating system.  In the hardware, I have a windowed controller that I can 
> control at run-time to expose a subset of the address space at any one time, 
> but never the full range.
> My thoughts are that in the OS, I could create a device tree to instantiate a 
> bridge to the address space that has range for the full capacity I'm looking 
> for at an unused portion of the IPA address map, and the use the hypervisor 
> to trap page faults to VTTBR0_EL2-mapped pages, get the hypervisor to steer 
> the windowed controller (if it is not already pointing to the correct window 
> being addressed) and then clear the page fault, and allow the OS to continue. 
>  In this way, the OS would be none-the-wiser to the existance of the windowed 
> controller, and software/drivers mapping to this bridge would use the 
> interface transparently (albeit with a performance hit).

>From the theory this is possible for sure.

> Perhaps I've not explained that too well.  It's quite a specific challenge, 
> that I would assume would require some customization of Xen.  Has anything 
> similar to this been done before, or can anyone point me in the direction of 
> if this is feasible, and where to research next?

You will need to implement a driver in Xen to do that and catch some accesses 
and play with mappings inside Xen.
There is not something doing exactly that in Xen but you could look at what the 
vPCI driver for Arm under development right now is doing:

In this the vpci is catching accesses from guest to the pci configuration space 
and is emulating them.

You might find some other examples of parts of Xen doing things like that in 
other places (like the GIC driver emulating accesses to part of the interrupt 

Hope that can help you start even though it does not fully do exactly the stuff 
you want.


> Appreciate the help.
> regards
> Kris



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