Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1117196ybh; Thu, 23 Jul 2020 00:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIvWvDQrYMBa7m0yd27CZmo4FcJs+y7X1/F/WqAqCn2rXLGao2ZN8O/nYUNtM9ZBq4NZHR X-Received: by 2002:a17:906:1250:: with SMTP id u16mr2901899eja.299.1595488928922; Thu, 23 Jul 2020 00:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595488928; cv=none; d=google.com; s=arc-20160816; b=04e+I3w/SuVpjFdHzAwiuWv71/NXovK1nP6XUDRXo3Q9Uv0NErhKgT15NVkNfjpQeC DyEFXwgnf/liHYLFgpivll++5BZYMK1+xyiH2RnwA1bJeOkUpYVHQRIAmWNYmohvuiqs e2Dm7CqCj62t1ua12vSW+hTUcP+TaLiYF3RvE1Btt+N17EGQaXKivLsjLLGhAWkV+5nq 4Dzbo5g62s84IECc2zfDP2TP6clkYZ22lddT0aAlvBDLwOJMOaNyMbWkPMkv0u5NtMkj VphrgmKANicgxAGlg567Lhzb1NUfV39CWReO+wIVTtX4MrUJ8VOuKSV23S+R9duPwenM 2kNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6EXlq/CVWa8k+4SqsFdvJLEBdcNei7Njo2dGckvn8VE=; b=eubtVIXl4pGCPJVpZbA92MU7t1WvsRI543sxRhUTkg7U2xST2Ep9CzLVD6XbxwGQAh 4XN/7gMDFizuc3txSS4Ty+Bef8qbK7GvwS/mPgme70gapZ5h2eDG7XLW3tcQqaZaqYC9 7gyVFERtfwIT652JTflAJXXIFsj71B0xu8fQRiqFOTH2O06Ai+0jVK1t72L8IceZH6GO Hw/sqgobsgTWTmB0z8k4pLjB4XT2/jBejbzmovteiklfc5IC0npsvWQa1wC8JItqymel BdKT86WDVViEu99SjeQI07I9PvbQkWMGmdr24dlCbKBzNkH2dkLxA2tkL+pu9pu9QG5C ilXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si450935edo.253.2020.07.23.00.21.46; Thu, 23 Jul 2020 00:22:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726811AbgGWHVG (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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