Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2129306rwp; Fri, 14 Jul 2023 00:53:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlHNQ/JgDQTCWSZ9cYUh3awE1kAfGB9w5pvHNIWz2uw9zJvjIaY7XzRglWy7inEC9emcf2Vr X-Received: by 2002:a17:907:310f:b0:991:d5ad:f1a7 with SMTP id wl15-20020a170907310f00b00991d5adf1a7mr3543856ejb.51.1689321206834; Fri, 14 Jul 2023 00:53:26 -0700 (PDT) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a170906358f00b0095317ae767esi2626127ejb.46.2023.07.14.00.52.58; Fri, 14 Jul 2023 00:53:26 -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=@intel.com header.s=Intel header.b=AtswHey9; arc=fail (signature failed); 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235431AbjGNHhz (ORCPT + 99 others); Fri, 14 Jul 2023 03:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235432AbjGNHhx (ORCPT ); Fri, 14 Jul 2023 03:37:53 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7D992D74; Fri, 14 Jul 2023 00:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689320271; x=1720856271; h=date:from:to:cc:subject:message-id:reply-to:references: in-reply-to:mime-version; bh=wHKxCZkoykJoIg3Aoc2Ic0URuBzoi/tP1ZDzjSTCsrU=; b=AtswHey9P5NU+UK2bz2lZrwPT1rDnsZD+PAzA4eiJnAj+nIzjrHJK2WE 40VfAX1/N2kQsNCgqFecH3qcLCOFpz6nlxcUsXjshjo5/mmXgA0wgdjN9 fLdNJLemMGGNhvzlCyxW355QUd+9Y8AwXEp4GsmmYxbkS7N0P2HFunLXu Y7KxjJFq+VbQKMmiwBPCuMsAupZlBxjT+YWef3WlkZ7Hb7qRf5H4amXbC CCU8yL5xniIGCmwuzsO6li4tzuNoB9uH+2XRdwG9BXjRFAY88TRKiKPUi lIkhq61tCc95jfUtf0vnxMOSWooI0FCzXA01oCf7U4gaw/4Omai+BoSoL Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="396225974" X-IronPort-AV: E=Sophos;i="6.01,204,1684825200"; d="scan'208";a="396225974" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 00:37:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="812333701" X-IronPort-AV: E=Sophos;i="6.01,204,1684825200"; d="scan'208";a="812333701" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 14 Jul 2023 00:37:50 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 14 Jul 2023 00:37:49 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Fri, 14 Jul 2023 00:37:49 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Fri, 14 Jul 2023 00:37:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ecFhEDb8SckrHp4uui6S5wc8LOmVqdsKf3BkwQ+dTFgFYNblJyhrxeJ0qabsl7NN5w3zXk2TPRbChZ5n6Q3pnd7s6dWYhmV+3VsQWkvZn1b0L5jDtzca+exNjlICBKdJ/PzPNeBagTHLeAWmn9LiE9cELJ1byFFf3N+bRt7IUcVe7DjmBIMj4eMxTgTzaF949oaDtJraclxBoyckMbSANmjsui2fsnAWvqas6D5HNwx7BkmbHbfvZHukJm51b4P/VxZX2EpzB/Xyof2fdfwkdBJfSbd1FlIp8/jSM3C4K5sV43V0nO53RXfWOMXiWxDnwDuB10dhfYA23FHcz6P5og== 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=HHpfQfK87dnyFxTMGhnatNwioF2kASk/9y56BxRvZaM=; b=ZucTVb51DzpUA1zU8eaf2OphOuDOtjm2k3azCuMSg0/umtAPGdhzLORSiJAy5iHfwP6yH8qIkoIsaxiDG+Cwe/M8bMIFynqftZrsrnMkssgi7iPUJVilQNH9ORRCprgg3GV5bnFapwDQ1tVyWdexfQoScr+JRMj1SXbzGbRpW4mkhDAndkf/SdhgbmuABzaK9rC51kLPaJV0Wx/nWASo2OXwEDUnUTygtpE5InCoiTg7I1RoCUhJ9nX50Ne7UBNx+bE0dBfgt4Hwe1VgKjeJp/Kl8DoF/P1CkgGXWc7MXjGpmxUJcx63wgwiN8bX/Q+O2JVzmnOAaGGQJPARf1G+UQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS7PR11MB5966.namprd11.prod.outlook.com (2603:10b6:8:71::6) by CY5PR11MB6365.namprd11.prod.outlook.com (2603:10b6:930:3b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.27; Fri, 14 Jul 2023 07:37:47 +0000 Received: from DS7PR11MB5966.namprd11.prod.outlook.com ([fe80::c7b3:8ced:860d:6fe6]) by DS7PR11MB5966.namprd11.prod.outlook.com ([fe80::c7b3:8ced:860d:6fe6%4]) with mapi id 15.20.6588.027; Fri, 14 Jul 2023 07:37:47 +0000 Date: Fri, 14 Jul 2023 15:11:06 +0800 From: Yan Zhao To: Sean Christopherson CC: , , , , , Subject: Re: [PATCH v3 00/11] KVM: x86/mmu: refine memtype related mmu zap Message-ID: Reply-To: Yan Zhao References: <20230616023101.7019-1-yan.y.zhao@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To DS7PR11MB5966.namprd11.prod.outlook.com (2603:10b6:8:71::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR11MB5966:EE_|CY5PR11MB6365:EE_ X-MS-Office365-Filtering-Correlation-Id: fba293f3-b529-467d-530c-08db843d380f X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9WzHW+zQs411/QexUqzzVOC9xOLdRlKuF+u8tSmjTxuVb265lCYedXvjLMI4geCXqPWVbaQO+iM/PJ/a7y/+tC9M+ofeiHA+pAr2R430lTRw4nAkZlgsk58u4Yr9TwdqviTXFxrTjaQJdwJOyT2gAJ1JbxU1kJWOUn/reKP/6C3rNBPSeU+u8JL53cRtxVU2jFv/q/cY0T0/ja97YgeG5qG18w5IppELqWjbCw5rGiFEt0F7BK+xoJr9p9h3FZjeI5d04nRHmLrv4VI1QY3BjcHAafoU/V2S5pR4xub2yBepc8Q8wpFxzwWR/ZZ/TPjZHSyDh69BOgRAvqlRvrzyhlkldbVtKAgIGIuacmSbbGepNC5yAO2u9xxJF6Op7u9K3v4EKjjfBxnieBYJnSdd7IL835dbPxsVbzZdJrxx87LBvyo2mAAmFd/2gski9posh9kDelBeVDPhcE3XjXnv7i/+dcRWrbpEZthMKarXBvfOFVXfs2TNspNF/BpTWZOsKuY3dhXN8q/1WQGR6JKnicDVaVAxyQpyqdaPjo+64Vo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR11MB5966.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(39860400002)(366004)(136003)(396003)(376002)(451199021)(2906002)(478600001)(6486002)(6666004)(8676002)(3450700001)(8936002)(316002)(66946007)(41300700001)(6916009)(66556008)(4326008)(66476007)(6512007)(82960400001)(83380400001)(38100700002)(966005)(6506007)(5660300002)(86362001)(26005)(186003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?FexJsGyWnDw545Xi6dyOe+SaiJT87A/TQqH6rN1NjoNaqPb2ibmNxEcX40SF?= =?us-ascii?Q?I9I2srR8wJlAlmluJd9Z6gJ+etl6swLeNy58aOBCUd2jyUhs1nzCQ9Behfjv?=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+FwuQZ8BgS+Bjhr0sJdQca?= =?us-ascii?Q?GxtWoqKkuub8PHPByDqQrQyd88w3CVfX6vHkiVGIQCkSk7QK3Xo5tGQkz4cl?= =?us-ascii?Q?uyEjBkr+2mePj564ROqJiPeu+zXi/NF0jupXos0f+dPd0TkLDYAGDiFympSg?= =?us-ascii?Q?t7UMMNsQ4WPwXdTxX35sUC0N+YiWxeJOH75XRst8WudQ1XzDyxsLslwgdtFw?= =?us-ascii?Q?dG22d/kRnohrjeoUG1UlQbWkWgd4Q8a3sKJqaK+q2G3H3XW0ftFaGD0+ti8K?= =?us-ascii?Q?+We231b7WcAjK3RiBXfFb/jf9H+k1JKTE8SSpzjxhm4/NkFg1YqMMnr16SfE?= =?us-ascii?Q?foYEX3R9lNLHdgQpbdro0eOk/YHNcMU9j66SdsKs9p44e5eneuBhAbOHPP1H?= =?us-ascii?Q?w4O+cBdDPEVjs9JMdiewh2MX5FmcVcrwE1wyUHK7S0/5LdWBr0BC8N95kRiG?= =?us-ascii?Q?/ICD68ZuvXWoo7MmYdEAgpOk1dP6IqkTqtrgbmkE281Xg222mLNK/tyR1hRV?= =?us-ascii?Q?WpeZ3CNs0O2ZwFcgoMO2Pq5W5+lAD/tY6XQAMa5SthZxuJlChooDOInk5qQE?= =?us-ascii?Q?UYchPEq9Gp7mpxh4YGZnzmleg7JtutxFT+DctD5y?= X-MS-Exchange-CrossTenant-Network-Message-Id: fba293f3-b529-467d-530c-08db843d380f X-MS-Exchange-CrossTenant-AuthSource: DS7PR11MB5966.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2023 07:37:47.3013 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SH2KiMry3I/26lHhr9TyxtT08j7AnnUVGtQ6kqad5T2cRjpBT7vwWSBIUuN9yewxve0v2kwaH9SVqaiOeZsC8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6365 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Wed, Jun 28, 2023 at 04:02:05PM -0700, Sean Christopherson wrote: > On Fri, Jun 16, 2023, Yan Zhao wrote: > > This series refines mmu zap caused by EPT memory type update when guest > > MTRRs are honored. > > ... > > > Yan Zhao (11): > > KVM: x86/mmu: helpers to return if KVM honors guest MTRRs > > KVM: x86/mmu: Use KVM honors guest MTRRs helper in > > kvm_tdp_page_fault() > > KVM: x86/mmu: Use KVM honors guest MTRRs helper when CR0.CD toggles > > KVM: x86/mmu: Use KVM honors guest MTRRs helper when update mtrr > > KVM: x86/mmu: zap KVM TDP when noncoherent DMA assignment starts/stops > > KVM: x86/mmu: move TDP zaps from guest MTRRs update to CR0.CD toggling > > KVM: VMX: drop IPAT in memtype when CD=1 for > > KVM_X86_QUIRK_CD_NW_CLEARED > > KVM: x86: move vmx code to get EPT memtype when CR0.CD=1 to x86 common > > code > > KVM: x86/mmu: serialize vCPUs to zap gfn when guest MTRRs are honored > > KVM: x86/mmu: fine-grained gfn zap when guest MTRRs are honored > > KVM: x86/mmu: split a single gfn zap range when guest MTRRs are > > honored > > I got through the easy patches, I'll circle back for the last few patches in a > few weeks (probably 3+ weeks at this point). Thanks for this heads-up. I addressed almost all the comments for v3 currently, except about where to get memtype for CR0.CD=1, and feel free to decline my new proposal in v4 as explained in another mail :) v4 is available here https://lore.kernel.org/all/20230714064656.20147-1-yan.y.zhao@intel.com/ Please review the new version directly. Thanks!