RE: [PATCH V4 01/10] iommufd: Support a HWPT without an iommu driver for noiommu
From: Tian, Kevin
Date: Wed Apr 22 2026 - 04:12:58 EST
> From: Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>
> Sent: Saturday, April 18, 2026 6:00 AM
>
> Hi Kevin,
>
> On Thu, 16 Apr 2026 07:25:57 +0000
> "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:
>
> > > From: Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>
> > > Sent: Wednesday, April 15, 2026 5:14 AM
> > >
> > > + cfg.common.features =
> > > + (BIT(PT_FEAT_DYNAMIC_TOP) |
> > > BIT(PT_FEAT_AMDV1_ENCRYPT_TABLES) |
> > > + BIT(PT_FEAT_AMDV1_FORCE_COHERENCE));
> >
> > PT_FEAT_AMDV1_ENCRYPT_TABLES is useless here.
> Technically yes but we need this flag to match forced features since we
> are sharing with the real AMDv1. Otherwise, this will fail with
> EOPNOTSUPP.
> static int pt_init_common(struct pt_common *common)
> {
> ...
> /* Requested features must match features compiled into this
> format */
> if ((common->features & ~(unsigned int)PT_SUPPORTED_FEATURES)
> ||
> (!IS_ENABLED(CONFIG_DEBUG_GENERIC_PT) &&
> (common->features & PT_FORCE_ENABLED_FEATURES) !=
> PT_FORCE_ENABLED_FEATURES))
> return -EOPNOTSUPP;
>
> where in iommu_amdv1.c:
> #define PT_FORCE_ENABLED_FEATURES
> \ (BIT(PT_FEAT_DYNAMIC_TOP) | BIT(PT_FEAT_AMDV1_ENCRYPT_TABLES) |
> \
> BIT(PT_FEAT_AMDV1_FORCE_COHERENCE))
Okay, make sense.
btw iommufd selftest just removed the amdv1 format (will be in 7.1). then
let's not mention it in this series.