[HVWS] Sensor access from virtual machines
Artem_Mygaiev at epam.com
Wed Sep 19 05:59:41 EDT 2018
Hello Gunnar, all
I probably need to explain why I was not thinking of low level sensor access:
- there is no value of implementing it low level functional wise
- there is no significant hit on abstraction except possible delay - which can be fully addressed only with passthrough access
- guest VMs will have to have all relevant HW drivers (most probably modifications will be needed in order to support virtualization)
- there is a lot of peripherals that implement "exclusive" access only
- most of sensors etc. are using non IOMMU protected DMA engines so some kind of "proxy" is needed anyways
Would be great to hear other opinions.
From: Gunnar Andersson <gandersson at genivi.org>
Sent: Wednesday, September 19, 2018 12:12:52 PM
To: genivi-projects at lists.genivi.org; Artem Mygaiev
Subject: [HVWS] Sensor access from virtual machines
Artem, and all,
I received from Artem some early proposal of a protocol for communicating
with "virtual sensors" (Thanks!) We should look at it together soon.
But I wanted first to open some questions here and ask if they make sense to
This generic protocol definition makes sense to me for a lot of sensors that
will provide data measurement values of different kinds. (VIRTIO seems to
do this quite well also - to generalize the concepts first and provide a
data transfer principle that can be applied to many different detailed
hardware, instead of being specific for each.)
But I noticed when I was contemplating this I was thinking more low-level...
How a "sensor" is actually attached to the hardware itself, and then how
does access to that hardware become virtualized? Could there be, and should
there be a low-level API to it from the VM?
What if you drop down to the level of simple microcontrollers with digital
I/O pins. Leaving aside for now that small microcontrollers don't usually
run virtual machines, but the same things turn up also on larger SoCs. SoCs
might at least provide some direct I/O pins.
So, if the sensor is not intelligent enough to provide some kind of network
or serial link, then might it in certain cases it might be as simple as
digital pin I/O? Is that actual access hidden totally by the Hypervisor and
providing the data through a protocol like the one you propose or is there
interest in a more "direct" access?
Transformed into a concrete question: Is there a virtualization standard for
pin I/O, perhaps mirroring the Linux PINCTRL subsystem? Maybe I'm
overthinking this and such I/O will simply be set up as "passthrough" - but
that's also something that needs then to be decided, and it still needs a
defined method and API, right?
Other typical I/O on microcontrollers or SoCs would be things like PWM
(output) ports, and A/D (input) or D/A (output) conversion. What do such
hardware features lead to if we are thinking about the virtual interface to
them? Do those need to be handled?
Gunnar Andersson <gandersson at genivi.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the genivi-projects