Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3243235rdg; Tue, 17 Oct 2023 08:36:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJE+zg49Ee0txQ+G0jRo0hLrv+08/jTS/0u9nDe5534jGN7VJc+EqOd21McF9s1xZP4n0z X-Received: by 2002:a17:90b:4fc1:b0:27d:54b9:c3c5 with SMTP id qa1-20020a17090b4fc100b0027d54b9c3c5mr2540407pjb.17.1697556993894; Tue, 17 Oct 2023 08:36:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697556993; cv=pass; d=google.com; s=arc-20160816; b=cQqgKEXLQaOLf5J4Z18xkNw9WJH1lXAycgPeS929iyV0P3TiTINGIRY4YMEwl8NI0A ynKLj0qMg0A+nAQ8hgZqzRS/9OV0SGLaSPiPi0qFKAkzJhoDX8/jthpttNk87SrYEUD6 Mb6dsjx3oNq5MLTEMnJs4w9TEkxyJKt1CiWWHoqVw3sCxaJxg9a1FC8uMnwW4ShYNpLx ucfd2cJNxoLYASrQXiZk/6QuNSmas7ifuXevP9AYwZyjOmKvXrXmxp+LHz/qB5B5OG/i 9Ybq450RbkVw6m9ljDLQaCTGMJDPM4qfjNQFDD1NY0083mNKfG5jP15u9zEOUp+Gb7q4 aC3A== 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=eKdcrLCuJJzUpgCNrNv2TZRokTRZnqp6o9qE4X+24K0=; fh=Q7av6qof4ZDA+jOZEFzT2JlRn7l0XbghONKTxlC0Q1E=; b=mR10vLJPfOZsHVocBpmU/MeV0kie7WlOFy0Ww/Vc4TKWPZR0InMMv7380a7tXjRZ89 s1fEmHLUSJofBZm77x/ldxjmZdNxdpSkWR5IuBTNYS4UaZOemgsaLKtgVlVNI9yW/wov AAZpWr7/W5HFqGwJTc7wWbpNjEG6rIp8MzZMSQBr/yis4NnhWFpGFJd34TgPnIXM5bFX MoGvvQrOfRw+zSig7CKhOgP/tCWl9pUEDfq6OlxTOhJHUZwWizVXd8QFHt34lQ3ebBZI 22WKwpR4CGn2IYriHwuInmeJBX6lXm9iN3J2pGg0dKdwRpWdruWh7TqGERyRkbOAFSpO wivA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=BTQ0bEUT; 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 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id lp13-20020a17090b4a8d00b00277496b6ec1si2174699pjb.34.2023.10.17.08.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 08:36:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=BTQ0bEUT; 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 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1CCA48053668; Tue, 17 Oct 2023 08:36:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344175AbjJQPgY (ORCPT + 99 others); Tue, 17 Oct 2023 11:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJQPgX (ORCPT ); Tue, 17 Oct 2023 11:36:23 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2083.outbound.protection.outlook.com [40.107.92.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 408FC9E for ; Tue, 17 Oct 2023 08:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ehjf/RHsfAJAuvico0SE7toHambUoh14FCWUUqPYOdxqTYleE7LZj3IhVSVJZS1cIiLFZ2x18o4Xd9W8H7cnnxQJoClbB6BDSOLIH5BbzxNqLCqof41vK6WcoiQai24TfOOFzz0tefWsGHL1vZz4LvieWLXztbJgLFI2RoNBuKkZWEmW5ALt+EWut+btIifcHhUjmY2/JaG1n9ebS2EURAONWOGQ8DEt8ecs4UfHVaspkqndco1RLYyIeZupixxBZoApkzh4rNaG3BPgW54rViMBxGYuBS6kvbtMcYdGTBySI9K5iaJ7EEcxpqE0+0axIB/zGnEcN9Qv9+Z7ktJJSA== 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=eKdcrLCuJJzUpgCNrNv2TZRokTRZnqp6o9qE4X+24K0=; b=EF6xruRtoMAtBo1toj0veeiwsyTGa8qHP3+CqTxSfpdWxZ+9m/gaa72VyMKT//pSQ3BzimKj8AxvkZwo45LjrRA8BfjQYP2zk9S7UvozwL1Ya8xv0TgBEC/DwMT6tfz6/sEtc4jSIVAT45vf2ROAZ7imkV1CN+mtZXGR6TnYzusJxaFaYSy346JpVG4ZAEScKw7aPof74XZkUhGmhOBdSMOHVm6yz7BxLIuBLlHd7VTZogNTxD+DUiNC/FN09C8RLlM5GPPA4j7G6v0FLYAC167Go9n/u9ZWF0sFPfJ+ljCZg72eh5VTfHVJUXU8EfSryED4r2q8onbtoPPan6sF2g== 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=eKdcrLCuJJzUpgCNrNv2TZRokTRZnqp6o9qE4X+24K0=; b=BTQ0bEUTx85vwWWnnn0lZS6UIoFJbUJ4LF2WYCQb34EmCkRKH5KMRa8hVRTopr5NByzTEMNSbAy4btaWA9hBcgC0muOPHLhFjR1nozJSV5K8fd7LlArp2a9PRipBm314O4gzZQjWDHPl2tKzESluFcHz7va9rCyAkjyrDOfN0Yk= 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 MN6PR12MB8490.namprd12.prod.outlook.com (2603:10b6:208:470::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Tue, 17 Oct 2023 15:36:17 +0000 Received: from DM8PR12MB5445.namprd12.prod.outlook.com ([fe80::90d5:d841:f95d:d414]) by DM8PR12MB5445.namprd12.prod.outlook.com ([fe80::90d5:d841:f95d:d414%6]) with mapi id 15.20.6886.034; Tue, 17 Oct 2023 15:36:17 +0000 Message-ID: <44477b0b-af38-569e-95d9-e78c118c9d18@amd.com> Date: Tue, 17 Oct 2023 22:36:06 +0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH] iommu/amd: Do not flush IRTE when only updating isRun and destination fields Content-Language: en-US To: Maxim Levitsky , linux-kernel@vger.kernel.org, iommu@lists.linux.dev Cc: joro@8bytes.org, seanjc@google.com, vasant.hegde@amd.com, jon.grimm@amd.com, santosh.shukla@amd.com, joao.m.martins@oracle.com, alejandro.j.jimenez@oracle.com, boris.ostrovsky@oracle.com References: <20231017144236.8287-1-suravee.suthikulpanit@amd.com> <97d106d28e4c3468912a478dba79ab2221109cbd.camel@redhat.com> From: "Suthikulpanit, Suravee" In-Reply-To: <97d106d28e4c3468912a478dba79ab2221109cbd.camel@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR01CA0132.apcprd01.prod.exchangelabs.com (2603:1096:4:40::36) To DM8PR12MB5445.namprd12.prod.outlook.com (2603:10b6:8:24::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR12MB5445:EE_|MN6PR12MB8490:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d348a00-5dad-4946-09a4-08dbcf26ce03 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DDh3sImBuTHqt1s9mXewXazHkJS/XTevadnALShY1fJOPsy2vDrfmFskoC+mOb9dhxFpH5iDq37RC3gqvXWl/m6aBjBGQi/0UXjmiT8/2r4nlla3Tdkj8hpY3ZWBcS4xm7eG0ttZnOtP5nGSM1OUHBf1jg2kQcdUyFNXolcXMxyhtNOEyGPbaqQbrkiaLAyYBmqukjl41fP3onF1PcsKDWiT6P8ehGBahv0bduir/2/V7nOygd2FTb9vFjrNR59FP3YAfE/MwRVd7ZyqRdtSiVsWjVbqrpqf88zhpzjid37r/3MMSO87RliQKLhJvsi+97vhkzJYEjQY9+7LGWYe1D7drnLziKvAlhezl/wnwYIS4rUGm9ifrkkzLv2Crv9a4EZkfkZE8q3REIC67gfMebsAIE3ZvJc8LJVGylulVyfeiCTCzPKS5WKXST49y8v0Rzk+FtJTd2a6LSFe1Zw80p+RH13zaQiy66y02AKfN/O/CQZygk5Vx4RExURSk9CB+YmFw/QQwlwnPhRSiGhrp003jrRbqmQ+FgGD/jwTh8WfUB1AGKhw246+RRWkYebouuCSJLhVRMqjpGPmz5PwrN2sQzuM4bIFANAGHCNoYmdDNuabgSbyTHtFtyNy/RG9dAi+EZX0q6tVzfKMpFhByhkGHV4zRUjcFD03TMDUTlk= 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:(13230031)(376002)(396003)(346002)(136003)(39860400002)(366004)(230922051799003)(1800799009)(451199024)(186009)(64100799003)(6506007)(31686004)(6512007)(6666004)(4001150100001)(2906002)(5660300002)(8676002)(4326008)(8936002)(41300700001)(66476007)(66946007)(66556008)(316002)(6486002)(478600001)(53546011)(2616005)(26005)(83380400001)(38100700002)(36756003)(31696002)(86362001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?amVhb1RKWklvU2pmRW5SdGxSSjhYNkpVRzZIdytNQTlJcVlpSUFTYnNOeW5X?= =?utf-8?B?RDBPeU92MUFhQlYrL0VUUy9LbExRU2tQYkdGd2k2QVEvMWxUdWd4SXVUVmhN?= =?utf-8?B?dlljdkF0dVZNcm5WVFFiRExQYnlqMXNUVE8zWWxZSVYzME5TdlFDY1hTV2pu?= =?utf-8?B?bWYzSW1mV0VrT25zVWluYkZ4bGpBQjIzcWJYalg1VXROdndZMkl5U1NHb1ZE?= =?utf-8?B?Vk9PUlIzcXlzM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?B?M3M2eElnT1V3dnI5a1B4OHhSMHloYjJZQmk3MElrVEZvbFFYUDcyVFNMUVZ4?= =?utf-8?Q?Z/r+CDOgRx+Lfol050aB8oxvp?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d348a00-5dad-4946-09a4-08dbcf26ce03 X-MS-Exchange-CrossTenant-AuthSource: DM8PR12MB5445.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 15:36:17.8655 (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: IVyfSJk8dluW1vIM5xpDsv08AQDOLKnSVBufddsuTl4sccpaLeT7Gi/34nFT5a/RVDXLIokRMJ4909ks4b6V7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8490 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 17 Oct 2023 08:36:30 -0700 (PDT) On 10/17/2023 9:51 PM, Maxim Levitsky wrote: > У вт, 2023-10-17 у 09:42 -0500, Suravee Suthikulpanit пише: >> According to the recent update in the AMD IOMMU spec [1], the IsRun and >> Destination fields of the Interrupt Remapping Table Entry (IRTE) are not >> cached by the IOMMU hardware. > Is that true for all AMD hardware that supports AVIC? E.g Zen1/Zen2 hardware? This is true for all AVIC/x2AVIC-capable IOMMU hardware in the past. > Is there a chance that this will cause a similar errata to the is_running > errata that Zen2 cpus have? Please let me check on this and get back. >> Therefore, do not issue the INVALIDATE_INTERRUPT_TABLE command when >> updating IRTE[IsRun] and IRTE[Destination] when IRTE[GuestMode]=1, which >> should help improve IOMMU AVIC/x2AVIC performance. >> >> References: >> [1] AMD IOMMU Spec Revision (Rev 3.08-PUB) >> (Link:https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/specifications/48882_IOMMU.pdf) > Looks like the link is broken. The link above is the default location for AMD IOMMU spec, (which is currently being fixed). In the mean time, here is the temporary link to the latest document. (https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/specifications/48882_3_07_PUB.pdf) Thanks, Suravee