Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp582600lqo; Thu, 16 May 2024 15:23:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZOLUAfNW1VgrOwONlHfACqDvElfhuwVnaYNFQ5Q3HMyotvTR1Q0uvGQ/s2AQrvQFx2C4AXhZbuoFeH0BluGdnMNj/qJjBDBWJrlJGYw== X-Google-Smtp-Source: AGHT+IG7CYhEFPVxzC/fiKzGnMt3mNUf3Dmo/uECMLY50W2liws6onukCdaLUUPJbjepWEJb1wDZ X-Received: by 2002:a05:6a20:6a22:b0:1af:8e8d:cefd with SMTP id adf61e73a8af0-1afde1ddafdmr25739502637.51.1715898231108; Thu, 16 May 2024 15:23:51 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f6eadsi16063491a12.421.2024.05.16.15.23.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 15:23:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181607-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ftRWeeVl; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-181607-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181607-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 9477C282FBA for ; Thu, 16 May 2024 22:23:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06BD31586D5; Thu, 16 May 2024 22:23:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ftRWeeVl" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 C79F43FE4; Thu, 16 May 2024 22:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.20 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715898219; cv=fail; b=i44jNTg0jqFzsRgOpAblIhuAcDWhgpJs2qKRoaQ+Pr5gJX56O5L3KnJRpti55oqsDhs07VAHCnSyv+1fPUzztEe4J/DdnrbC1fe7P3p5QY8sspSYAIPjl/WDu72NiuWAom03jInz8Vtkl/T3IVO9T4DgabC8WN7TyJget6ngpG8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715898219; c=relaxed/simple; bh=uUtvEOtfrhPBU6VoRyI9Tx6B7Q3vEeobR9ihMfGcT+4=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=bnQU/+YviNrFsU9Nb0u1goIU4C/QfNBfPsexBmzpXO659r98Tsl09F8p9DeeAeoL0Y0JjCLffJdBUFHpJpnlqQtjMC1x6agprl4fZou+Sq9veH5Tq3YlT3OtRgEQ5NpGGMn6Ube/u4JEZe0CqUxyeLr3lE2oK0uFrd7gUHjgbJ0= 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=ftRWeeVl; arc=fail smtp.client-ip=198.175.65.20 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=1715898217; x=1747434217; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=uUtvEOtfrhPBU6VoRyI9Tx6B7Q3vEeobR9ihMfGcT+4=; b=ftRWeeVlWkcWm3SayonzerMrQ3IPHxa3dTSnkwQ6tYS2ryBmEoZIpy2Y oUY2m9GJE48RpPU+Wg4LWBzAmXCh0Fb/wo2BwoMhjka8GgVsfwLc0x61N LEpVHcaF3Ozp//JHNdiOP+G7W0OJ9gVZ08Um+SowaYa7bL4+8MXBkgaS+ o5MYRU8gka1pgPD1Yk+uKZD6IRELgGs2PfRUu3EdyZSmmqY8CzkUawTBd /OJLfXoHPVRd8yWaY5KtIiHPi6HhBWL8KcoJJiH1PYijNtByQWt4zF2fl l7Z/fCFWPJPrCTLO9rdStwLLGZg5HGMUdigiwzi0FzGLL5hVwq8CfzJZe w==; X-CSE-ConnectionGUID: mjGStOapQCyxI88RFwAVWA== X-CSE-MsgGUID: r8p4zbmISOWW6SsJw4eRjw== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="11890707" X-IronPort-AV: E=Sophos;i="6.08,165,1712646000"; d="scan'208";a="11890707" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 15:23:37 -0700 X-CSE-ConnectionGUID: ynGgC4qNT5CAgiAY4PW70A== X-CSE-MsgGUID: 28RW7p+9RBmADZFYCe6IWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,165,1712646000"; d="scan'208";a="62405578" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 16 May 2024 15:23:37 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Thu, 16 May 2024 15:23:36 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.39 via Frontend Transport; Thu, 16 May 2024 15:23:36 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 16 May 2024 15:23:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IK215+YbX8ZpJ8M+wkT1Gk24C6wBr3VNzRp1oTN8bzlElAGkaVSOzq8uvUT//BGcR/qDCiruIdAjnXybbGZcpwfQgdePMRztZvlZiVCJQIIi+DpGAMyY/gso2ZIa1JGvW2BEEEsUCXnbDhkQym9zzRCiW8ZOrSEdsPjREvSQYkn0kaZmp096mf+LfY4Y/mD9Cy/kkP4Em5IZEVYPNU7Rl1r6vBGAB+b6ZKzJurx3XXhY1OIVyz320H94q26+72ei1wZYGaHVh7iHskRCgjgVT04fHrctuoEvWadvGgNExTGo2Q7GQnuv5Ah1hWa/fw6qgJGWmawFAiznXk+mpdlAKw== 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=DuEufxLsM77KG62pJUpKZaPhat2o0dcy+wlkXfFHqcI=; b=PBrr/J2bVvcUW4JSkGPOmidnLGdarISn9vPMs6bk7FJvKUcrRuBlGHzKC2w840lzsyGZOjBnUOZNDmOIwS/26iKuf4NfNA+n6dsF5sk710j2JbU7i3y90Icpetjl1rm5aV+iRjMS4Lh+MXbLTjPEeF+RNEeACVKr/l8b9MPaM1Ne0B5bpeYkxsMW4ntXbFOTfXl8QxfzdKcdFJuutY+KMs67PvKeGiDk9sZ8LxArV208JVE8hOxMz9u0THaZIm26/m5hWTqS6xDMe7FToGNJ7VwjEZyBY0aQjrpiW8JLYxD8XOcE+uhF/x3i7ThHx7IMqNByoarAHbv9nH4q1XI2Eg== 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 SN7PR11MB8065.namprd11.prod.outlook.com (2603:10b6:806:2de::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.45; Thu, 16 May 2024 22:23:32 +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.7587.028; Thu, 16 May 2024 22:23:32 +0000 Message-ID: Date: Fri, 17 May 2024 10:23:23 +1200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 08/16] KVM: x86/mmu: Bug the VM if kvm_zap_gfn_range() is called for TDX To: "Edgecombe, Rick P" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "seanjc@google.com" CC: "sagis@google.com" , "dmatlack@google.com" , "linux-kernel@vger.kernel.org" , "isaku.yamahata@gmail.com" , "Zhao, Yan Y" , "Aktas, Erdem" References: <20240515005952.3410568-1-rick.p.edgecombe@intel.com> <20240515005952.3410568-9-rick.p.edgecombe@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: MW4PR04CA0275.namprd04.prod.outlook.com (2603:10b6:303:89::10) 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_|SN7PR11MB8065:EE_ X-MS-Office365-Filtering-Correlation-Id: 2043df82-c212-45f1-b637-08dc75f6d1f3 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|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?QnV2aFEzUlg4TXoxR1hFVmVlWVgzVm04ckRYS1hCcmRrelc1RjhpVUJkZGxp?= =?utf-8?B?ekVSRFgyZFJLKythSDRRbzZML1l6OFJJaDZVbW5rNVMzWE5FeWc2NG5LcENk?= =?utf-8?B?MkUySVJzU3hzY0hZTC9rWVUyME9nR2RZTERmR2NyU2M1eDA2YjhkVE9TRVoy?= =?utf-8?B?NVI2eng4UGx5Z1FZRXRqNlhmYXE2TlVMUmlEZDU3azdCL3VDNUhGRUtmdDNX?= =?utf-8?B?OEFhOEZGSU9nWUgwY3ZaYzBiUFpSZjAzQzZHK1Baa0FGc1krcmE3VzBycTVv?= =?utf-8?B?Q3VvMXozTjNoYWxjVVhTcmRsRlorR2hQbXRnWThEV0E1SFZONk0xcDFYVzZT?= =?utf-8?B?SzEvRGFlcVQ0MTR0b3FGaG9t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kNjSHZkQ3FoY3dJZnd3ZVg2YVNmYWtSMVdlQ0dicmdQZU40eEZneUt4?= =?utf-8?B?YUhHZ0wzK0tteElIVk55UGI0YXdUeDRoUkI3UERGdmtwcHBZM01NMkRVcGxM?= =?utf-8?B?V1hrNDZ4dnJjV1ZFTlYyc0tyeHMzUCs4MTYyMDF2b3RVUHRtRldOZ2x5RVhP?= =?utf-8?B?ay9Tdkk0Ty9MekpZb1NObURjdFJSZ083M2pmeVcxRGtoTVJHTG9VTlhPSFZy?= =?utf-8?B?ZDdNaVkxakF3bGxJT0Q3OWdoek9jRjJlR2VhZFdqQjIwcGVWaTNBU3lvLzRv?= =?utf-8?B?dlQvUnU1RlYvUEJtbnJSZi9tRm5hWDEwQm93MDRSRjdKdE44NWxqSTg2aDB3?= =?utf-8?B?OXFDYzJBMFo5Y2R5dHUrMy9WMlA0aVE9PQ==?= 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)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WTBPeGFLWEtXNmhnRkY1UGt6UGZ6ZThROGlNMUZqR2JxL1F2bXhFbW1XTDBn?= =?utf-8?B?S0VUcG9TaE5ZbTVQN0dTRzZLNXIzYU1vM09vem43bEhTY0xvN0s3K1JXZWVC?= =?utf-8?B?NEJPd0VTekZwK0JJa3R6ZW1ZTjhFSldqbDN1Z09FWGZGdnZXNUlYdnNtUk8x?= =?utf-8?B?UEVET0V2NlMvUWRIKzlmd0JGaXZ3QWc4b0kwRUdJMDBxU2JWSjh3UnVOUlc5?= =?utf-8?B?TlVobGFrd0FzSys4NWNYZnhQL3B3NDQvY1paYVZLa2F5M3NQNW9lVWF4Yzhp?= =?utf-8?B?Wm5yU0orc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utf-8?Q?bJVosft2FvEeiKQYDl3qzJHW7?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2043df82-c212-45f1-b637-08dc75f6d1f3 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2024 22:23:32.5580 (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: BvFrU6/4Yognrp+t345hiXJDplb0O2gUdAM6e7hOtPaRN2TTAvVdj84PAgMLjhKQD2DTNdjRk7cMSUdzEn8lUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB8065 X-OriginatorOrg: intel.com On 17/05/2024 9:46 am, Edgecombe, Rick P wrote: > On Tue, 2024-05-14 at 17:59 -0700, Rick Edgecombe wrote: >> >> For lack of a better method currently, use kvm_gfn_shared_mask() to >> determine if private memory cannot be zapped (as in TDX, the only VM type >> that sets it). > > Trying to replace kvm_gfn_shared_mask() with something appropriate, I saw that > SNP actually uses this function: > https://lore.kernel.org/kvm/20240501085210.2213060-12-michael.roth@amd.com/ > > So trying to have a helper that says "The VM can't zap and refault in memory at > will" won't cut it. I guess there would have to be some more specific. I'm > thinking to just drop this patch instead. Or KVM_BUG_ON() in the callers by explicitly checking VM type being TDX as I mentioned before. Having such checking in a generic function like this is just dangerous and not flexible. Just my 2 cents, though.