Commit Graph

6 Commits

Author SHA1 Message Date
Johan Hedberg 935ebc0134 drivers/virtualization: Take advantage of pcie_bdf_lookup()
Use the new pcie_bdf_lookup() API instead of having a custom lookup
function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-02-15 08:23:05 -05:00
Tomasz Bursztyka e69c357e78 drivers/virtualization: Fix ivshmem PCIE reg bar lookup on ivshmem-plain
This is a fix for ACRN targets. Qemu ivshmem original specs do not
states that, if ivshmem-plain is selected, bar0 (the register bar) will
not be present. It just says that bar2 will only be sufficient.
And that is what happens on qemu: whether ivshmem-plain or
ivshmem-doorbell is selected, bar0 is always present no matter what.

This does not seem to be the case in ACRN which does not expose the
bar0 if ivshmem-plain is selected.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-02-05 07:18:49 -05:00
Tomasz Bursztyka 4ee5101021 drivers/virtualization: Make ivshmem driver userspace ready
Exposing its public API to userspace.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-16 18:47:35 -05:00
Tomasz Bursztyka 899fb1af16 drivers/virtualization: Add a shell module for the ivshmem driver
This easily permits to test ivshmem and basic functionality of a custom
protocol passing through.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-16 18:47:35 -05:00
Tomasz Bursztyka d48d5d6147 drivers/virtualization: Add doorbell support for ivshmem driver
This basically adds support for an interrupt based ivshmem variant
called "ivshmem-doorbell".

This allows, via MSI-X, to get multiple vectors for notifications, get
assigned and ID and being able to send a message to another ID (another
VM).

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-16 18:47:35 -05:00
Tomasz Bursztyka d11f2f184d drivers/virtualization: Adding ivshmem driver
This is placed into drivers/virtualization as it does not belong to any
existing subsystem.

This is only the ivshmem-plain variant.

This device is provided by qemu or ACRN, and can be used to share memory
either between the host and the VM or between VMs. Here if zephyr is
used as a VM, it will be able to take advantage of such feature.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-16 18:47:35 -05:00