All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen ARM - Exposing a PL011 to the guest
@ 2016-11-30 15:29 Julien Grall
  2016-11-30 16:24 ` Christoffer Dall
                   ` (2 more replies)
  0 siblings, 3 replies; 49+ messages in thread
From: Julien Grall @ 2016-11-30 15:29 UTC (permalink / raw)
  To: Xen Devel, Stefano Stabellini
  Cc: Bhupinder Thakur, Ian Jackson, Wei Liu, Christoffer Dall, Steve Capper

Hi all,

Few months ago, Linaro has published the version 2 of the VM 
specification [1].

For those who don't know, the specification provides guidelines to 
guarantee a compliant OS images could run on various hypervisor (e.g 
Xen, KVM).

Looking at the specification, it will require Xen to expose new devices 
to the guest: pl011, rtc, persistent flash (for UEFI variables).

The RTC and persistent will only be used by the UEFI firwmare. The 
firwmare is custom made for Xen guest and be loaded by the toolstack, so 
we could theoretically provide PV drivers for those.

This is not the case for the PL011. The guest will be shipped with a 
PL011/SBSA UART driver,.This means it will expect to access it through MMIO.

So we have to emulate a PL011. The question is where? Before suggesting 
some ideas, the guest/user will expect to be able to interact with the 
console through the UART. This means that the UART and xenconsoled needs 
to communicate together.

I think we can distinct two places where the PL011 could be emulated:
in the hypervisor, or outside the hypervisor.

Emulating the UART in the hypervisor means that we take the risk to 
increase to the attack surface of Xen if there is a bug in the emulation 
code. The attack surface could be reduced by emulating the UART in 
another exception level (e.g EL1, EL0) but still under the control of 
the hypervisor. Usually the guest is communicating between with 
xenconsoled using a ring. For the first console this could be discovered 
using hypercall HVMOP_get_param. For the second and onwards, it 
described in xenstore. I would not worry too much about emulating 
multiple PL011s, so we could implement the PV frontend in Xen.

Emulating the UART outside the hypervisor (e.g in DOM0 or special 
domain) would require to bring the concept of ioreq server on ARM. Which 
left the question where do we emulate the PL011? The best place would be 
xenconsoled. But I am not sure how would be the security impact here. 
Does all guest consoles are emulated within the same daemon?

I would lean towards the first solution if we implement all the security 
safety I mentioned. Although, the second solution would be a good move 
if we decide to implement more devices (e.g RTC, pflash) in the future.

Do you have any opinions?

Cheers,

[1] 
http://people.linaro.org/~christoffer.dall/VMSystemSpecificationForARM-v2.0-rc1.pdf

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2017-02-23 15:00 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-30 15:29 Xen ARM - Exposing a PL011 to the guest Julien Grall
2016-11-30 16:24 ` Christoffer Dall
2016-12-01 15:51   ` Julien Grall
2016-11-30 17:02 ` Volodymyr Babchuk
2016-11-30 22:26 ` Stefano Stabellini
2016-12-01 10:26   ` Christoffer Dall
2016-12-01 21:55     ` Stefano Stabellini
2016-12-16 10:06       ` Bhupinder Thakur
2016-12-16 17:03         ` Julien Grall
2016-12-19 12:20           ` Christoffer Dall
2016-12-19 20:24             ` Stefano Stabellini
2016-12-20  9:46               ` Bhupinder Thakur
2016-12-20 22:29                 ` Stefano Stabellini
2016-12-20 12:32               ` Julien Grall
2016-12-20 19:53                 ` Stefano Stabellini
2016-12-20 20:26                   ` Stefano Stabellini
2016-12-21 19:19                   ` Julien Grall
2016-12-21 22:12                     ` Stefano Stabellini
2016-12-28 17:49                       ` Julien Grall
2016-12-28 17:52                         ` Julien Grall
2016-12-29  9:17                         ` Bhupinder Thakur
2017-01-03 20:08                           ` Stefano Stabellini
2017-01-06 10:18                             ` Bhupinder Thakur
2017-01-06 21:54                               ` Stefano Stabellini
2017-01-10 11:39                                 ` Bhupinder Thakur
2017-01-11  0:22                                   ` Stefano Stabellini
2017-01-17 14:01                                 ` Julien Grall
2017-01-17 13:31                             ` Julien Grall
2017-01-17 19:27                               ` Stefano Stabellini
2017-01-27 12:14                                 ` Bhupinder Thakur
2017-01-27 19:13                                   ` Stefano Stabellini
2017-01-29 11:06                                   ` Christoffer Dall
2017-02-03 13:53                                     ` Bhupinder Thakur
2017-02-03 14:08                                       ` Julien Grall
2017-02-08 12:39                                         ` Bhupinder Thakur
2017-02-09  0:10                                           ` Stefano Stabellini
2017-02-13  8:50                                             ` Bhupinder Thakur
2017-02-13 21:44                                               ` Stefano Stabellini
2017-02-15  8:15                                                 ` Bhupinder Thakur
2017-02-15  8:24                                                   ` Bhupinder Thakur
2017-02-15 21:21                                                     ` Stefano Stabellini
2017-02-23 13:15                                                       ` Bhupinder Thakur
2017-02-23 15:00                                                         ` Wei Liu
2017-02-03 14:15                                       ` Christoffer Dall
2017-01-03 19:38                         ` Stefano Stabellini
2016-12-20 12:47               ` Christoffer Dall
2016-12-20 21:33                 ` Stefano Stabellini
2016-12-21 11:55                   ` Christoffer Dall
2016-12-21 20:32                   ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.