Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1084366rwd; Thu, 8 Jun 2023 11:52:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kiZoouoFD3EUa/tDpTGYLujwud/6WAiC/3m14aImFQOJ9scyaG7o/tF3olepjm6XJ8QPV X-Received: by 2002:a05:6a20:429f:b0:10a:9f55:292b with SMTP id o31-20020a056a20429f00b0010a9f55292bmr9120097pzj.57.1686250321940; Thu, 08 Jun 2023 11:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686250321; cv=none; d=google.com; s=arc-20160816; b=t9G6ycT4D5sE4rIonKQDavlJ83F2UIuUgM57NXu7a4/+rbnTByZMeYs6fINN8QXql3 Q46flbxzsBeIatlrGQctDy23qVfuxCvPVW/zFC2fXWSQ9Fi8KbdFhKNWuUn/HO36n3vc pHk11nhk+CNyesZPhshCfggrc3Aws9B0tmfnhGiUwdcMkTOLkspFlQlBogLXquJiUMZX BDx0QT+YX7CVpi1obrihHwxwqGIV/OI5/7Rl9NHlY8na/jeTLjgMEZaqema+yYujFThH uMxDe8dL4F7ZceJTxF0A/5QXjrNi47F3vAErK9uC8taEUFXkFRKWBq63o1ofAuxQsi6H S08Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=G33fAOzGILRWsNmJroydjyYALKnc1tltJG+VtowcH+M=; b=zulHRoQE5W0Uf23OPWaGmplLuZ6Rgwkv/W+0nOdYULd8rpLLbPoi+HFirrvjEy+cNS XwXVII6G8Te3OyJ7wfY8ej431eaZHrxRd+8O+BGg9rkMmgga5AyJeB/nmenM1Lkfs8AK 20bm0WqJSj8X0/sJu5YKQqFktpP7u5wEMuAnwS8m8A1lzFRNaC42MfXZlHfZ4LFnPaTo HgN40uHIcT/AxTk/L8Cy42sOzf7otmPAwty++cUEfF5ia7Gs8PItkMMWOvn/lNLSCxPQ 0+MEg3cmCsLEZg8b9XA4mYgaZ8S37c2f5hZ0pBuMz0d7izLZItE0drbxYLBGhArgTmuu 0KnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HHWasNyT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k189-20020a6384c6000000b0052883ac6949si1427197pgd.13.2023.06.08.11.51.47; Thu, 08 Jun 2023 11:52:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HHWasNyT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236100AbjFHSSr (ORCPT + 99 others); Thu, 8 Jun 2023 14:18:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235084AbjFHSSi (ORCPT ); Thu, 8 Jun 2023 14:18:38 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED3941FDA; Thu, 8 Jun 2023 11:18:35 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-25669acf1b0so4280a91.0; Thu, 08 Jun 2023 11:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686248315; x=1688840315; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=G33fAOzGILRWsNmJroydjyYALKnc1tltJG+VtowcH+M=; b=HHWasNyTwgL2aWumbEC7slXrM+f2l+7WY3V0DydtwT0zKFkTzTNj/fnHvph2d0vKaq CBD28giYV9UWT25SIyq7Qn1W8eDUc/ihjcZrN31uSpS4yuTYtSjHyMCior+dUbFD6j2s oOdEx83zvlqwtigyphY00kScP2EwWXJcWYgi/LimH2RnYt7k7Vs9YVBwAWuuTSx7922t kvNMgzT6pHlQB1ab/TlQ54fQp04V/v+TU08d3ZbyBq589GparLCjbEbVrketja4iuLHu lcpgrt8YUCIjmyFh9K/OUWjdv5oEtfHOKZ2BA/mEQAOoIO2HE45dXxdr4yIbB93dPwK4 xXAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686248315; x=1688840315; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G33fAOzGILRWsNmJroydjyYALKnc1tltJG+VtowcH+M=; b=kpADuFZqdXcV+mYu/2Dvl04f20S8PA7iC4AvZy4Yy9U39+WIbi9fQyX5ce6w+Uneg1 tPmuyMLr2NesXcB/dq+LMvWSpb5wSe9BE/a68fvJul3P8fJ6Pjva4cIEWTXm9MsEAGbu XEfIv9prV4himnc7aTFpPuZxsd7JVijeysklpGGW4U00h2IOyrrHCxzFzHe7BdSJmcuq 4YJffbSQx2iGnHq/IxZIQr+zZEbGVxDH7rRh2uBDCi21Ql/W9jhmQntuIUWjBSkMU1vM fCn584IuXIjJsOyX72iDCRdZN5tlXt6cktaHHE8sp79D/K3VyKCNgwM3Sy+Nr3IAfLf5 pHBA== X-Gm-Message-State: AC+VfDyLUnBQQcSQytHgR/I77GSg9VbtVs2wMnl9NwCAiyiWnrnfuagh ExgLbG7UsLsnHhjRyUVqMxt/iRjZO2oEbl8pAqw= X-Received: by 2002:a17:90a:190d:b0:258:9995:91cb with SMTP id 13-20020a17090a190d00b00258999591cbmr7531295pjg.49.1686248314991; Thu, 08 Jun 2023 11:18:34 -0700 (PDT) MIME-Version: 1.0 References: <7f1797b1-cd50-3c8d-59ff-8ce82ef1adb4@arm.com> In-Reply-To: <7f1797b1-cd50-3c8d-59ff-8ce82ef1adb4@arm.com> From: Alexander Duyck Date: Thu, 8 Jun 2023 11:17:58 -0700 Message-ID: Subject: Re: Question about reserved_regions w/ Intel IOMMU To: Robin Murphy Cc: Ashok Raj , Baolu Lu , LKML , linux-pci , iommu@lists.linux.dev, Ashok Raj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 8, 2023 at 11:02=E2=80=AFAM Robin Murphy = wrote: > > On 2023-06-08 18:10, Alexander Duyck wrote: <...> > > As a part of going down that rabbit hole I realized that the > > reserved_regions seems to only list the MSI reservation. However after > > digging a bit deeper it seems like there is code to reserve the memory > > behind the root complex in the IOVA but it doesn't look like that is > > visible anywhere and is the piece I am currently trying to sort out. > > What I am working on is trying to figure out if the system that is > > failing is actually reserving that memory region in the IOVA, or if > > that is somehow not happening in our test setup. > > How old's the kernel? Before 5.11, intel-iommu wasn't hooked up to > iommu-dma so didn't do quite the same thing - it only reserved whatever > specific PCI memory resources existed at boot, rather than the whole > window as iommu-dma does. Either way, ftrace on reserve_iova() (or just > whack a print in there) should suffice to see what's happened. > > Robin. We are working with a 5.12 kernel. I will do some digging. We may be able to backport some fixes if needed. Thanks, - Alex