From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D909D4F5EF; Wed, 10 Jan 2024 20:18:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZvkunF8I" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01087C433F1; Wed, 10 Jan 2024 20:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704917926; bh=fgRgZuoAXQ+AEZV1jM9xn99Om5QJ8jDoPAfUebkzG1k=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=ZvkunF8I+PbytQ3aauQZUhtA04lAEOU1IIG/RzeLPK401UDcocZUiX7tCvNZkhUk4 J8a7G8Iysz62mTv6dS7JxkxqOpnkVy0/tWgEyKHX0ldkP1s5h1dIXmuIQPkQhKovTm Cub4+DO8mPJAz+POJlzwqzGt+XtknBta4GkxUMyo0//jfrITtgslfxtCKBzyk9B0qx raZ45Hlaa0llbA+sg7uaPslIrVCLG2bYGGGl4PlWYiRlAyGoNI0zCZ+6ZGhY9M/AMT /ni0sJFRI03TITR1JWZJnCtipD43lilhybATuWTUCrc8Q7YIMfY2l/lWVu4GyNF9xT JNdHq6vFCh6cg== Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 10 Jan 2024 22:18:37 +0200 Message-Id: Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , "Brijesh Singh" Subject: Re: [PATCH v1 07/26] x86/fault: Add helper for dumping RMP entries From: "Jarkko Sakkinen" To: "Borislav Petkov" , "Michael Roth" X-Mailer: aerc 0.15.2 References: <20231230161954.569267-1-michael.roth@amd.com> <20231230161954.569267-8-michael.roth@amd.com> <20240110095912.GAZZ5qcFXYgvPrCdRI@fat_crate.local> In-Reply-To: <20240110095912.GAZZ5qcFXYgvPrCdRI@fat_crate.local> On Wed Jan 10, 2024 at 11:59 AM EET, Borislav Petkov wrote: > On Sat, Dec 30, 2023 at 10:19:35AM -0600, Michael Roth wrote: > > +void snp_dump_hva_rmpentry(unsigned long hva) > > +{ > > + unsigned int level; > > + pgd_t *pgd; > > + pte_t *pte; > > + > > + pgd =3D __va(read_cr3_pa()); > > + pgd +=3D pgd_index(hva); > > + pte =3D lookup_address_in_pgd(pgd, hva, &level); > > + > > + if (!pte) { > > + pr_info("Can't dump RMP entry for HVA %lx: no PTE/PFN found\n", hva)= ; ~~~~~~~ is this correct log level? BR, Jarkko