Skip to contentSkip to conversation

new PV drivers

Xen Hackathon Stefano Stabellini 6 participants 13 messages Jun 3, 2014 – Jun 9, 2014

lore
Share & tools
lore
#0 lore raw

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?
* Where should they live?

New PV Drivers, GlobalLogic has done:
- PV tiny-ALSA, very simple forwarding, backend in Linux, frontend is userspace, stand-alone. Could be in their own git tree on xenbits.
- Made old PV USB patches working, backend and frontend in Linux.
- Improved PVFB: do they use the backend in QEMU? Can be upstreamed?
- PV WPA supplicant, WIP with simple frontend and backend in Linux.

IPU support (TI). We need Remote Proc Framework working on Xen:
http://lwn.net/Articles/489009/
We need PV Remote Proc to have HD video reproduction in Android. We could use an IOMMU to assign the IPU to the domU but the IPU is not behind an IOMMU.
We could use a PV protocol to assign the IPU to one domain, using Remove Proc to talk to the other DomU.
The PV protocol would be a simple protocol to assign the IPU to one domain only.
Dom0 could allocate the initial memory for IPU, we are sure it is contiguous in machine memory because it is mapped 1:1.
Dom0 need to translate the addresses on behalf of the guest. A limited IOMMU is present between IPU and main memory. Dom0 could program it with the memory for the IPU.

GPU support. At the moment GlobalLogic is mapping memory and irqs into the guest. Possibility of creating a frontend/backend protocol.
We could virtualize GPU similarly to the ALSA protocol: virtual EGL or OpenGL ES.

David: new PV protocols need a standard state machine, we should document what a basic PV protocol looks like.

IanC: what about the security implication of assigning GPU and IPU to guests? Is that a problem?
Andrii: For now, it is acceptable.

#1 lore raw
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

VirtIO has a RNG [1] -- has anyone got any interest in a PV protocol for Xen that does the same?

[1] http://wiki.qemu-project.org/Features-Done/VirtIORNG

cheers,
Anil

#2 lore raw
Quoted 5 lines · Anil Madhavapeddy
Quoted 2 lines · Stefano Stabellini

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

+1. We’ve been making do, but a portable source of useful entropy for PV guests would be very handy.

- Adam

#3 lore raw
In reply to Anil Madhavapeddy
Quoted 14 lines · Anil Madhavapeddy
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

Quoted 7 lines

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

VirtIO has a RNG [1] -- has anyone got any interest in a PV protocol for Xen that does the same?

IMHO support for these sorts of things is actually one of the few good reasons to be considering support for basic virtio on Xen.

Alternatively AIUI a bunch of these sort of virtio devices are just protocols built on top of virtio_serial, so we could perhaps be thinking of repurposing them over Xen's serial PV device. Dave S was investigating the difference between libvirt "serial" and "channel" recently and AIUI the difference was that a channel could be named in order to support bindings to these higher level things (i.e. appearing to the guest as /dev/rng instead of /dev/hvcN).

Ian.

Quoted 11 lines

[1] http://wiki.qemu-project.org/Features-Done/VirtIORNG

cheers,
Anil

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw
Quoted 26 lines · Ian Campbell
Quoted 14 lines · Anil Madhavapeddy
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

Quoted 7 lines

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

VirtIO has a RNG [1] -- has anyone got any interest in a PV protocol for Xen that does the same?

IMHO support for these sorts of things is actually one of the few good reasons to be considering support for basic virtio on Xen.

Quoted 7 lines

Alternatively AIUI a bunch of these sort of virtio devices are just protocols built on top of virtio_serial, so we could perhaps be thinking of repurposing them over Xen's serial PV device. Dave S was investigating the difference between libvirt "serial" and "channel" recently and AIUI the difference was that a channel could be named in order to support bindings to these higher level things (i.e. appearing to the guest as /dev/rng instead of /dev/hvcN).

However writing a good PV-RNG should be far easier than making virtio work properly with Xen PV guests.

#5 lore raw
Quoted 35 lines · Stefano Stabellini
Quoted 26 lines · Ian Campbell
Quoted 14 lines · Anil Madhavapeddy
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

Quoted 7 lines

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

VirtIO has a RNG [1] -- has anyone got any interest in a PV protocol for Xen that does the same?

IMHO support for these sorts of things is actually one of the few good reasons to be considering support for basic virtio on Xen.

Quoted 7 lines

Alternatively AIUI a bunch of these sort of virtio devices are just protocols built on top of virtio_serial, so we could perhaps be thinking of repurposing them over Xen's serial PV device. Dave S was investigating the difference between libvirt "serial" and "channel" recently and AIUI the difference was that a channel could be named in order to support bindings to these higher level things (i.e. appearing to the guest as /dev/rng instead of /dev/hvcN).

Quoted 2 lines

However writing a good PV-RNG should be far easier than making virtio work properly with Xen PV guests.

True. I was mostly thinking about the trivial ones which didn't need zero copy/DMA which might have made it simpler.

In any case as I said I think most of the interesting little ones are actually based on the virtio-serial so making them work over xen PV console channels should be pretty easy.

Ian.

#6 lore raw
In reply to Stefano Stabellini
Quoted 14 lines · Stefano Stabellini
Quoted 13 lines · Ian Campbell
Quoted 12 lines · Anil Madhavapeddy
Quoted 10 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

Is entropy provided by drivers/char/random.c not sufficient?

-boris

Quoted 15 lines
Quoted 6 lines
Quoted 3 lines

VirtIO has a RNG [1] -- has anyone got any interest in a PV protocol for Xen that does the same?

