From: Nicolin Chen <nicolinc@nvidia.com>
To: Shameer Kolothum <skolothumtho@nvidia.com>
Cc: <qemu-arm@nongnu.org>, <qemu-devel@nongnu.org>,
<eric.auger@redhat.com>, <peter.maydell@linaro.org>,
<clg@redhat.com>, <alex@shazbot.org>, <nathanc@nvidia.com>,
<mochs@nvidia.com>, <jan@nvidia.com>, <jgg@nvidia.com>,
<jonathan.cameron@huawei.com>, <zhangfei.gao@linaro.org>,
<zhenzhong.duan@intel.com>, <kjaju@nvidia.com>
Subject: Re: [PATCH v2 05/24] hw/arm/smmuv3-accel: Introduce CMDQV ops interface
Date: Mon, 9 Feb 2026 14:22:55 -0800 [thread overview]
Message-ID: <aYpeP5sv75JBQ+Bc@Asurada-Nvidia> (raw)
In-Reply-To: <20260206144823.80655-6-skolothumtho@nvidia.com>
On Fri, Feb 06, 2026 at 02:48:04PM +0000, Shameer Kolothum wrote:
> CMDQ-Virtualization (CMDQV) is a hardware extension to SMMUv3 that enables
> virtualization of multiple command queues (VCMDQs).
Let's mention "NVIDIA", noting it's a non-standard extension.
> CMDQV support is a specialization of the IOMMUFD backed accelerated
> SMMUv3 path. Introduce an ops interface to factor CMDQV specific
> initialization and CMDQV vIOMMU/vEVENTQ allocation behavior out of
> the base implementation. The ops pointer and associated state are
> stored in the accelerated SMMUv3 state.
>
> No functional change
>
> Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com>
> ---
> hw/arm/smmuv3-accel.h | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/hw/arm/smmuv3-accel.h b/hw/arm/smmuv3-accel.h
> index c9c10e55c3..ca087240e5 100644
> --- a/hw/arm/smmuv3-accel.h
> +++ b/hw/arm/smmuv3-accel.h
> @@ -16,6 +16,23 @@
> #endif
> #include CONFIG_DEVICES
>
> +/*
> + * CMDQ-Virtualization (CMDQV) hardware support, extends the SMMUv3 to
> + * support multiple VCMDQs with virtualization capabilities.
Ditto
> + * CMDQV specific behavior is factored behind this ops interface.
> + */
> +typedef struct SMMUv3AccelCmdqvOps {
> + bool (*init)(SMMUv3State *s, Error **errp);
> + bool (*alloc_viommu)(SMMUv3State *s,
> + HostIOMMUDeviceIOMMUFD *idev,
> + uint32_t *out_viommu_id,
> + Error **errp);
> + void (*free_viommu)(SMMUv3State *s);
I don't see much value of having alloc/free_viommu..
Type and data structure are the only difference from the standard
viommu routine, and both are already in the uAPI header.
> + bool (*alloc_veventq)(SMMUv3State *s, Error **errp);
> + void (*free_veventq)(SMMUv3State *s);
alloc_/free_veventq can be moved into alloc/free_viommu functions.
> + void (*reset)(SMMUv3State *s);
> +} SMMUv3AccelCmdqvOps;
Overall, an ops structure feels unnecessary to me. Maybe init and
reset are somewhat plausible. But nobody else would reuse this ops
structure that is defined exclusively for Tegra241CMDQV?
> /*
> * Represents an accelerated SMMU instance backed by an iommufd vIOMMU object.
> * Holds bypass and abort proxy HWPT IDs used for device attachment.
> @@ -28,6 +45,8 @@ typedef struct SMMUv3AccelState {
> uint32_t bypass_hwpt_id;
> uint32_t abort_hwpt_id;
> QLIST_HEAD(, SMMUv3AccelDevice) device_list;
> + const SMMUv3AccelCmdqvOps *cmdqv_ops;
> + void *cmdqv;
Having two pointers for the same extension feels redundant. Maybe
merge them with:
typedef struct SMMUv3AccelCmdqv {
void *private; // points to Tegra241CMDQV
struct iommu_viommu_tegra241_cmdqv viommu_data;
} SMMUv3AccelCmdqv;
...
SMMUv3AccelState {
...
SMMUv3AccelCmdqv *cmdqv;
};
?
Nicolin
next prev parent reply other threads:[~2026-02-09 22:23 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 14:47 [PATCH v2 00/24] hw/arm/virt: Introduce Tegra241 CMDQV support for accelerated SMMUv3 Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 01/24] backends/iommufd: Update iommufd_backend_get_device_info Shameer Kolothum
2026-02-12 8:03 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 02/24] backends/iommufd: Update iommufd_backend_alloc_viommu to allow user ptr Shameer Kolothum
2026-02-12 8:09 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 03/24] backends/iommufd: Introduce iommufd_backend_alloc_hw_queue Shameer Kolothum
2026-02-11 9:20 ` Cédric Le Goater
2026-02-06 14:48 ` [PATCH v2 04/24] backends/iommufd: Introduce iommufd_backend_viommu_mmap Shameer Kolothum
2026-02-13 10:19 ` Eric Auger
2026-02-13 10:54 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 05/24] hw/arm/smmuv3-accel: Introduce CMDQV ops interface Shameer Kolothum
2026-02-09 19:42 ` Nicolin Chen
2026-02-10 8:46 ` Shameer Kolothum Thodi
2026-02-10 17:20 ` Nicolin Chen
2026-02-12 14:46 ` Eric Auger
2026-02-12 14:41 ` Eric Auger
2026-02-12 14:50 ` Shameer Kolothum Thodi
2026-02-12 14:57 ` Eric Auger
2026-02-12 15:05 ` Shameer Kolothum Thodi
2026-02-12 15:29 ` Eric Auger
2026-02-12 15:37 ` Shameer Kolothum Thodi
2026-02-12 15:35 ` Eric Auger
2026-02-12 15:47 ` Shameer Kolothum Thodi
2026-02-12 17:05 ` Eric Auger
2026-02-12 17:23 ` Nicolin Chen via
2026-02-12 17:23 ` Nicolin Chen via qemu development
2026-02-12 17:52 ` Shameer Kolothum Thodi
2026-02-09 22:22 ` Nicolin Chen [this message]
2026-02-12 14:44 ` Eric Auger
2026-02-12 14:55 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 06/24] hw/arm/tegra241-cmdqv: Add Tegra241 CMDQV ops backend stub Shameer Kolothum
2026-02-12 14:27 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 07/24] hw/arm/smmuv3-accel: Wire CMDQV ops into accel lifecycle Shameer Kolothum
2026-02-12 17:37 ` Eric Auger
2026-02-12 17:55 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 08/24] hw/arm/tegra241-cmdqv: Implement CMDQV init and vIOMMU allocation Shameer Kolothum
2026-02-12 15:11 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 09/24] hw/arm/tegra241-cmdqv: mmap VINTF Page0 for CMDQV Shameer Kolothum
2026-02-13 10:39 ` Eric Auger
2026-02-13 13:57 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 10/24] hw/arm/tegra241-cmdqv: Emulate global CMDQV registers Shameer Kolothum
2026-02-09 23:19 ` Nicolin Chen
2026-02-10 8:51 ` Shameer Kolothum Thodi
2026-02-10 17:06 ` Nicolin Chen
2026-02-06 14:48 ` [PATCH v2 11/24] hw/arm/tegra241-cmdqv: Emulate global and VINTF VCMDQ register reads Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 12/24] hw/arm/tegra241-cmdqv: Emulate global and VINTF VCMDQ register writes Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 13/24] system/physmem: Add address_space_is_ram() helper Shameer Kolothum
2026-02-13 10:23 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 14/24] hw/arm/tegra241-cmdqv: Allocate HW VCMDQs on base register programming Shameer Kolothum
2026-02-09 23:46 ` Nicolin Chen
2026-02-10 8:55 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 15/24] hw/arm/tegra241-cmdqv: map VINTF page0 MMIO region Shameer Kolothum
2026-02-09 23:50 ` Nicolin Chen
2026-02-10 9:15 ` Shameer Kolothum Thodi
2026-02-13 23:06 ` Nicolin Chen
2026-02-16 8:41 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 16/24] hw/arm/tegra241-cmdqv: Use VINTF page0 for mapped VCMDQ registers Shameer Kolothum
2026-02-13 10:33 ` Eric Auger
2026-02-13 11:29 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 17/24] hw/arm/tegra241-cmdqv: Add vEVENTQ allocation and free Shameer Kolothum
2026-02-09 23:51 ` Nicolin Chen
2026-02-06 14:48 ` [PATCH v2 18/24] hw/arm/tegra241-cmdqv: Read and propagate Tegra241 CMDQV errors Shameer Kolothum
2026-02-13 23:29 ` Nicolin Chen
2026-02-16 8:47 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 19/24] hw/arm/tegra241-cmdqv: Add reset handler Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 20/24] hw/arm/tegra241-cmdqv: Limit queue size based on backend page size Shameer Kolothum
2026-02-06 14:48 ` [PATCH v2 21/24] virt-acpi-build: Rename AcpiIortSMMUv3Dev to AcpiSMMUv3Dev Shameer Kolothum
2026-02-12 18:03 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 22/24] hw/arm/smmuv3: Add per-device identifier poroperty Shameer Kolothum
2026-02-10 0:06 ` Nicolin Chen
2026-02-12 17:54 ` Eric Auger
2026-02-12 18:29 ` Eric Auger
2026-02-12 18:53 ` Shameer Kolothum Thodi
2026-02-12 18:57 ` Eric Auger
2026-02-12 18:49 ` Eric Auger
2026-02-12 18:54 ` Shameer Kolothum Thodi
2026-02-06 14:48 ` [PATCH v2 23/24] hw/arm/virt-acpi: Advertise Tegra241 CMDQV nodes in DSDT Shameer Kolothum
2026-02-12 19:10 ` Eric Auger
2026-02-06 14:48 ` [PATCH v2 24/24] hw/arm/smmuv3: Add tegra241-cmdqv property for SMMUv3 device Shameer Kolothum
2026-02-13 11:55 ` Pavel Hrdina
2026-02-13 13:39 ` Shameer Kolothum Thodi
2026-02-13 15:44 ` Pavel Hrdina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYpeP5sv75JBQ+Bc@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=alex@shazbot.org \
--cc=clg@redhat.com \
--cc=eric.auger@redhat.com \
--cc=jan@nvidia.com \
--cc=jgg@nvidia.com \
--cc=jonathan.cameron@huawei.com \
--cc=kjaju@nvidia.com \
--cc=mochs@nvidia.com \
--cc=nathanc@nvidia.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=skolothumtho@nvidia.com \
--cc=zhangfei.gao@linaro.org \
--cc=zhenzhong.duan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.