Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2522234imi; Mon, 25 Jul 2022 00:14:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s+P/Sm+RUlkBccOo7GZP77HOFvCpLZEEGR56D4PzxGL7GiLkxkVEJOIopnZwk49WzUsPTI X-Received: by 2002:a17:907:b0a:b0:72b:3176:3fe5 with SMTP id h10-20020a1709070b0a00b0072b31763fe5mr8949880ejl.48.1658733241934; Mon, 25 Jul 2022 00:14:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658733241; cv=pass; d=google.com; s=arc-20160816; b=KjHK5jpZdtrKNDxjEDpY9difK3BJf7w4ICKifdyhLUmWa2eKMQcRlmMfFYvp+AW5yx tBLv6Y9UzA41tv+Oqjyk5syZkNcmsR8tH8vjGhBLitjMJp+cxPApf19v5HHD/H3qQAKU xUZNTAd0ZiWhaiV6wyknseEYLWj0SI9yi5SnjknPnTnr+SkyJkWhSoafWIzxqxht3oGK neYw6r4dD2Zlj+DEbeiJp/2I4BFcHc6RmlpIIVxhOLjap/OVGrCzaJ5POFGCcTjrnKeI 2J2soO105Js8frnpOTbeCL0nOp1QNKuK+KFuUII7gLGliXPAVMcvlIrAciHYNRP2EHqv GNfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=5T6O33q2ruZSkN7YEnJ/8fvggiIvua8zB54KQPCUdAE=; b=a+kGaCIDHnz1JKgkIYDGM97ndTxT7RJgKqwXGvrHwB9tGGSeaZxDJxYg4PUKjmZiO2 QXTh4eWy5AjJKUWQ9HQCnd69xLR54RqmTY1BmHQFR4BPrf2xwAMcYQ0IdRiUYirgd+sL JFMlkpGBpW538ZKbJfgj2l2MkqERM+tFKTurwtA31tLaA/drbtfe4za7nxEfmrSce2ln yXwMu9MX/npFOx8aGTjf9DCudSM2wxps6ihN3kUUdKYyEm99e7+5HoDjooCBxKRmqA7Q 7g52KwQGzaLVpR0uUd5v76MD62bzCnnfJh6sEalQTJ8ROGFHDrKicdWFDP/BewD1wzLN JuEA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=HpVjjKjC; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a05640240cd00b0043bd72d2e87si9277277edb.492.2022.07.25.00.13.37; Mon, 25 Jul 2022 00:14: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=@amd.com header.s=selector1 header.b=HpVjjKjC; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbiGYHGR (ORCPT + 99 others); Mon, 25 Jul 2022 03:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbiGYHGN (ORCPT ); Mon, 25 Jul 2022 03:06:13 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2044.outbound.protection.outlook.com [40.107.237.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2332F9FE0 for ; Mon, 25 Jul 2022 00:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tpj0U1bwRhq0yapZXF4ZxSIT07gOLqJvgG+vSnNdH/POt0SEJ6OGVRX8qdq5EbrEpoD+s9cXLKeuLzJq3TcF5BZuXbiX2yUI8c35j9Jer+gNUDRYGDKb5RfCP4J6YrtqYk0/rllYTx8DDbF6POj5WMeeNtuDfWDA65H3/UwsoK6dkdWaz6bKpCkMAU0s7QmyIerVqDHASBMpz44kdMsm0eCK/Hcd+D+zHRlzuEGgJmnRrDkmAfnVw+p7SnE5M87/sFXyD4qIfJ+AZQKv3qgnVcKXrubaIg4dj07LwFc1ALWSmv8+k2ZgEhkm7R1W7fy8tk4PRUnncpD2QMQvUcWUqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5T6O33q2ruZSkN7YEnJ/8fvggiIvua8zB54KQPCUdAE=; b=bPKaDYHCZgQ4YrQWEhS0IoBExKNc3OFxYlud44m6vBwCV6xl9431Pz1hi1o+UjY3W7LKc7LJ0j2ElUQnbmdZkY3dkuSeSCWzuyZJrCy6herNwE3pzrr8Wm2GHAblK8MpAB9NAOPxGvC01vRjv4pQIT9BOVXMxEdp9maN02qZzw5qKdUcara0sV2z6oa3FJjRvpbCdUZS81ZwlDtk7XStyQ5C5aLcp73gT42wHW+1lagGBNfV01DDWgJdBqLXto7zsoGbz4nbPJbGD67S9nbxziCMSYRr8q8lQSh9+dFowMd6TE8WLG0q2NSGWV/UMlliE74X54/KomMIAqs0+hJ45Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5T6O33q2ruZSkN7YEnJ/8fvggiIvua8zB54KQPCUdAE=; b=HpVjjKjC3loHOfzt/Hy/d9jnm+38rGUC0VKvG+/WIO1kstHXIzoJ4KCAfqhoC3ATij5tzIgEmBuWb5SHd5RoybCiw5m2lajNAj1vsGetZsjlirO/mphSBGzUhJ4k73/L8wHAS3e4eDY1UcZxs6kEQE8gOiJJzSYYZynQTB3SkuM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM8PR12MB5445.namprd12.prod.outlook.com (2603:10b6:8:24::7) by BYAPR12MB2951.namprd12.prod.outlook.com (2603:10b6:a03:138::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.20; Mon, 25 Jul 2022 07:06:07 +0000 Received: from DM8PR12MB5445.namprd12.prod.outlook.com ([fe80::d4af:b726:bc18:e60c]) by DM8PR12MB5445.namprd12.prod.outlook.com ([fe80::d4af:b726:bc18:e60c%7]) with mapi id 15.20.5458.024; Mon, 25 Jul 2022 07:06:07 +0000 Message-ID: Date: Mon, 25 Jul 2022 14:05:59 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] iommu/amd: Disable guest vapic logging during early kdump init Content-Language: en-US To: Joerg Roedel , Jerry Snitselaar Cc: Will Deacon , iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220721003439.403435-1-jsnitsel@redhat.com> From: Suravee Suthikulpanit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2P153CA0022.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::8) To DM8PR12MB5445.namprd12.prod.outlook.com (2603:10b6:8:24::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 97e775ba-57ee-4413-c038-08da6e0c2546 X-MS-TrafficTypeDiagnostic: BYAPR12MB2951:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EAqME8RdnjTmJkbJSQowkzqjx5pnvZtu8I+ndeuXpa6t+yTpk7hjsCOXB3ccXuVciKRnAymvBjlrEE6t/FjzFdBje/+vGEp4aV0uwIE6KjWICqdPH+7pbPi75mI1AjGDZW6sd+SXE3M4eDVroDiMmFFFWFJWbkj0Zg3tuozfD+LUiM+Ib142hbPYMBnHZF6o4YZfqpCGy4WgFm+9k/8u76rEGcuJOWvjjiQrinnMCXBAipL6cQ9dWvaKWtDTc8uCnZ34L1qH+dhc5NnMYjbZKxgl644pdo3hriMMhQbf7oz1BOnSdOdi6hJFQDBWvnwNFufbN9pTR0HSMHjeSXfE0osfOFkpop+SwjowfaIrzVStbX54iGLuVM1wzlXpuXOkJ8e5E87tgbVdbJEXPMokFpz71Xx2oq2mWmHrOc6tKjEAGDeKDN+/YdTh6BV4IVTw5JFequk7V1jyqlxJODR8eTqPHbTPl3HpGStFhQmCl0NSCoi85Lo1pjSTjlk5+V2A9+o5gIL8IVvVjZKtCaYSYZRtyKEreo1bYew5rT0nCSVpMDmC8ncp9j47LsUIAGPa+f1Rk2yNus7stBaotNgJkBonVFSxt5du1HrUT/we1tkq0G/9zefflcZzdDdhhaSeK87p779XMKlGpEt/kp+ELRfwmvDK04z4JPTL/XOA+Rb92+w8RQVenA8WVgrz8vpkDUMNYXZI59gAruUu/20n3iowBV9XQEydW0iHWMLONA7vTu0QWdVX9YJENc1xANK3aBCO9sCJ3X0p9N8QOvdx2tbzPtpx9v8AhXS96NZPbS83GEkx+w4OE/lPT6+udjPwDZpVBmiJz6a7N46yWYluZA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR12MB5445.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(346002)(376002)(366004)(136003)(39860400002)(110136005)(316002)(186003)(2616005)(53546011)(6506007)(31686004)(31696002)(4326008)(86362001)(44832011)(2906002)(5660300002)(36756003)(8936002)(38100700002)(8676002)(6486002)(66476007)(66946007)(6666004)(6512007)(478600001)(66556008)(41300700001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZFpYMzV3MmlmK1NuVUFVUW9mek9BZzUxR3BZNlVCYnlkTkZaRWRQU1NHNUs1?= =?utf-8?B?MmtpZCtiWjFyRklZamNIdFo2czJnbVZlY2lNOE5CbnplWlJFcmsybk05QkVP?= =?utf-8?B?aUZlR2JCRnJzdnhMRzA1Y0V5V3BRamNHaU9BSnRMRU42b3BIVXQzbENDemtu?= =?utf-8?B?eXVPMnVzb2kzNXBGQlluc1NSWVBqOEFRcmdhazFjQ3FXMTl4NWxocS85Zi9w?= =?utf-8?B?b0pjNE53aVpXbVFMWDRJUkZwL1RHa2Q0cHJFWFh2ZXh5N0NCNENQdldsczZw?= =?utf-8?B?S0NHWEtZNTRZbnZQaXhuMHp2aVBraWN6SGEwOW1IWlpLVUpOTUNuU29MYkpI?= =?utf-8?B?cklBdnVYdlFjbUNWTFpEYVpUODZub0ZVWHFXWU8xRFlJTko0OGM1V0NXR3FN?= =?utf-8?B?Q0ZXWHM3WEg5cEtyVTUxUkIrVWNCZTZCNkpjTDFkL1VaNWFSb1Z2dUxPbnpi?= =?utf-8?B?VHRrMHo3ZVAwWXlDbDdCb1dS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ossTenant-AuthSource: DM8PR12MB5445.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2022 07:06:07.4320 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: L9WedZR3zFcT1GLP9C5+eZem6ctRemXoCLMiaddAeZ8lUcYJzQsShOVnfZzKyT5PhdY0v11XUYfFPCbEkN+vsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2951 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 Joeg / Jerry, On 7/22/22 9:37 PM, Joerg Roedel wrote: > On Wed, Jul 20, 2022 at 05:34:39PM -0700, Jerry Snitselaar wrote: >> diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c >> index 1d08f87e734b..2b00d7f28df7 100644 >> --- a/drivers/iommu/amd/init.c >> +++ b/drivers/iommu/amd/init.c >> @@ -815,6 +815,11 @@ static void free_ga_log(struct amd_iommu *iommu) >> #endif >> } >> >> +static void iommu_ga_log_disable(struct amd_iommu *iommu) >> +{ >> + iommu_feature_disable(iommu, CONTROL_GALOG_EN); >> +} >> + >> static int iommu_ga_log_enable(struct amd_iommu *iommu) >> { >> #ifdef CONFIG_IRQ_REMAP >> @@ -2504,6 +2509,7 @@ static void early_enable_iommus(void) >> for_each_iommu(iommu) { >> iommu_disable_command_buffer(iommu); >> iommu_disable_event_buffer(iommu); >> + iommu_ga_log_disable(iommu); >> iommu_enable_command_buffer(iommu); >> iommu_enable_event_buffer(iommu); >> iommu_enable_ga(iommu); > > Looks about right, but I also let Suravee comment on this. > > Disabling the GA-Log under a device still using it should hopefully not > put it into some undefined state. Sorry for late reply. I have been actually working on the new GAM and GALOG enabling code, which should also address this issue as well. I'll send out the patch soon. Regards, Suravee