Received: by 10.213.65.68 with SMTP id h4csp480709imn; Tue, 13 Mar 2018 10:22:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELsKT+f1vvY+pZpUzc0IwNB/ob6dLFsAOiiErV/lhMPREPFRclVPpBm2cEc892EDXgvMPnWM X-Received: by 10.101.98.137 with SMTP id f9mr1108928pgv.6.1520961769493; Tue, 13 Mar 2018 10:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520961769; cv=none; d=google.com; s=arc-20160816; b=RK61Zh/baEF7tg2QuxvgWQeJQMFLTa0glCPvnFHOnaezMvJLD23kpWTcOrd88h7emt HbAnxgCX9RbJjTT5XtIO6UHh8/8BSWgD0oUVdM0dXrXSWgLDrgPHTsD6HKHveXkrEXI6 F15JEAK4CX+6GEUUwavP1/jNjsjfXudYqqQrP2fQvlsR+vqK2mqyzePig0WZkEA9nmDs 2tBmVz+Z9ZAqV0ABy4edEPiBJuwkIFefBdSBHBK4nF6rgPSpJOndiJw5LUh3wzcfAl2b NZy7/4uVfBEh/1E4jWMA31cI4DlE50hOtvGWTji26NG9fW5Rin3KfPLadrRFyJPQMwdG O+Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=xEou5Ocw1TojyxQdeHEUvB/VyO2O2nq/zUgZsqrGYtQ=; b=zwo5yaDUjY+BIYNjOASB+wKdMFmKrR+oWmggteDL1+W6RwPL2X5MGbUFRXbeynylR8 ouSvPJJcbgJLhYebWZWCx9Q4g+cMMli1twQ7uYuVzH3oOsXmNoJKaUJcyFUXRwhi4Q5Y DVlLP/Za/cXiHWUEVAs+8NCEJY/SswRozckpwygdtYsEKTbFfFBP/2F6clG7ehLARiR/ K/bCnrtpzpe5ACKWNOvufaPjv2/m7fXOaCuCRCVc6wd41JBlSDLIgieBd2qrmNAsv/kw UcA8tedb0g/pBWChTiJB8KQE+YqsVUS5ELnROlcuJS1aUy+FUDS9TwCjjjAQkRIvHkgb O19w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c3GfKlR0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12-v6si442886pll.191.2018.03.13.10.22.35; Tue, 13 Mar 2018 10:22:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c3GfKlR0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1752431AbeCMRUp (ORCPT + 99 others); Tue, 13 Mar 2018 13:20:45 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:37314 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731AbeCMRUo (ORCPT ); Tue, 13 Mar 2018 13:20:44 -0400 Received: by mail-qk0-f182.google.com with SMTP id y137so424649qka.4 for ; Tue, 13 Mar 2018 10:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xEou5Ocw1TojyxQdeHEUvB/VyO2O2nq/zUgZsqrGYtQ=; b=c3GfKlR0z2tkefJGuYryTeWfnMhv5d6Fw4U8ButyDmYnTBNrHXhUF9jBj9vPlmnSdo QJNKiXiYp6e9AfYnXxya8oMhz1YG6z/UgF2PShq/A/0qwSPRYFxz0+HRSboBdnXF6a63 9cVRZ0eFH2wsYf6+19zHL/1T51fP+HulIqS0usXvrZe9DEPtXxBVzGzWIwQvhUZokIrU ltLKhOhu5DIuJ854U6Luv7xr124D0PorJYebW3g2nBJIgwhwCEhdNii7CtMaa67VKQo7 ex+Gnichb87HYeUbL4VG8eeHwjMLUynj1K+X6JgVUagaT2KaOR1b3mozgmIJ6hYXQuzD MeoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xEou5Ocw1TojyxQdeHEUvB/VyO2O2nq/zUgZsqrGYtQ=; b=eLGdUECgpBuWw1YgykmiPd1+cR24xifvpnAxJUFzurIivuRL7OVd7tNykpb7IOJPjH yq4nVDMj72B+pC9sHtyWUYkch7VC2RGRWizvujH2FG8VDPvEQNEJZB7gjKo/8naQ2a08 UrAInc1/eW24qq4VqRj+JzEzdrutpg3fG3Abw63p9QYitcMOlAWQNZtjiJIy3wGqfkG3 1fOWMQXBLMD2+rAXWISQGXYE0949BjIbYw5roCVNMb8rKHKm73aFiv3IEo42r7KJzBHe gmknk/phdeJiJCrpS4fikP5J/W9CADmm+MvbkJIO8q2HMQnYr1ibPxxQPeJ/VY5M7SVm wxlA== X-Gm-Message-State: AElRT7Fn2r9bsa4HvULbWjgjFL5OxYv5QW0guke2uEkRIuQmZm8eW+GM Jzy4LgOCJFpVQpAeeXmpBgzt8wz6P5/KrHTXA0c= X-Received: by 10.55.123.197 with SMTP id w188mr2214399qkc.70.1520961643457; Tue, 13 Mar 2018 10:20:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.195.80 with HTTP; Tue, 13 Mar 2018 10:20:42 -0700 (PDT) In-Reply-To: <152055669123.63229.1692099069085978884.stgit@sosxen2.amd.com> References: <152055660594.63229.5131049527614494130.stgit@sosxen2.amd.com> <152055669123.63229.1692099069085978884.stgit@sosxen2.amd.com> From: Andy Shevchenko Date: Tue, 13 Mar 2018 19:20:42 +0200 Message-ID: Subject: Re: [PATCH v2 5/5] iommu/amd - Add a debugfs entry to specify a IOMMU device table entry To: Gary R Hook Cc: iommu@lists.linux-foundation.org, Joerg Roedel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 9, 2018 at 2:51 AM, Gary R Hook wrote: > Initially (at boot) the device table values dumped are all of the > active devices. Add a devid debugfs file to allow the user to select a > single device table entry to dump (active or not). Let any devid value > greater than the maximum allowable PCI ID (0xFFFF) restore the > behavior to that effective at boot. > + oboff += OSCNPRINTF("%02x:%02x:%x (%u / %04x)\n", > + PCI_BUS_NUM(amd_iommu_devid), > + PCI_SLOT(amd_iommu_devid), > + PCI_FUNC(amd_iommu_devid), Perhaps at some point we will have an extension to %p to print PCI BDFs. > + if (strnchr(obuf, OBUFLEN, ':')) > + { Style > + } else if (obuf[0] == '0' && obuf[1] == 'x') { > + n = sscanf(obuf, "%x", &amd_iommu_devid); > + } else { > + n = sscanf(obuf, "%d", &amd_iommu_devid); > + } kstrtoint() ? -- With Best Regards, Andy Shevchenko