Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp348948lqo; Wed, 15 May 2024 17:26:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUe8J1TR4FA5CtnU1BMdVUd1ebGsD7V7ia6azNJrfM43cPCIybJIDYgzM6iw+WnDTxZw1mMrNbIB13pPVye7X7MvrxgmKB97GRf3DUH8w== X-Google-Smtp-Source: AGHT+IFAUIihJUKE4R8gaBXxzGYm6oTzDVEzSHYFqwjvMAPkCHwTHouhbB4A/pt0lWBOSJhAIyuv X-Received: by 2002:a05:6102:3053:b0:47c:1777:c4a7 with SMTP id ada2fe7eead31-48077ddcdd4mr17741769137.3.1715819187201; Wed, 15 May 2024 17:26:27 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df566f52fsi151808031cf.320.2024.05.15.17.26.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 17:26:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UYNQwhvd; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-180514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180514-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DAB7E1C21E15 for ; Thu, 16 May 2024 00:26:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1B7710F2; Thu, 16 May 2024 00:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UYNQwhvd" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 4003419E; Thu, 16 May 2024 00:26:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.19 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715819172; cv=fail; b=suNJ/V6kt53zRozv4VHLBal+A1mtDAiTJt4WoFMHhOSigD+uhgEFlWemBucOsVMgoPbM4qS+nBldzcvjl4WQC8rXz9ol2FFQFuXkd/GpdzotThvCSrs8++q/NcLhU7K7PYxM3X/Nqjlw+M6kbi55UJRya3ttt9RTSV4OX4ZOMUw= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715819172; c=relaxed/simple; bh=RqkmOLdbXXyonlxvvZ3UEJiFrpAgIJFaCdmyNX660Rw=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=OALoJ9W1ZtL5NSxmBhFs5mm+LuSabDk52tJM09wTQ+1mdNGr9dTrrRyaNXZW1P7XR0p2lKjD98rEhouHrpRR4kwJDpWENDe1ERdOPUXe9F2OMJcLv/FFX2Sbn+AngcWvbMIVFxaC5V7kFVSiW3Zvrk2chBcHTm4ehPmuUJF5PdM= 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=UYNQwhvd; arc=fail smtp.client-ip=192.198.163.19 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=1715819170; x=1747355170; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=RqkmOLdbXXyonlxvvZ3UEJiFrpAgIJFaCdmyNX660Rw=; b=UYNQwhvdTIaokB4Mj8APJG+naBwBSG15I7I2f6GcbcDLibk/0kOmiJ1l cYfbln4EuHW0d91CFdu7ptp+Xx+cYHLHd4HMwkb7VhOQUx2PM7psoTHV5 U87ajVLW3izho1SfpC7twzEoVa6qHo7H6Shd0bFoxrBEjwOsBB40u8VxX HBbNBY0z+BhdTOE4Tq3RkIBuvVWi9mj0o40otEJ6/Pg2k4t59Cb4ru9nL mqRxu5wts+qdMXVnFmxDa8NucdrhgVanW0Yymz6Qo5uXaP5UW28D2ohHa wglYAgBqhpptWBQ0uX/lKclC61Tm3X6UfLZWXyRGRIrdQPhKlNqpHWKra g==; X-CSE-ConnectionGUID: +tfaihPtT2ObcdI48BG6kQ== X-CSE-MsgGUID: AjvvnPVWT1m8c9bBnM03ew== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="11752318" X-IronPort-AV: E=Sophos;i="6.08,162,1712646000"; d="scan'208";a="11752318" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2024 17:26:09 -0700 X-CSE-ConnectionGUID: M4o9bj7FRCShGBrCHTARoA== X-CSE-MsgGUID: fBErYhfxSRu4UNd9YVXgfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,162,1712646000"; d="scan'208";a="31168740" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 May 2024 17:26:09 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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 17:26:08 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) 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 17:26:08 -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; Wed, 15 May 2024 17:26:08 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) 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; Wed, 15 May 2024 17:26:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FoGZ97Ox5xeOrYpcytWRaTfD8t5mF5jlHAbZtTMUHzdVTq9CD1lWakZn2+Nol9L7yg8HD4TMeCOHO4dpbKfUMVkuK7NgdHNmfFPSE4Rr5SyMJnpFodY6KvvfyTiLyxZwzvDCgaulQM0Vg7cJOSD9U2/honwD5fFdU96NDcjj7o+xBJfeDwFW5suy0+kcltMXabjfVo4PEkSHdre5Jy47d1l6FGiCi1tShqNZmUNzATIHEcs0Bbzmj6XYhfQaxp31JV/DAzs1W1ZwZ5BUMyXvb2feEBWzDxUKC5+PRCzYySC26TvJRqkVnSyf/xF0hJ2o86DCDpH9yQ/tRRDuB4zUZg== 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=1Ep7MS8bGYE+gEfE+9n0yf2PlPqlMjPjbLtUKV9Dtu0=; b=crvh9vKmridX7iqVZPwYi+5PoHwp2rBhwxtv+miUSFKs2xIdEnt7b0Y8R3CSxBxBUbqfAsnqP9t7MutJxVTX/mPZ0xyf1u5j2zlzt38Jey215ashlmetGb08m69NryZQUwTDACuTttDvQm8A/5UfwzpIwvo75xrKCgXNG8MAnSd5HR3aLeT+zE675Xr+d8zt5he0M08GLxKoDVgryc5jWnZolr6o3AzgVctsfieiIVqNpwcKhL+OQM0GUs2n2YFlvVDRh26DiwC482OtBpEpXLM4MICEBAdYLzJKjgu5plWU4XOEEbw5507MDOFAIwO7Hq7jEVps9u30fFk+DzOXnA== 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 SA3PR11MB7610.namprd11.prod.outlook.com (2603:10b6:806:31d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.27; Thu, 16 May 2024 00:26:01 +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; Thu, 16 May 2024 00:26:00 +0000 Message-ID: <6df62046-aa3b-42bd-b5d6-e44349332c73@intel.com> Date: Thu, 16 May 2024 12:25:51 +1200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 04/16] KVM: x86/mmu: Add address conversion functions for TDX shared bit of GPA To: "Edgecombe, Rick P" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "seanjc@google.com" CC: "isaku.yamahata@gmail.com" , "sagis@google.com" , "Aktas, Erdem" , "dmatlack@google.com" , "Zhao, Yan Y" , "linux-kernel@vger.kernel.org" References: <20240515005952.3410568-1-rick.p.edgecombe@intel.com> <20240515005952.3410568-5-rick.p.edgecombe@intel.com> <9f315b56-7da8-428d-bc19-224e19f557e0@intel.com> <307f2360707e5c7377a898b544fabc7d72421572.camel@intel.com> <465b8cb0-4ce1-4c9b-8c31-64e4a503e5f2@intel.com> <4e0968ae-11db-426a-b3a4-afbd4b8e9a49@intel.com> <0a168cbcd8e500452f3b6603cc53d088b5073535.camel@intel.com> Content-Language: en-US From: "Huang, Kai" In-Reply-To: <0a168cbcd8e500452f3b6603cc53d088b5073535.camel@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4PR04CA0072.namprd04.prod.outlook.com (2603:10b6:303:6b::17) 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_|SA3PR11MB7610:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a2ed0c1-85bf-4e1a-f2e7-08dc753ec35f 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|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TTdQQVU2RHVnSWhhUmxMRTF6WEROQUl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M;H:BL1PR11MB5978.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VHFTaVlyc0liT2dUaEtKeTU4K1ptc3krS0xiQjRxbEJFQW1hVkNyaGM4eEZz?= =?utf-8?B?NVpURkJFRksxSTZybUYyM3RZMUdtcGExakFTTGxMSGZyR2w0eFIyVVZwWlB6?= =?utf-8?B?Y2t0SVMzYkJsaEQ4c3llZnFiS3dEaFRxZXVlbFVWV0VFMjdRQ2VsMWsxMDhx?= =?utf-8?B?blc2QTlSZDMvdU1CV0E3dmN2VEtHdnB4c0xUaXU3dWhCdStIZmo4TTdrYXdQ?= =?utf-8?B?ZTl0cDEvYlFHckxSWExhR0x5OW9OVHJMenp0U2ZqWllwdU10WEVRYjlzUk93?= =?utf-8?B?SXVVS2hyZ0VyQ1V5eTNucStOZGJuY0FQbjJKcnN6eGxtQlVKc0t1TzEwVVRw?= =?utf-8?B?aGdUWkJSRERMeTltM09SNGN2MW9mWldiNHJGTmJ5T1FGQnlqSnUvNDJDNWlH?= =?utf-8?B?RVpORVo2eklMYk4zSVh6aGRvSnIrc2prMUh1dTZzVTFvcGIwRDNFSGVhZHND?= =?utf-8?B?RFk3azR5dFBsTWdNKytRVm5QWUg3TEVwYmNLWlk0SEU5RmZuZ3NLcktoYmFG?= =?utf-8?B?K1lmK0d6R29UMTlJY1hlcFZyY2g1TzRSZGFkQTM1NFl6NHNLemxtelVjVHI0?= =?utf-8?B?UUl4bTI3Y2ROMGllUUg5R0tMRmVKRThzekNlSkhOb2VXWWhVelFrcS9xd0o2?= =?utf-8?B?NUtsNW42cFBQYVV4ZHU4cXIxVG5mR1lETjQrOGFNM2JER09Ia3gvUjhxRjdV?= =?utf-8?B?OCsxUFdyNTJneVIxejc4czNaN1dqQ3pwQ3pEcXN5Qk5EeUxLQ2xEan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aGRKNVFMMG0wZzR3TytG?= =?utf-8?B?dHE3RVpaMkF0NUYyUDArVzVBMVBNSUFkbExRaDRWM2V1Y21GWFUrNTdFRWtl?= =?utf-8?B?Q3FiaHdhS3lhcDRoRWV4VTFGYzJlR09KZjFFMThsdzZYelRad21sNjhhcFRS?= =?utf-8?B?Z3A3TzEyL1Rwa3R6MlFodStzN3BiRXJRYmkzbG91bU9UMHFuMTJyckVmMlVT?= =?utf-8?B?bUs0eUxZVDZoWHZkVzV2RlE0NVNOSFZTblp0TjAxTlhuYm42UTUzcStab1l1?= =?utf-8?B?ZjhrL0UvdGJwUERYRFVnN2ZvcVVvd0tpMk1OWHpFSldYZjI4N1BOS1ZPTFRu?= =?utf-8?B?Q1hIanQyYUFyYlZqdEU2WitVbndQVzdSRTNSQmtoV284L0IwU2lBdXBwQjBH?= =?utf-8?B?NTlBU0V3ZHVTVFBaL2dlSVVRNldYM0VWMTNtMWpScVJsNkMrTERwbXZiYm5p?= =?utf-8?Q?F1NrwXelXLUTW1AV0vyDClFYQ?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9a2ed0c1-85bf-4e1a-f2e7-08dc753ec35f X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2024 00:26:00.8080 (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: BiF7rEw9PF9B8U2dYebHTjvFyeiLsOlWRNzzObyy8wVUa3NbpHLsSnXEaB1kZ150vkTplesKUSwUydpqQsskhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7610 X-OriginatorOrg: intel.com On 16/05/2024 12:19 pm, Edgecombe, Rick P wrote: > On Thu, 2024-05-16 at 12:12 +1200, Huang, Kai wrote: >> >> I don't have strong objection if the use of kvm_gfn_shared_mask() is >> contained in smaller areas that truly need it.  Let's discuss in >> relevant patch(es). >> >> However I do think the helpers like below makes no sense (for SEV-SNP): >> >> +static inline bool kvm_is_private_gpa(const struct kvm *kvm, gpa_t gpa) >> +{ >> +       gfn_t mask = kvm_gfn_shared_mask(kvm); >> + >> +       return mask && !(gpa_to_gfn(gpa) & mask); >> +} > > You mean the name? SNP doesn't have a concept of "private GPA" IIUC. The C bit > is more like an permission bit. So SNP doesn't have private GPAs, and the > function would always return false for SNP. So I'm not sure it's too horrible. Hmm.. Why SNP doesn't have private GPAs? They are crypto-protected and KVM cannot access directly correct? > > If it's the name, can you suggest something? The name make sense, but it has to reflect the fact that a given GPA is truly private (crypto-protected, inaccessible to KVM).