]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm/smmuv3-accel: Add nested vSTE install/uninstall support
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 29 Jan 2026 13:32:04 +0000 (13:32 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 29 Jan 2026 13:32:04 +0000 (13:32 +0000)
commit2da17a988c2d387b8fde04fdaddf03afa73085f5
tree5f8754b410b097f894439de0a577646b2f6bb049
parent95d855167af43e958903f29430f563205b8b2afd
hw/arm/smmuv3-accel: Add nested vSTE install/uninstall support

A device placed behind a vSMMU instance must have corresponding vSTEs
(bypass, abort, or translate) installed. The bypass and abort proxy nested
HWPTs are pre-allocated.

For translat HWPT, a vDEVICE object is allocated and associated with the
vIOMMU for each guest device. This allows the host kernel to establish a
virtual SID to physical SID mapping, which is required for handling
invalidations and event reporting.

An translate HWPT is allocated based on the guest STE configuration and
attached to the device when the guest issues SMMU_CMD_CFGI_STE or
SMMU_CMD_CFGI_STE_RANGE, provided the STE enables S1 translation.

If the guest STE is invalid or S1 translation is disabled, the device is
attached to one of the pre-allocated ABORT or BYPASS HWPTs instead.

While at it, export smmu_find_ste() for use here.

Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
Message-id: 20260126104342.253965-15-skolothumtho@nvidia.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/smmuv3-accel.c
hw/arm/smmuv3-accel.h
hw/arm/smmuv3-internal.h
hw/arm/smmuv3.c
hw/arm/trace-events
include/hw/arm/smmuv3-common.h