From nobody Sun Feb 8 02:56:44 2026 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68D6435E551 for ; Wed, 14 Jan 2026 21:13:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768425222; cv=none; b=YnBScMES4ICS4hJlJNUpqtcYXB/YiS0ouTP+o5qTs3Y00Fz67RkaxxLiXSI+P6dqmdYmejU/t3JyyP5iTMGuyvr4ucc2nm4eQkaTBtBV8hfXGwjfoamz2LynhMHdu88WGWD68pxf9idsarc5TRss9fMHv3xhotHiipV5RCN/Yl4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768425222; c=relaxed/simple; bh=9jpWqsc8jBpbfaxxgNOKWHgIWX7+eHnVyX9ZaqegDoo=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=IlHeexvv5mc4Z7qjO4b1/D6wKEIjkhAH5seTj1W3HjW9Wz6qSFV098DiE1a2ADJy5kIed8pUeNHKSj5asJpEaP/Ngi/Fr+SMK7exyTmeORXJId9KInhDMKYQ1pgjJiHH7qx1SKTYwE8sLq5kaamC1AO0fXIxi5sVUHL/NXQQ81Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=sdsF1d6k; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sdsF1d6k" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-81f42368322so146672b3a.3 for ; Wed, 14 Jan 2026 13:13:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768425219; x=1769030019; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=kRN9XFSrat55IClnp903+wyZKW1cV4xVvxk5Dw/CtqI=; b=sdsF1d6kRuaqJEEPkxI/TMVc+Z1+L1INjkrPLKBULvtUlVaXxB6C2+msS+NrBWCV7f puCYcyx2uwA3l75Xey9Pzvl3Wsh/hCzzQYYkUVM6oSPW8L/QkZ9o5R+GH7wCxkjyaeJ4 rjG+H0rQav+BFEpbwyhhy4EHoIUWYe4GwtglaFACVlFJdpVtVnolPpeBE+KpqEuRK42H lwx2Y+SnQhmQFu1niydUqp+QfbYbUG1Xxe6iFdWx6uISyq5hRItTLiEyge9kDGESdjvV 5zolocUmaV1Sj7xGfPnL18eQVCSGq3f3/Xh0dk/Sazww3y5BmsCcCCjixtfchkaIU3W+ GfgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768425219; x=1769030019; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kRN9XFSrat55IClnp903+wyZKW1cV4xVvxk5Dw/CtqI=; b=kunC9hrUSZHEBM3Y+UuFToh+oNBYhavRjUhPc+v388tLug9YluiQH6Ewb6rx084ca7 OxchDkie06z7N7u61gpMoRMp9qBQQkx40gDRck1AcZ9hvKhQmIQP8JsKCuH9muSHPmyY zMzoiP0r9Wza6rdA71mzp4jlhr1ji47QIPjRaWGgnUrDmplUTVZev21NRjAwNzJ28x/G srh2oqhA2z0JH9KleQe1EnYuXjEa4Z2cmyCd27yCZqzhj7g1jUBKmY9kxyVvrNkJmgm3 iB1ODQcNWTMbxXtognmbdEcM+Ns+VmlvUaQ7SuJSv3ms4huF1MlkHAhueql2/BLNskfP VlmA== X-Forwarded-Encrypted: i=1; AJvYcCXcJcgMZmKsJMq84CJbmSi2klXB7Ez8H8itAZe0V7fBMcrL0sTHYzPPcLnKRBq3LPEh2V7v3OJCBWreYVk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+v7Ewkkmmo2UF+hl1XXIVqd9Ur7ys4Od6boSIWKW2fEDmNxT4 7BvhcnwuEtOeGTnpAxTJEymM0uOPoB5xTFhAXAFAboC4VkSRcT1EJzFasX8RzW4GBDuPk9cVE6b G33LIQyjQ9RPwKQ== X-Received: from pfhp36.prod.google.com ([2002:a05:6a00:a24:b0:7e5:3f05:3f6c]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:3695:b0:81d:a1b1:731b with SMTP id d2e1a72fcca58-81f81cee287mr3558018b3a.19.1768425218597; Wed, 14 Jan 2026 13:13:38 -0800 (PST) Date: Wed, 14 Jan 2026 21:12:52 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Message-ID: <20260114211252.2581145-1-dmatlack@google.com> Subject: [PATCH] vfio: selftests: Drop IOMMU mapping size assertions for VFIO_TYPE1_IOMMU From: David Matlack To: Alex Williamson Cc: David Matlack , Jason Gunthorpe , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Drop the assertions about IOMMU mappings sizes for VFIO_TYPE1_IOMMU modes (both the VFIO mode and the iommufd compatibility mode). These assertions fail when CONFIG_IOMMUFD_VFIO_CONTAINER is enabled, since iommufd compatibility mode provides different huge page behavior than VFIO for VFIO_TYPE1_IOMMU. VFIO_TYPE1_IOMMU is an old enough interface that it's not worth changing the behavior of VFIO and iommufd to match nor care about the IOMMU mapping sizes. Cc: Jason Gunthorpe Link: https://lore.kernel.org/kvm/20260109143830.176dc279@shazbot.org/ Signed-off-by: David Matlack --- tools/testing/selftests/vfio/vfio_dma_mapping_test.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/vfio/vfio_dma_mapping_test.c b/tools/t= esting/selftests/vfio/vfio_dma_mapping_test.c index 5397822c3dd4..ecadd0e6b61b 100644 --- a/tools/testing/selftests/vfio/vfio_dma_mapping_test.c +++ b/tools/testing/selftests/vfio/vfio_dma_mapping_test.c @@ -162,12 +162,8 @@ TEST_F(vfio_dma_mapping_test, dma_map_unmap) if (rc =3D=3D -EOPNOTSUPP) goto unmap; =20 - /* - * IOMMUFD compatibility-mode does not support huge mappings when - * using VFIO_TYPE1_IOMMU. - */ - if (!strcmp(variant->iommu_mode, "iommufd_compat_type1")) - mapping_size =3D SZ_4K; + if (self->iommu->mode->iommu_type =3D=3D VFIO_TYPE1_IOMMU) + goto unmap; =20 ASSERT_EQ(0, rc); printf("Found IOMMU mappings for IOVA 0x%lx:\n", region.iova); base-commit: d721f52e31553a848e0e9947ca15a49c5674aef3 --=20 2.52.0.457.g6b5491de43-goog