From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3BA3C433E0 for ; Thu, 23 Jul 2020 07:21:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D92C622B40 for ; Thu, 23 Jul 2020 07:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726801AbgGWHVG (ORCPT ); Thu, 23 Jul 2020 03:21:06 -0400 Received: from 8bytes.org ([81.169.241.247]:58794 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgGWHVF (ORCPT ); Thu, 23 Jul 2020 03:21:05 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id E2EE4346; Thu, 23 Jul 2020 09:21:03 +0200 (CEST) Date: Thu, 23 Jul 2020 09:21:02 +0200 From: Joerg Roedel To: Mike Stunes Cc: Joerg Roedel , "x86@kernel.org" , Tom Lendacky , "hpa@zytor.com" , Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Sean Christopherson , Martin Radev , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" Subject: Re: [PATCH v4 51/75] x86/sev-es: Handle MMIO events Message-ID: <20200723072102.GN27672@8bytes.org> References: <20200714120917.11253-1-joro@8bytes.org> <20200714120917.11253-52-joro@8bytes.org> <40D5C698-1ED2-4CCE-9C1D-07620A021A6A@vmware.com> <20200722080530.GH6132@suse.de> <7020C1D2-5900-4AD8-ADCD-04A571DF2EA7@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7020C1D2-5900-4AD8-ADCD-04A571DF2EA7@vmware.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Mike, On Wed, Jul 22, 2020 at 10:53:02PM +0000, Mike Stunes wrote: > Thanks Joerg! With that change in place, this kernel boots normally. > What was the problem? The problem was that the code got its page-table from current->active_mm. But these pointers are not set up during early boot, so that the #VC handler can't walk the page-table and propagates a page-fault every time. This loops forever. Getting the page-table from CR3 instead works at all stages of the systems runtime. Regards, Joerg