Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp637302rwi; Wed, 19 Oct 2022 00:30:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49APIX9WHrmHA7Y/dcUgkdDIoZL9yBkQbickStJLXuGQkhTNnsRVJ/25sIb4U8CEWOUsJC X-Received: by 2002:a17:907:980e:b0:78d:b6ea:25b3 with SMTP id ji14-20020a170907980e00b0078db6ea25b3mr5636433ejc.98.1666164649904; Wed, 19 Oct 2022 00:30:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666164649; cv=pass; d=google.com; s=arc-20160816; b=SOAGCJ9gbkHYc43tZiXpB7iMHem85unv2+iXybcFyUFSbIk8lKVO53AZ1k0CXCWbVo ExrdFV/UI+6yrQ+GwjFHYuoYwm62e6JVmy2AwazAsGaGIKt6zz3HCODAde6H2pxcHDpx 8Ukq+XU6E/kiJskxIZYLerVzWUnYqjq+wyltn5HtF7TLXzI8CeQE+vpHS7iIVf9VoPtw z4rVHKeJ4TtVdMA3uc2uch3SJr3uvLSDKg1qwGc/iTGXRFvLdTcW58OmZ8j5+XoVI5ja qqQpVM9Tu49u1QtXslnDOxaFGZtWc1aYzGZBvevNPGuo4L6DH8Kt3wQtB1n1ybdzu/a/ GINg== 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=8gKn4jDfiUx04DPGvs4tisFfztIrC/AeLiSiM58690c=; b=K9lP/q1iP4+qfbj0nVALq9lY0ApGSywRZmlNE4HFjWEa71R21fnc3vJ+Ao/P9oCNQ+ jQ25lP4o/iI81zqMPXtJ2ihs+lyltpxYb30rYlo2TPsP0TJQ1IgR4MGAgPmcS2L6+Nq2 VaYnrprdOn2AUT2V1+Sgj4QoTE12O+RYA7O4coik3oGDu4jVfbAQD4ne1/DnmwqYSgEY erZcqS6oFKc/DOVO8smPDj/YynB37JH46rqhJChTujau57Akj//50eSaz7MX3a/HtCFY bqpYxHxjEM8JoG29EJcqWWxjYG4w9uBN/DycPycNoOQbULn3pnkOvgZ7anJQQ85pgkto iQWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=XHkighpq; 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 dp19-20020a170906c15300b0078c47b4478esi12794034ejc.106.2022.10.19.00.30.22; Wed, 19 Oct 2022 00:30:49 -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=XHkighpq; 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 S229726AbiJSHEl (ORCPT + 99 others); Wed, 19 Oct 2022 03:04:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbiJSHEj (ORCPT ); Wed, 19 Oct 2022 03:04:39 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2071.outbound.protection.outlook.com [40.107.94.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F8F5186E3 for ; Wed, 19 Oct 2022 00:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ipfQH0pei+kFJqFtQ9HM6yqzqDTQJvhAc4NG69CzAQogE+65oDmiDjtAKFdeYm2UxqhC7L0R6qCNfTZNHkvrs8DQF5K+GxIbo6ZyVxbLDd7LnPPpIUrgA2kQIsxuG71A8b+NSDqv9rPayoZFxIt7GRwJ/0JYvCJjZGbgNBvUugji28xQLSOMBc1ivUA973+SBlalvQ3nZpeBne8AfuORiyha6NH1DSEmUptoEvWVbjz6F0sa4BcKKdNjjl/fot4CVO7lJ4sNXh7mzzuvTrI9WW2sTckta/kdZtabYWu6CxLrRGIQR0/Cp5sDHoJhGGgvXpy6BwLbJXBy6b7rdVOJ3g== 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=8gKn4jDfiUx04DPGvs4tisFfztIrC/AeLiSiM58690c=; b=g7PA+heITYpmMjjWoyrokpPQ1/tlZBNEEiFXEVHnxPpDBd8wD044fd7G1y8XNh7zoaVhkXvsGIziAeVbtH3OFHdjSK3elqSIFkWM5jzdnMmbimVaEmBh1t1YggZqoIlOBNbYSYpBodofUhvIHNUINyc16FHPq+OMQDosICeJH7olctr5ieswMAsDH0YuqhBRNSE9UMBQ2bAO9SCfjkrgO3xgcLfo2/zLmnpp2CdAleS4acYFTmumCWRHgytbwa0MG4ZZ1OiiPEnMl6zI65MYtOz4C2WTl4CSVduRNYwfzeJXnkS5wLVEHa9ORvo6hxOnVGBT70rTCZoiE77GFgXNww== 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=8gKn4jDfiUx04DPGvs4tisFfztIrC/AeLiSiM58690c=; b=XHkighpqCozhqoFae4mBKBQaZW/38XiJZ4NXX49Eiqf82N1OuC4cEIBrNnlLcaSpajUB6ymxoi6x0G9wMWu6tUGVeanLNtDuJeGhF8vn7krkdZLGMZd9QHGkpJxRm906w87Qk7eqFPTid3xbJq59yIoc4USNHRGO2NVwnBAr8Q0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) by CY8PR12MB7585.namprd12.prod.outlook.com (2603:10b6:930:98::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Wed, 19 Oct 2022 07:04:34 +0000 Received: from DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::580c:51f2:b715:17cf]) by DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::580c:51f2:b715:17cf%5]) with mapi id 15.20.5723.034; Wed, 19 Oct 2022 07:04:34 +0000 Message-ID: <0a0dfecf-9827-6ee8-0cf7-895b2ebf3e98@amd.com> Date: Wed, 19 Oct 2022 12:34:15 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCHv10 10/15] x86/mm, iommu/sva: Make LAM and SVM mutually exclusive Content-Language: en-US To: "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , Peter Zijlstra Cc: x86@kernel.org, Kostya Serebryany , Andrey Ryabinin , Andrey Konovalov , Alexander Potapenko , Taras Madan , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , Bharata B Rao , Jacob Pan , Ashok Raj , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20221018113358.7833-1-kirill.shutemov@linux.intel.com> <20221018113358.7833-11-kirill.shutemov@linux.intel.com> From: Vasant Hegde In-Reply-To: <20221018113358.7833-11-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:9b::18) To DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6048:EE_|CY8PR12MB7585:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f4666ff-778e-42d6-214f-08dab1a02d60 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dPXzoF01riSSxXVfmGejEcR99W123Er52rPOuI19PgSsgTtvFPPa+C+Nb7nortlxN9lBRVeaZ0W+PUGpIQ+7yBf14jCeYQrFqxYAZ6pZ8wAQqP0k9osDB74mUsZXkUGkD4Z+1fH+v5qMi2sROUUAX6erH3h3qlcoG/RBWGGsibe84dBJE768BuM5v2MfPdPYlMK2bumI+A2PpTSvOsPH+udLB0Nb3KfqILg78R+jCdS3c3lxUF9CH0WMgFv/yWijGUQXQqswQ1/XiSYnU56BN3TZtNp3nWAmhKIRDDk7go6E4SGF9emhs4xVO6XLoA6FZnlci4Vcwvny0gOfLDyy2Fp71rrAYv98RXL2QdZGQCzkR2Z6/t6QUyAf7w/3Z/DO7PM/Gxx7GRl+xUdbOxVfVKpuMRi2KqlRIfJy/1zeVMGMsNvBZsjFQ8vPrK2mRTUtu8ZLEDOMH8QzD00K5AGVHPoA0lbMP0vEEp0TZgu0iKHWmWFHRAMof/g+CJkF1svw0mx8dcTRuDEXAyxDE7CSEsavbYu/5DTcTPuS7LYW09i97sjq2UfrLH+B34F+qdqJ9te53BRfofzlse3dA90nw6tXcOBaVvvzx248QiMVLtOijiNL9ZLdDCJbfFDGanHovPdLi2+JdSoFMdZO+/NMNqZvDXb831nVGYdxnts8DR8hoXYgiexFBAVrm0IV16Iz95HwDpmcL1LD9CvPrWiWbt9PX3dOrYYjHTz2PPtocQQyuH3BFpjauiKoSVoG7NxM+d3fO9C9RwcHCFr4CEXueEjVwRkoYTTCRYHGKf++Py0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6048.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(376002)(136003)(396003)(39860400002)(366004)(451199015)(6666004)(6486002)(478600001)(2906002)(5660300002)(4744005)(44832011)(7416002)(86362001)(31696002)(36756003)(54906003)(66946007)(66476007)(66556008)(41300700001)(110136005)(316002)(8936002)(8676002)(4326008)(83380400001)(38100700002)(31686004)(26005)(6506007)(6512007)(53546011)(2616005)(186003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RjdOOWo1bERVU3pxTEFmV2h3STRnTFdhVFdpYk9kT2F5eDhTU3hGbXU3ZTFp?= =?utf-8?B?eHVkNHJCRTAzeDJ2KzVpaG45cWJmU1FmdzYrMjhZakhtMHB2dmI3RS9Ob1dR?= =?utf-8?B?T2R3b2Vtb0VpZmhiV1hsbzVaUHBNRVBtVUtZMnhxMUxYZ2pvVmg2dlhMdWNQ?= =?utf-8?B?azEwcUhjU1FyNldHNlZXeU9MUkQvSW5YVDh0c1Q3NFJSNGpMdkpDOCsxNzh6?= =?utf-8?B?ZXEwMDVCelNLS3U1OVIxeUhnRFVhVy9TT0J4WldRSHBNOFprS1VoZE0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jh3VTRkZk5DMElxUGx0WFcvVVBhSURkWmdRRlFDRWR4K1Av?= =?utf-8?Q?SZ8X1zPf666NtKl7hGrogW5uv?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f4666ff-778e-42d6-214f-08dab1a02d60 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6048.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2022 07:04:34.4254 (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: 97q+FSioTtABp2fxy5wYSqzsrLQM+Dh2qnDVibmqIKacodFg4oeXvkEboMtbZYCJE82ZSPY+Em4Ojg5QX26klA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7585 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 Hi Kirill, On 10/18/2022 5:03 PM, Kirill A. Shutemov wrote: > IOMMU and SVM-capable devices know nothing about LAM and only expect > canonical addresses. Attempt to pass down tagged pointer will lead to > address translation failure. > > By default do not allow to enable both LAM and use SVM in the same > process. > > The new ARCH_FORCE_TAGGED_SVM arch_prctl() overrides the limitation. Better s/SVM/SVA/ ? So that its consistent with IOMMU usage. -Vasant