Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp574431rdb; Wed, 17 Jan 2024 10:26:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2sfQlBPI0Nj07hSDyevePdovgRU2888UB9Ic0W7UcIVh2gDJvCJyoxVVsxGOp8rbth5wV X-Received: by 2002:a05:6402:3482:b0:559:f742:25f1 with SMTP id v2-20020a056402348200b00559f74225f1mr321169edc.2.1705515961923; Wed, 17 Jan 2024 10:26:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705515961; cv=pass; d=google.com; s=arc-20160816; b=A+NXPRuRUoVTh6GTgayoEm1wzD4LC/Lr9skkxdEzMHnxTxwubm1RhWXFs3UpxWB0x1 0PhasZm0bjqhAUmSC5Ix8SabcvzaU52qa64x8NoVaRuTe3LXVPqjArRpylT3BgyyDgzv 1qGU+I4USyAXUHCCTnAydOYe7k0n5T789EUeZMq5wRYKmO0uhmIeG2Dq5lXXhzf8nPsU KsgvUTD1d8IOA6MUASTRG2LMBtAbAGKsEMDVQwsuu5IahcEqdq8acx2Ps+601doKUmOj 2Cu2fZ7JcJz2eMYud3cBXsKf1lGoTYXtEgDJbAWQW+r0gBXKNW9t6vKPaQVfks9t5l1V A6LA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7hIrYuWe8a7Y3MxgmIQeGG1XuDGZlCVvVQPvVABKsRw=; fh=AMQPRQprTslEcjl3jv01hG7gjPUEpIFK5ln7biL5sfM=; b=mVM28Y2LbY09wOOSah5lO/EF97dJXepeAg/zqQpwOw2JwWSHaUhuetWzePEsoKePI+ 77O2oVCPz5cMkf+9bczb/KEqG6aGM3ioGWP0ZlLvc+4MkSLx1vnzecqepIXF3TLAlAkN g6tXkj4J7FnmK4iWtImpFrJSQaBVlsw3P154DBHTAOh7buWXOfPCJLA+k6IGeGUYtx7h zf1N0uhaShw/i5Br4/enwg1iB1AiP9Cy/WEnrrSw+lkdYSM+1ft6yvNyeARE4nxaGWSm eEZiMD8RbLqhRpwwD+ooIj/hMyymc4S0/BERYMGER3J75umAHBYayXcvNAherOsje38L aiHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NUXOzdNo; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-29027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29027-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b13-20020a0564021f0d00b00559f8dd7a25si56722edb.45.2024.01.17.10.26.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 10:26:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NUXOzdNo; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-29027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29027-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9A9E91F2598E for ; Wed, 17 Jan 2024 13:37:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B0441F945; Wed, 17 Jan 2024 13:37:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NUXOzdNo" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 9769C1F933; Wed, 17 Jan 2024 13:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705498658; cv=none; b=atiBCb6R5xDDUzpoYs3D17Uh0U4W9dSrqgQN9UIt/abKkLf+RATmYyB5ILp1p5StDQOSC5UcDAAxjgp694XFxQAM/PhS4ojnrdOC5WWucdCnQ2rdKhwqt8grtxdMFfKJNjnUwyPRyo2RsIZrI3W6p8PU+tGEDx087NA4goUIhF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705498658; c=relaxed/simple; bh=juf1VSzmc/rX2xUCMcfOl74VIpM9SShaFHnSA69/YO4=; h=DKIM-Signature:X-IronPort-AV:X-IronPort-AV:Received:X-ExtLoop1: X-IronPort-AV:Received:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=GqaUobSaLF3xC3wDQirRGR1VuD+S/jGs96Pnh3FmmETXZ/WQysn8fyAw683nYqjoppQvuU339V8cmlQOyk3ZTSol7OCdt3PSyq6LduilpHuE2N8+bPEXf8BeRvWWqfrq4f/PVHW+vwqJ2d1Wt0nSga7YMwlnx0XEsyss2aLzk1M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NUXOzdNo; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705498657; x=1737034657; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=juf1VSzmc/rX2xUCMcfOl74VIpM9SShaFHnSA69/YO4=; b=NUXOzdNoB4vHx4uV5WOeVz7Tk6TdpylVK0WCUqbB3oOOZs4i1Xibsc62 c5GbURCMaOqo/rngHIomWP8IdOJazJX9pubQGUEVv7F1q3YRY75DDeBBb t1TbJL3YSHwQNDBwvZY0zI14mCdjpclq1f0sEpdTP2D7lFrbnvQab1xKD hSAVG6OwlV9wYTt38YYAc6ac3ncjQMbeE/iepctygzet2yMcgF58kl21e H5SZvqrxnkErKoihHp5JwbcX/c5uoso8cRe+yEwvWgy0ISZsHA7jxWQGe w6nfYl7AWV2yYQAi3/GM46CbraWS1pZj4kRnVHhhxy9X52e08dpd3Wzf4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10955"; a="6883501" X-IronPort-AV: E=Sophos;i="6.05,200,1701158400"; d="scan'208";a="6883501" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2024 05:37:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,200,1701158400"; d="scan'208";a="35999" Received: from lewbarto-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.249.39.118]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2024 05:37:30 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id 9E5A710A515; Wed, 17 Jan 2024 16:37:27 +0300 (+03) Date: Wed, 17 Jan 2024 16:37:27 +0300 From: kirill.shutemov@linux.intel.com To: mhklinux@outlook.com Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, luto@kernel.org, peterz@infradead.org, akpm@linux-foundation.org, urezki@gmail.com, hch@infradead.org, lstoakes@gmail.com, thomas.lendacky@amd.com, ardb@kernel.org, jroedel@suse.de, seanjc@google.com, rick.p.edgecombe@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, linux-hyperv@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4 1/3] x86/hyperv: Use slow_virt_to_phys() in page transition hypervisor callback Message-ID: <20240117133727.3zzwifnunmgklotw@box.shutemov.name> References: <20240116022008.1023398-1-mhklinux@outlook.com> <20240116022008.1023398-2-mhklinux@outlook.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240116022008.1023398-2-mhklinux@outlook.com> On Mon, Jan 15, 2024 at 06:20:06PM -0800, mhkelley58@gmail.com wrote: > From: Michael Kelley > > In preparation for temporarily marking pages not present during a > transition between encrypted and decrypted, use slow_virt_to_phys() > in the hypervisor callback. As long as the PFN is correct, > slow_virt_to_phys() works even if the leaf PTE is not present. > The existing functions that depend on vmalloc_to_page() all > require that the leaf PTE be marked present, so they don't work. > > Update the comments for slow_virt_to_phys() to note this broader usage > and the requirement to work even if the PTE is not marked present. > > Signed-off-by: Michael Kelley Acked-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov