Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp319739lqo; Wed, 15 May 2024 16:07:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWlqS9SdekHW61T4TTNMOquA+gwhMs/z2rHezGBDXStu6OCuV94OHozvzHIeL5zV2HpsK2bMct3OBmHkOaoBtxvLmsTwy6szPnUhw9uJg== X-Google-Smtp-Source: AGHT+IFZJiawMaeHb8K0zmFeDwYUHU/Lk8FfkCQ1z4J8/IR73UQG0NXchLlAOos6oj1opAUUeHH4 X-Received: by 2002:a17:90a:c7c9:b0:2a0:9b18:daf with SMTP id 98e67ed59e1d1-2b6ccd87d21mr16331918a91.42.1715814425607; Wed, 15 May 2024 16:07:05 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b670f56d97si14663237a91.58.2024.05.15.16.07.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 16:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180463-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ASSK6RcH; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-180463-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180463-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3870F282939 for ; Wed, 15 May 2024 23:07:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE8EA4D9E0; Wed, 15 May 2024 23:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ASSK6RcH" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18B683D0D9; Wed, 15 May 2024 23:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.10 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715814413; cv=fail; b=FpakmsQmdbzc5Ar2eP1YxpDJFTztkBnk14nsqMEKNshLwe01ZhECLFqthDxGYgCd1A8pj0YXKyGNwNvFVtO5mPzrFaxKBH6CLKKhrW4EClocrEVd895NL3m2MTAcJdPPpePWaHLPILpIJBYM/KonBQ/ym3VGvdDJmPYdk6WC/BY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715814413; c=relaxed/simple; bh=QkLKdkCGVoaDNAoYveMhIQ2uCHmgGqGE4BpWOF/A2IY=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=e9dRd12QjiM5AgRLJh3ZenzgpO/PU6huEY1qtZtlcpOLcRimkJoFcI2TKI4LcKWYY6k6R1eI3WwrTXI7dTBhe3QIP68h516fveUgeRu4f2vpx38KhKxyLUkD8cdfdpLgNMhf+khlH8TBK2nDJvSO1D6wVyCjf5AlAg0zgOvf81E= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ASSK6RcH; arc=fail smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715814412; x=1747350412; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=QkLKdkCGVoaDNAoYveMhIQ2uCHmgGqGE4BpWOF/A2IY=; b=ASSK6RcHKpP7nGZXlFJckPn+G/kHMY+eyJCVS1XuE2Lhdyz8yweZ8KG2 FrvkRJBwrbw6J/HyItUXOy4tdpRN8nPVT6E81dP1olwkofii43LteDd0K W8aypavAhKFshmINfKtnivqbp/DuzZpdnKWMGS7w1w3uX6jhVgbeObc71 uvgB4KQsS3ax6P+W8+eAwOuAQpA0bCW3SI4N0IVt66HvO4GW0oor1BZGh gt5Vw7JPcRYi8q1BiF/Fn9yq7RljtjZzMKWmqitD99UKHBsgBKiiWGV1h RfY4/CEllrBlTRibPao13Hc39RIAA5CWgjR45BOCZobbEIrZZs/breCCN g==; X-CSE-ConnectionGUID: gAaJ/3wPRbWQxWvYuSpzpQ== X-CSE-MsgGUID: b84XfDzdTSiPQut/SkdISw== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="29385157" X-IronPort-AV: E=Sophos;i="6.08,162,1712646000"; d="scan'208";a="29385157" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2024 16:06:52 -0700 X-CSE-ConnectionGUID: LKuI9y4iR2OjG5DoKo/K4w== X-CSE-MsgGUID: r+Uo6CvCSZmOMngHRgm+YQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,162,1712646000"; d="scan'208";a="35748538" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 May 2024 16:06:51 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 15 May 2024 16:06:50 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 15 May 2024 16:06:50 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 15 May 2024 16:06:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JM9h4iwlh1loieLsgHHUkKuZO50TJvBXRcKtjTPOvyt4YGaXyPfYyIknFFdkGzdjPSilVI6QnHiPEnq5QYYxDJmD9wFHI5KxkMjZdtD2YODZgx7IR2k4Q1VO1RDbKP5uAihtgAvxiuDg90TZotZQ0GkqRez9UBK4X2vAMilQ6rq9/e6K9GNkZgqsFm6jgHIu5Gw8ALZqY3ookyiG+4yYhRVibEFLwdAfEgDEz8+caxBI4FU4MM7n+wV5XWb7KJ0Tv/NdsOUhHdIHkLFAViE0kdSUe+0rvEL2Gq9pmNOp1VfVZI1I3FBxpaGPlEuvR2uyIm4+QXBLo8z97BMJebW/yQ== 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=Xo7xw4KuOjdUXhQWvPu1XH2/5FIhPoA1bOmVrQ+Zpxw=; b=AhAObRfZH4094Fwj3vkxWl9igy2DsLcGCmpbWFgOLSErsVJFOHsIzmPgvg2GhhqlfuY+O3w7m/t6okrx3zr8PuRkLgfGGbxDp4j8ACfArTGBxw/46MT6Q6QFcVF1qKhtmyLHqcA1/OehjLrgGHmr2k0PsE9P2DujtfOLWwNtKkbcs5Jyokv/+tvR3Anqk82oEcBSymO4Kuk5xiKGqEjGYcGlUHaRVtahVwb9T3KpCMvHE7qD4nRHPrl4eBlm47SNTB/8xKUXoKQZstWXWTPaVQhOo/ja+KWdf50TdwJOGQBjsR5RPZAc7BJBlYrInsfQfhQ35Bar7E3YqyFs1qghaw== 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 BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) by DS0PR11MB8718.namprd11.prod.outlook.com (2603:10b6:8:1b9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Wed, 15 May 2024 23:06:46 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b%4]) with mapi id 15.20.7544.052; Wed, 15 May 2024 23:06:46 +0000 Message-ID: <175989e7-2275-4775-9ad8-65c4134184dd@intel.com> Date: Thu, 16 May 2024 11:06:35 +1200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/16] KVM: x86/mmu: Introduce a slot flag to zap only slot leafs on slot deletion To: Sean Christopherson , Rick P Edgecombe CC: "dmatlack@google.com" , "sagis@google.com" , "linux-kernel@vger.kernel.org" , Yan Y Zhao , "Erdem Aktas" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "isaku.yamahata@gmail.com" References: <20240515005952.3410568-1-rick.p.edgecombe@intel.com> <20240515005952.3410568-3-rick.p.edgecombe@intel.com> <1257b7b43472fad6287b648ec96fc27a89766eb9.camel@intel.com> Content-Language: en-US From: "Huang, Kai" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR04CA0246.namprd04.prod.outlook.com (2603:10b6:303:88::11) To BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5978:EE_|DS0PR11MB8718:EE_ X-MS-Office365-Filtering-Correlation-Id: 94af8e4d-d428-4779-b10e-08dc7533b0fd 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;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dFIvNGNkdnUyYmRwVG9IWDlSVTVkQk9IVzJrU1BBVmxTbnp2VWlSazlYbWF3?= =?utf-8?B?b3BLcGNadG1BamJpd1hkZllNN3BMeXpHQ1BpdjAvYmROcWdvYnZwc3R5QVN1?= =?utf-8?B?SEV3S0ZYc2o2VkVxanZ5Q2xkc29Wc2hiMWZCSGw2MjJXdDYyZjgrTGpJVFBq?= =?utf-8?B?VWxSSDMyTG1SS2dib2xhUUttZEhidXpwZTJrZjZwY0NWeGkvTkpVcFIyUDJw?= =?utf-8?B?NUlPUVNRQ2YrS2ZRMVJlVUJEc1JqbHUyY3JFQ1lHZk9RaFA3QWV4eTBENnVl?= =?utf-8?B?aWh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Qk5a?= =?utf-8?B?SEtaRndJWmsyWmFqR1hwOVBCMDdqbkFlYjZUQ2daYU9QL1A5d2JEN1BGU29L?= =?utf-8?B?RGtNTFNlMTFkKzl6Qi92SlA2WENNRkU4Q0ZkZnF4eENNM0hPbmRjTkhZOWgz?= =?utf-8?B?YTI1VHYzaHI2ckk0YzViOG1XdW5HaFk5ZHVxeE9MUUNRcmNLRHJZbHcrVWdZ?= =?utf-8?B?cWJRQnRQY0VVeGlhcXNZNlgrNjAyNFR0S3prK0htbVc3Y1o4aHk2T2x6aDJM?= =?utf-8?B?ZGNTM2JxZ3FNRWI5N3hwTzdPNThJNlArN2hoUEJlbW1vTUJhb0JNcnZSRHJL?= =?utf-8?B?ejJUK3ZMLzNjbkh4bEcrN0w0RU9oVi9kUjdCMGZFeHphaktjN09VNVlwOWNu?= =?utf-8?B?TzA0eCtFUGZpUkdDTDZiNmY4YlZxZWhrMWJJS3FFNU03Y3JkTlVFMUtldWJZ?= =?utf-8?B?eXN4Z3d0SCtWdEZvUS9ZcHRrY2xaZ0xYV3dFL3JCaXBJL05ORW9RcDQzd2JI?= =?utf-8?B?ZDN3Wmphdmxqay9peHhBMWk1T0FBTDlsSkE1TmY1eDFCeVVHcWhUcTNBPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5978.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U1RuNWxQTmZ4QnlraUdsckZ3SkcrS1V4OGlBaVNycWhkelNMQ2NaTkRmbm1s?= =?utf-8?B?MXZFS25Wbm5iNTM2dElFWlZyNnIyaXBxbFZOVUp2bFRxQ0QzaWtRejF2Q3pZ?= =?utf-8?B?cjl5bUQ0TE5wdDlwTTdnSHFOVVI1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eVdFMzdUT2dZdUJkWERRS2ZnNVhEWWlCeVlLWmdxdnRSdWNT?= =?utf-8?B?Uk84REJvQWZSZHFtR1JDNGhxcmRkNytTUzl1NnpVNFQvZmFjOFBzaWNBR3Bs?= =?utf-8?B?dmNYSHlTYnVkN1lwZXVTOFZGcENud2V3QUh6VHk2M3kvNjdQMzJoZmxTYmhO?= =?utf-8?Q?okN7fO8w3u8Wt7HLaj2/YENjo?= X-MS-Exchange-CrossTenant-Network-Message-Id: 94af8e4d-d428-4779-b10e-08dc7533b0fd X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2024 23:06:45.8964 (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: XtMd+b6ISj4JwFq9+OyBKa/wGlwIUBiJNeZ1bxFjhWBZ8ml/Qq2CKvYNzC4ul/10H93xDjdWag7Ud/XKRPoDyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8718 X-OriginatorOrg: intel.com >> >> You had said up the thread, why not opt all non-normal VMs into the new >> behavior. It will work great for TDX. But why do SEV and others want this >> automatically? > > Because I want flexibility in KVM, i.e. I want to take the opportunity to try and > break away from KVM's godawful ABI. It might be a pipe dream, as keying off the > VM type obviously has similar risks to giving userspace a memslot flag. The one > sliver of hope is that the VM types really are quite new (though less so for SEV > and SEV-ES), whereas a memslot flag would be easily applied to existing VMs. Btw, does the "zap-leaf-only" approach always have better performance, assuming we have to hold MMU write lock for that? Consider a huge memslot being deleted/moved. If we can always have a better performance for "zap-leaf-only", then instead of letting userspace to opt-in this feature, we perhaps can do the opposite: We always do the "zap-leaf-only" in KVM, but add a quirk for the VMs that userspace know can have such bug and apply this quirk. But again, I think it's just too overkill for TDX. We can just set the ZAP_LEAF_ONLY flag for the slot when it is created in KVM.