Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp573689rdb; Tue, 16 Jan 2024 09:02:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IH36vhnSZEoYhUM3mbnsEgRSB45vt17GH93qir+PRkIhe5HaI5dGYPWDNLB3WVYcjhP75TK X-Received: by 2002:a05:622a:3d0:b0:429:ca35:21a2 with SMTP id k16-20020a05622a03d000b00429ca3521a2mr10972386qtx.61.1705424568954; Tue, 16 Jan 2024 09:02:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705424568; cv=pass; d=google.com; s=arc-20160816; b=wKSj1A5Rq+W6kq6VZ0rqCRBNFakN5wYkMjkHXJj1jayjByCZoZuVqxoZ1i6ckTUeKG 91UHLn25sU2+tYgjaPIr9SW7XrfVz5vBp8S1DYuB5J1eET2MWr5cW/m8iPaWS0MzJKAP jmxrX7gpWLjcthM1VpW9MvXAXiWWbUU16bXzBg2IfpFLyyuAaIr7lLMylFHKdEhNSDIX q+PSWxOq70Vqrbwl1x/P60pIZhqVqJAmBB3IMtoggtNpN36FBsysZ/iNJlx+86W/e/5Q NVKDJAEsGYHVzgeWeR9RygETt9/4RjP077ii/7MpIWRixnsmLCvEsJxzyQOMCzg2IoYW kRiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:to :from:subject:message-id:dkim-signature; bh=W5qlSOrOPnf06NpnZ5IqQM7YnmklSyj2ZEoUbqEujIw=; fh=yrunQQdv7Bpe1emN6vxLsksVO5p79GQjojjIOorWvUw=; b=rHbM7GfYk+CLk5dKpyK/yw8AL1wkzDJYwTUlev60Ut05z8cZVfPaHip5Oa1d8D9sSz KcwFzXA373swPyQr++MaysfDEJx7vNHmwkAmKY3KeaIOnuv3qts7WdBNyX/cd1ePO9Ah pPBG7acz+x52p+BoheBe42IEfRAdWJ84/3Z08Xa26roKbKvwJeb6C3lLJ1E+tblu44IA iLnkKHF+5lC1tQQPE9H1A1BUE5GKCis412zZYkQ6JGLR2lX/0rdVR7Dz+Ek9iWFXVteb 2JeT/pl8fDCwOIrU5VvMGf87ILggU8zzzE7MGo8bIg2ACepqLxNxWYP3Zr5L6yS4hOSH wU2Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=H3fpkxT3; arc=pass (i=1 dkim=pass dkdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-27605-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27605-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f1-20020ac87f01000000b00427e9553f3fsi10368594qtk.69.2024.01.16.09.02.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 09:02:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27605-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=H3fpkxT3; arc=pass (i=1 dkim=pass dkdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-27605-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27605-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 DC5EC1C237F5 for ; Tue, 16 Jan 2024 17:02:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 182241CA96; Tue, 16 Jan 2024 17:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="H3fpkxT3" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.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 D14661CA8C; Tue, 16 Jan 2024 17:02:34 +0000 (UTC) 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 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705424556; cv=none; b=f5GROFrrXWcNXEVspikodXsbH3zaxBWd8fVK24a9Rak8ZrAOgFnxbxaNg11hGphBk5U+8yuN6pKkQ1M/IBKv0ma6drtTgg/pdyYxP8JIMXPK5MB14XE/AsjxIUBrve9LLyZtEuwTBW4kYYa3/ttLubhCmyDLRazRB5bPMK1uQP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705424556; c=relaxed/simple; bh=W5qlSOrOPnf06NpnZ5IqQM7YnmklSyj2ZEoUbqEujIw=; h=DKIM-Signature:X-IronPort-AV:X-IronPort-AV:Received:X-ExtLoop1: X-IronPort-AV:X-IronPort-AV:Received:Message-ID:Subject:From:To: Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding: User-Agent:MIME-Version; b=N2Yh5OWftWZ/4FPjZti0DhRV8PYCQx/+SW1ZMfzy6iAlsCmZdNFbkWDbAdIsBoJaTa/x/YO4IrX8S9GvFzAebpS2+eG7TwrwhcHxHSP3IVdg2JJ3XTfFx3G6F/gu/dpxer7zXRHKwxTiEUx6h2Iwxtr5d1/9FPAHWlzUpB27MEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=H3fpkxT3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705424555; x=1736960555; h=message-id:subject:from:to:date:in-reply-to:references: content-transfer-encoding:mime-version; bh=W5qlSOrOPnf06NpnZ5IqQM7YnmklSyj2ZEoUbqEujIw=; b=H3fpkxT3zodoUsC5/NAD30F6gV0gQAPJhFTvDoj/K+4UehL5HfF97hRc 076fnEeqsR1MurRflZgAzAdVVGK1H4kifoniADKgpWPKEdP9KP8N8YBVW xruLIZj7glu8buF9c1CURm+12RK3zc7KVdcE27zGRIJi4oWfpJmzZyi7W U+SNar92FTDC2kZIS+BzTMOhmP194S+YXuIlCjU+E8KY9h5JJttwDyjVW 5rKbK0W+ZdySdAXzVuHQfkVskZOTGxhR+uBCx1vWeqKBpFHV3rLFEGGZk qAzBbeFYi+PGgZz6i4PMmG1xCF7kgRPtzRWfJ6nEajUgT2ru8ztoLkPko Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10955"; a="6632877" X-IronPort-AV: E=Sophos;i="6.05,199,1701158400"; d="scan'208";a="6632877" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2024 09:02:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10955"; a="818220972" X-IronPort-AV: E=Sophos;i="6.05,199,1701158400"; d="scan'208";a="818220972" Received: from ticela-or-353.amr.corp.intel.com ([10.209.70.241]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2024 09:02:30 -0800 Message-ID: Subject: Re: [PATCH v4 1/3] x86/hyperv: Use slow_virt_to_phys() in page transition hypervisor callback From: "rick.p.edgecombe@linux.intel.com" To: mhklinux@outlook.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kirill.shutemov@linux.intel.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, sathyanarayanan.kuppuswamy@linux.intel.com, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, linux-hyperv@vger.kernel.org, linux-mm@kvack.org Date: Tue, 16 Jan 2024 09:02:29 -0800 In-Reply-To: <20240116022008.1023398-2-mhklinux@outlook.com> References: <20240116022008.1023398-1-mhklinux@outlook.com> <20240116022008.1023398-2-mhklinux@outlook.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-01-15 at 18:20 -0800, mhkelley58@gmail.com wrote: > From: Michael Kelley >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Michael Kelley Reviewed-by: Rick Edgecombe