PIO region passthrough enables an OS in a virtual machine to directly
access a PIO device in the host. It promises almost the native
performance, which is required in performance-critical scenarios of
ACRN.
ACRN hypervisor will pass through most resource to Service VM at the
begining except those pre-allocated to hypervisor itself and pre-launched
VM. GPA and HPA of all these passthrough resource are identical mapped in
Service VM. In this case, user space program can manipulate the PIO region
in Service VM as PIO region in Host, such as delivering GPA in Service VM
to hypervisor to assign PIO region to other post launched VM.
HSM provides the following ioctls:
- Assign - ACRN_IOCTL_ASSIGN_PIO_REGION
Pass data struct acrn_pio_region from userspace to the hypervisor, and
inform the hypervisor to assign a PIO region to a User VM.
- De-assign - ACRN_IOCTL_DEASSIGN_PIO_REGION
Pass data struct acrn_pio_region from userspace to the hypervisor, and
inform the hypervisor to de-assign a PIO region from a User VM.
These hypercalls are for ACPI device passthrough function of ACRN.
Now ACRN only support legacy UART which has a PIO region. Before passing
through this PIO region to a post-launched VM, ACRN device model would
unbind UART device from Service VM through sysfs node
/sys/bus/pnp/drivers/serial/unbind.
Tracked-On: projectacrn/acrn-hypervisor#8635
Signed-off-by: Yichong Tang <yichong.tang@intel.com>
Virtio legacy device (ver < 1.0) uses a single PIO for all virtqueues.
Notifications from different virtqueues are implemented by writing
virtqueue index to the PIO. Writing different values to the same addr
needs to be mapped to different eventfds by asyncio. This is called
data match feature of asyncio.
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
Due to the two level schedule model in type 1 hypervisor, Service OS
kernel's scheduler does not aware the running status of the User VM,
which means, a thread may be schedule to a CPU which is idle in Service
OS but actually running in User VM.
For the ioreq dispatch workqueue, as it was in the critical path of I/O
request, and ACRN hypervisor only inject the ioreq interrupt to CPU0, so
migrate to other CPU is meaningless and will bring more latency.
So, remove the WQ_UNBOUND flag, and let CPU0 do the dispatch directly.
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Asyncio is a new mechanism in ACRN, which is special for these devices
which need high I/O performance. ACRN hypervisor would process the I/O
request from User VM in an async mode.
For this kind of I/O reqeusts, a new shared page is created by device
model in userspace, and register to kernel with ioctl. ACRN hsm driver
will pin the page to avoid page swapping. Use hypercall to pass the base
addresses to hypervisor, so that hypervisor can put asyncio requests to
this buffer.
When User VM traps to hypervisor due to an IO/MMIO access, hypervisor
need to distinguish it between original syncronize IO and asyncronize IO.
So, the hypercalls are added to assign or deassign the aynscio info to
hypervisor.
In ACRN, we use the ioeventfd in vhost device. We also support the
virtio device using ioveventfd for FE to NOTIFY BE. But in current
implementation, when the User VM write the NOTIFY register to notify BE,
it will trap to hypervisor. After the write access is finished, User VM
can return.
To return earlier, we provide an asyncio mode for an I/O request. For
asyncio, hypervisor directly put the request in an asyncio shared buffer,
and then return to User VM. To take use of this mechanism, add a new flag
ACRN_IOEVENTFD_FLAG_ASYNCIO to indicate that the IO is asyncio. And use
hypercall to register the asyncio info to hypervisor.
When the User VM do an IO/MMIO access and traps to hypervisor, hypervisor
will parse the I/O base address, and check if it was registered. If yes,
hypervisor will queue the corresponding ioeventfd to the aysncio buffer,
and inject an interrupt to Service VM. ACRN HSM driver in Service VM
will traverse the fd list and signal the eventfd.
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
In ACRN, the shared buffer is created to shared data between hypervisor,
kernel and device model (in userpace). This buffer can be allocated and
initialized by kernel or device model.
Add hypercall to register shared buffer(sbuf) to ACRN hyperviosr. The
'vm_id' is used to indicate who owns this sbuf. The 'buffer' is the base
address for sbuf.
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
This patch extends UIO PCI generic driver to
support MSI-X interrupt.
Tracked-On:projectacrn/acrn-hypervisor#5407
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Use 'make savedefconfig' to convert the extensive kernel configuration files
to simplified ones.
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Description:
- Added XFS support in Kernel User VM config file
Signed-off-by: Ionut Nechita <ionut_n2001@yahoo.com>
Change-Id: I109ea86c3af303b3d86150d07d2d4d966e8d549d
Description:
- Added XFS support in Kernel Service VM config file
Signed-off-by: Ionut Nechita <ionut_n2001@yahoo.com>
Change-Id: Ic76684b701ff5cf7ba90850776240eb2d77287c1
The CONFIG_SERIAL_8250_NR_UARTS should be increased to at least 48,
and CONFIG_SERIAL_8250_RUNTIME_UARTS should be increased to at least
32 in order to support multi port serial cards out of the box. This
will cover at least the situation, where two 8 port cards are used
simultaneously and there is still some room for internal ports or
the other card or vUARTs.
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Rename Acrn kernel config name to kernel_config_uefi_service_vm.
Tracked-On: projectacrn/acrn-hypervisor#6744
Signed-off-by: Liu Long <long.liu@linux.intel.com>
From ACRN release 2.5, hypervisor supports relocate kernel to the guest free space. So specify the kernel physical start address is not needed any more.
Tracked-On: projectacrn/acrn-hypervisor#6557
Signed-off-by: pengfujx <pengfux.ji@intel.com>
Some platform has ASPEED GPU,
add AST driver to enable Service VM display locally
Tracked-On: projectacrn/acrn-hypervisor#6357
Signed-off-by: Liu,Junming <junming.liu@intel.com>
Add some additional USB Mass Storage drivers (built-in) to the
kernel configuration. This solves booting off USB with some devices
and on some platforms.
Also add the USB HID driver as built-in (instead of a module).
Tracked-On: projectacrn/acrn-hypervisor#5943
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
The latest NUCs based on Intel Tiger Lake (TGL) also come with the
Intel Ethernet I225-LM Ethernet adpater. The driver for this is
called IGC, this patch enables it (as a module) in the kernel
configuration
Tracked-On: projectacrn/acrn-hypervisor#6221
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Add the Virtio blk driver (VIRTIO_BLK) driver to the Service VM
kernel config (SOS). This simplifies the set-up procedure for
running ACRN on QEMU.
Tracked-On: projectacrn/acrn-hypervisor#6125
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
AudioDSP firmware and HDAudio controller support and facilitate audio
formats with up to 16 channels. Reflect that with BE DAIs.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Change i2s_test module option from enable flag to string allowing to
specify which i2s and in what TDM configuration should be enabled.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Existing parse_inte_array_user() works with __user buffers only.
Separate array parsing from __user bits so the functionality can be
utilized with kernel buffers too.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
The skylake-driver is deprecated in favour of the avs-driver. As the
latter supports all configurations of its predecessor and more, simply
replace the driver-constant returned when FLAG_SST is met.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
commit 5b417fe0cded0b5917683398e6519aae8045cd40 upstream
Update board selection with tables specifying supported I2S
configurations. DMIC/HDAudio board selection require no update as
dmic/hdaudio machine boards are generic and not tied to any specific
codec.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240220115035.770402-11-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
commit 36478a74c7ddaf58d80da5cef9c5ddb5beed5a2e upstream
For ICL+ platforms to avoid DMI/OPIO L1 entry during the base firmware
load procedure, HW recommends to set LTRP_GB to 95us and start an
additional CAPTURE stream in the background.
Once the load completes, original LTRP_GB value is restored and the
additional stream is released.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240220115035.770402-10-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
commit 5acb19ecd1982bd1578912473b33df75a23fefc2 upstream
Define handlers specific to cAVS 2.5 platforms, that is TGL, ADL, RPL
and all other variants based on this very version of AudioDSP
architecture. Most operations are inherited from their predecessors with
the major difference being AudioDSP cores management - firmware handlers
that on its own so there is no need to interfere.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240220115035.770402-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
commit 275b583d047a23c48d01b0c45fb5d95618c1da2d upstream
Define handlers specific to cAVS 2.0 platforms, that is ICL, JSL and all
other variants based on this very version of AudioDSP architecture. Most
operations are inherited from their predecessors with the major
difference being firmware-logging functionality - IPC request as well as
debug memory windows layout have changed.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240220115035.770402-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
commit 8a6502ade116bc4b8293f094f8d74059c67c3f27 upstream
Define handlers specific to cAVS 1.8 platforms, that is CNL, CFL, CML
and all other variants based on this very version of AudioDSP
architecture. Most operations are inherited from their predecessors.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240220115035.770402-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
commit 97bd565ff5a2fc89d302f9919fde37fadf51b645 upstream
Servicing IPCs on CNL platforms and onward differs from the existing
one. To make room for these, relocate SKL-based platforms specific code
into the skl.c file leaving only the genering irq_handler in the common
code.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240220115035.770402-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
commit 7576e2f4d99df6efabb77f52b9539fd345233aee upstream
Servicing IPCs on CNL platforms and onward differs from the existing
one. To make room for these, enrich platform descriptor with fields
representing crucial IPC registers and utilize them throughout the code.
While cleaning up device descriptors, reduce the number of code lines by
assigning 'min_fw_version' within a single line.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240220115035.770402-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>