Received: by 10.192.165.148 with SMTP id m20csp2149189imm; Thu, 3 May 2018 11:11:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrEFZyyGFIsAqgE5TenemsS+rEveacpTPmFc0uvN9wHcaP6Rr9UoAXty8mmuO4idWkfs0GA X-Received: by 2002:a17:902:9a9:: with SMTP id 38-v6mr25229444pln.114.1525371060412; Thu, 03 May 2018 11:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525371060; cv=none; d=google.com; s=arc-20160816; b=bQhdbjJBdNztuFhChXlQzatsn4m2U90S4ON85mxHQSBj6mrZPjiErPq7u39odbTZ2w jtjxA1c1IMS6NsZawFzQGMFQ1wxtv/AG5l1QGgtNP/UlV4CXJHdLiak1/JnbU37vl/Ri WUg5NP/G2AopJ4iGajJ0Kon+KPi0jj6kKlNW+euEQxB8gz1E3MmyACZPCFJaG4f3LE45 D95D0LF7f4yS3Z9ssCFOS+I0/hj/zWE/WrpokRDbOXTkagglnf5nYPrvM0jtdqJaGYqE LFgpIfj9yXOhqObp5sW35ZN/HLdcVxWk2azH/St5HIRv/DhHeGbItfdTED3XZjkNrjP0 G+bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=c/owb78sW/lFLYeXRE5U/xjpe9Z5wvadydM78Flci/Y=; b=xBgtA2BSghNm5D0pBhVTHCZJRAmMb1dvkRqCoDuLzu5ipeymLoSoeI16dhCjEu7sRq BfQTJr4ZChPTE3qCEJ5txvOo49ObNY6xyFf2z8I7YVAmglaaA+SRylyhz0FtW3tShBx7 pJlK0gNeWEnq24BYuaq9Jg+C1SqKlqxW1OWez8a2svRmd5ixbLgZHN6cVI5tOvSjbEgu WpuEuQ88rqUbVPnsF24sJdZyD/G62455EOm72TgUsbGtd6IcfPsFjQwNevjcUyYV2hyf pNdCh3j4ol2MYc8OnBkswOQeOFKmpOX40HKkJiG7/GHEP6u2nvBsL2ShlKpLbIaa1kXj WeIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=XSwIXfpn; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h33-v6si14022749plh.483.2018.05.03.11.10.45; Thu, 03 May 2018 11:11:00 -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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=XSwIXfpn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751277AbeECSJ0 (ORCPT + 99 others); Thu, 3 May 2018 14:09:26 -0400 Received: from mail-bn3nam01on0073.outbound.protection.outlook.com ([104.47.33.73]:50976 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751019AbeECSJZ (ORCPT ); Thu, 3 May 2018 14:09:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=c/owb78sW/lFLYeXRE5U/xjpe9Z5wvadydM78Flci/Y=; b=XSwIXfpn42Bwu1B9DOHXxIq4GI4ghUV7pyCstx061R1Cn6Z33+QHQVbm6KZbqI92+ZxQUZxOxTTaCN11hHAG1k5cIHE8Lc4yGM7MTGOFabOT4GaccOHa63ovOQ4wvHzG0R6JqIORuFjdyzewjHnF3K1eKq9mW8OPOhnsXt9Bn4o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [4.3.2.107] (47.220.174.129) by MWHPR12MB1453.namprd12.prod.outlook.com (2603:10b6:301:e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.20; Thu, 3 May 2018 18:09:22 +0000 Subject: Re: [PATCH 1/2] iommu/amd - Update the PASID information printed to the system log To: Joerg Roedel , Gary R Hook Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <152520429853.30928.9793486018349326103.stgit@taos> <152520437211.30928.8410126837908568791.stgit@taos> <20180503135706.nypxlwlt7jhqhhum@8bytes.org> From: Gary R Hook Message-ID: <526f3331-610f-9556-1d6d-f595d689b6de@amd.com> Date: Thu, 3 May 2018 13:09:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180503135706.nypxlwlt7jhqhhum@8bytes.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [47.220.174.129] X-ClientProxiedBy: BN6PR03CA0080.namprd03.prod.outlook.com (2603:10b6:405:6f::18) To MWHPR12MB1453.namprd12.prod.outlook.com (2603:10b6:301:e::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:MWHPR12MB1453; X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1453;3:onXhIhHXqcLFVT3PuJE7VbL5c7AEirf0ol46imef6ENYQ83Z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jKsRUQEXUCVHTzmprr3lSx+UJun+IOxOpu8TxNbmEvgOmp77igII4RGshy1f+FrMsqeHMfEecXX4LlisiWMV4s4ri+ZY66rK/vxtRaiRmqX4YL+VbRpCL20PIObwD5lN3lKpNwJiuurl+KGF3BvfLip/vR2yJkhJ0su6dYms3ZurzB41PdDw9A1xMcf+L5kdnMiWRSJR7H+fumjg88mXjtQXn4t1TqWGfVJSntszyWIjKPHrtWQPQyLoz+m3Plzsix1uqEocIpqmufNp5Tp6usMbYo7lzp62ihWRrAvy;4:bhrNCijm2mROb2PzWVKpQ6QNeAcRbdSF5IFaR7nSLqGhESommlwlD73fWSi1BBfzE2snzwTMOBBEzGhnw24zo8seNtPyeJ5e6G3YJyBNwkH9HV/cPJzQym1324FtsjtNzp6hrNwP1ax9NyNgSrFflFTxDZb1vdChnDW62LRgE5lGp2htEDSLMhpaNcEzy2+ryCD4A5xuBYe6SgM7m9dl1IvKKArjL9oRPGphwhd5xjpKQ5muiOgj7BEhwfxHFIWZIItXJjzvZw+RWtgr9E1JbQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:MWHPR12MB1453;BCL:0;PCL:0;RULEID:;SRVR:MWHPR12MB1453; X-Forefront-PRVS: 066153096A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(39860400002)(346002)(366004)(39380400002)(376002)(396003)(199004)(189003)(3846002)(97736004)(956004)(23676004)(28096004)(65956001)(305945005)(66066001)(52146003)(52116002)(65806001)(15650500001)(2486003)(446003)(11346002)(478600001)(4326008)(67846002)(2906002)(486006)(6246003)(7736002)(230700001)(72206003)(6116002)(2616005)(47776003)(53936002)(476003)(64126003)(6636002)(6666003)(8676002)(81166006)(81156014)(186003)(58126008)(105586002)(8936002)(16526019)(26005)(106356001)(110136005)(386003)(36756003)(31686004)(53546011)(5660300001)(65826007)(229853002)(16576012)(25786009)(316002)(6486002)(76176011)(31696002)(68736007)(49976009)(50466002)(78286006);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR12MB1453;H:[4.3.2.107];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxNDUzOzIzOjJZUXZ5STY0Z2lodXNVUXN2cUVrcVZseENV?= =?utf-8?B?VXBUU2h2U3UrcHp1YUNaemhIVWI2Rmx2KzlKNTNaUGt0OUplRUtMN0F3YU5H?= =?utf-8?B?WlZ1NDNZSkluV2t2M3hkRzZCMUNPRy80NWR3UXIvNlZ6azZYSWdXUzM0d1ht?= =?utf-8?B?QlhrQTJWWWgzY09ucEt1OEoyQ094OUZsZ29pMXJ5c1hOdVJVclhmNFNoK1g2?= =?utf-8?B?MGR6UitPQmtZb1ZvaGc4QmxzZDMzK0REc3A1Zm1NeTloY08yTEhEWDlNaXl1?= =?utf-8?B?YlhkRmExbFJlWTJVSG91WjllWlFydXkxWFA1WllxTWRQcUhZYlFTaGJVcVZq?= =?utf-8?B?WXU4dFZrM0FTdEJ3T2pLR0s5dkVIMzlBODNkSHdGbTdmdVhDMkRUZ0c3cEQv?= =?utf-8?B?Y2Q1cVQvS3NtOG1HUm1VaUtMMElzb3RQQnB0MVRJb3Vuc0t0WjdXMVRvWU9k?= =?utf-8?B?Qlh5aFUxWDhDQk1mR1hhK3dQWHR6N29tTXgyVHZFT3Yzd3E0N3RUbE9RNmJG?= =?utf-8?B?RldBaS95VVlTZmtCOXFEazlUemNMMWdmcFNDa2thMU5jU3hiaWw3akFNdk90?= =?utf-8?B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uA2Ly2rJWJYzpTXPoqxiN8dJlhruY2Kx+d6G9bpLpLjJbrehwxEvYhcLGT8wxJq/1EPwvVNaArBg5VWgDHgw9aNuQ6PsWh5OQCHLZDfgL2VDFl8YNljAG90TdS9TSuQdP5T0jmhHZX5L X-MS-Office365-Filtering-Correlation-Id: 5af4db66-52db-4a2e-6c89-08d5b120ffb4 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2018 18:09:22.2221 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5af4db66-52db-4a2e-6c89-08d5b120ffb4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1453 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/03/2018 08:57 AM, Joerg Roedel wrote: > On Tue, May 01, 2018 at 02:52:52PM -0500, Gary R Hook wrote: >> @@ -567,7 +567,7 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt) >> } >> >> if (type == EVENT_TYPE_IO_FAULT) { >> - amd_iommu_report_page_fault(devid, domid, address, flags); >> + amd_iommu_report_page_fault(devid, pasid, address, flags); > > According to the spec this could be a domid or a pasid, it would be good > to make that visible in the error message, depending on the value of the > GN flag in the event entry. > > But that can be done in a separate patch, I applied these two, thanks. Yes, I didn't quite get this right. Both values should be passed along. Or perhaps the entire event could be passed in and decoded by amd_iommu_report_page_fault()?