IMHO support for these sorts of things is actually one of the few good reasons to be considering support for basic virtio on Xen.

Quoted 7 lines

Alternatively AIUI a bunch of these sort of virtio devices are just protocols built on top of virtio_serial, so we could perhaps be thinking of repurposing them over Xen's serial PV device. Dave S was investigating the difference between libvirt "serial" and "channel" recently and AIUI the difference was that a channel could be named in order to support bindings to these higher level things (i.e. appearing to the guest as /dev/rng instead of /dev/hvcN).

However writing a good PV-RNG should be far easier than making virtio work properly with Xen PV guests.

#7 lore raw
Quoted 15 lines · Boris Ostrovsky
Quoted 14 lines · Stefano Stabellini
Quoted 13 lines · Ian Campbell
Quoted 12 lines · Anil Madhavapeddy
Quoted 10 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

Is entropy provided by drivers/char/random.c not sufficient?

This is about providing entropy for that driver to consume.

VMs typically don't have much hardware and therefore don't have much entropy to seed the pool with.

Ian.

#8 lore raw
Quoted 22 lines · Ian Campbell
Quoted 21 lines · Boris Ostrovsky
Quoted 19 lines · Stefano Stabellini
Quoted 18 lines · Ian Campbell
Quoted 17 lines · Anil Madhavapeddy
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

Quoted 5 lines
Quoted 1 line

Is entropy provided by drivers/char/random.c not sufficient?

This is about providing entropy for that driver to consume.

VMs typically don't have much hardware and therefore don't have much entropy to seed the pool with.

So this is about seeding, not feeding? (sorry, did not mean to start rhyming ;-)).

-boris

#9 lore raw
Quoted 23 lines · Boris Ostrovsky
Quoted 22 lines · Ian Campbell
Quoted 21 lines · Boris Ostrovsky
Quoted 19 lines · Stefano Stabellini
Quoted 18 lines · Ian Campbell
Quoted 17 lines · Anil Madhavapeddy
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Is entropy provided by drivers/char/random.c not sufficient?

This is about providing entropy for that driver to consume.

VMs typically don't have much hardware and therefore don't have much entropy to seed the pool with.

So this is about seeding, not feeding? (sorry, did not mean to start rhyming ;-)).

TBH I'm not sure, I think it could be either or both...

Ian.

#10 lore raw
Quoted 23 lines · Ian Campbell
Quoted 22 lines · Boris Ostrovsky
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Boris Ostrovsky
Quoted 19 lines · Stefano Stabellini
Quoted 18 lines · Ian Campbell
Quoted 17 lines · Anil Madhavapeddy
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Is entropy provided by drivers/char/random.c not sufficient?

This is about providing entropy for that driver to consume.

VMs typically don't have much hardware and therefore don't have much entropy to seed the pool with.

So this is about seeding, not feeding? (sorry, did not mean to start rhyming ;-)).

TBH I'm not sure, I think it could be either or both...

Feeding is done by interrupt timing and block device access latency, both of which are happening in a guest. I don't know whether there is enough of that but perhaps before embarking on new PV driver it may be worth investigating quality of existing entropy source. Or maybe it's already been looked at.

-boris

#11 lore raw
Quoted 31 lines · Boris Ostrovsky
Quoted 30 lines · Ian Campbell
Quoted 29 lines · Boris Ostrovsky
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Boris Ostrovsky
Quoted 19 lines · Stefano Stabellini
Quoted 18 lines · Ian Campbell
Quoted 17 lines · Anil Madhavapeddy
Quoted 11 lines · Stefano Stabellini

Present (by memory):
- Julien Grall,
- Stefano Stabellini,
- Ian Campbell,
- Roger Pau Monne,
- Dario Faggioli,
- Andrii Tseglytskyi,
- David Vrabel,
- Konrad Wilk.

* What new PV devices do we need? What has been done already?

I missed this session, but was wondering about an entropy driver. We're integrating an OCaml SSL/TLS into MirageOS, and it's not clear how PV guests should go about getting a strong source of entropy from the outside world in a reasonably portable way.

Quoted 5 lines
Quoted 1 line

Is entropy provided by drivers/char/random.c not sufficient?

This is about providing entropy for that driver to consume.

VMs typically don't have much hardware and therefore don't have much entropy to seed the pool with.

So this is about seeding, not feeding? (sorry, did not mean to start rhyming ;-)).

Quoted 7 lines
Quoted 1 line

TBH I'm not sure, I think it could be either or both...

Feeding is done by interrupt timing and block device access latency, both of which are happening in a guest. I don't know whether there is enough of that but perhaps before embarking on new PV driver it may be worth investigating quality of existing entropy source. Or maybe it's already been looked at.

I've not done the numbers/investigated it myself but it's a quite widely held belief that those things are not sufficient in a virtual machine.

Ian.

#12 lore raw

Hello,

Quoted 9 lines · Ian Campbell
Quoted 5 lines · Boris Ostrovsky

Feeding is done by interrupt timing and block device access latency, both of which are happening in a guest. I don't know whether there is enough of that but perhaps before embarking on new PV driver it may be worth investigating quality of existing entropy source. Or maybe it's already been looked at.

I've not done the numbers/investigated it myself but it's a quite widely held belief that those things are not sufficient in a virtual machine.

Available entropy in my VMs is much lower than on the dom0, to the point where I had customers doing a lot of HTTPS/TLS who were expeirencing stalls.

I bought a couple of Entropy Keys and shipped in entropy to the VMs via an additional daemon.

https://tools.bitfolk.com/wiki/Entropy

A software solution to seed entropy in VMs from the dom0's pool would be welcome.

Cheers,
Andy