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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65D71C43334 for ; Tue, 19 Jul 2022 23:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238636AbiGSX1k (ORCPT ); Tue, 19 Jul 2022 19:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238173AbiGSX1h (ORCPT ); Tue, 19 Jul 2022 19:27:37 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B020552DDC for ; Tue, 19 Jul 2022 16:27:36 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id w7so13376883ply.12 for ; Tue, 19 Jul 2022 16:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ya1aQWm95sa1HPQF3jM5eAY4ic1SiLh5SHULBA/lY58=; b=ZPJjhk8kIfFspDU4FV+1TVFxenO8dBQ8jBRn0tmtCasZurj60lNzh15lnAixrDXMVu aUJ640y4b9L9Nn3063hRoicBxywLoOsj5oRxv04ISoc+B51EU8q/7C+yAJ6yxuBCfQaQ 4Dax+BDFxN7BVovsbY1/2lXgPyPsrCKmgu3so03fhJCrCbuDkeaC6mFOc8TFX+ztB2KK 8o0zJnDyh+cQpL3/a4WbJDQnuRWm5dFwzSNf3ny6cpaBOhUInspNHVV2UcPar6UgfRcH 1YNmhBAeI8QTlyfrn1GkFn3hq8R+hqlses9R4HQuy7iHzZUUDOW/RpHrRJVvyNwUQ5UJ csow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ya1aQWm95sa1HPQF3jM5eAY4ic1SiLh5SHULBA/lY58=; b=IZh6hh3i/1fmK30ocjYhJW1nE1pRmDyk3NIpl/bjgeOWmM97s83uOrkOEozZG91tIz Lcp0z8F+cWOzlhlRujuMiUgQBPja7Onc9UE0AkSCciNWQjkTsAe8fN0TxWs2n9s8dAuU jIICvI0GffuCxaYhON33WAWsOc4+l3mkBSgkWcfOA/7JMZjJ8e6OrtLV91k1WmL8jchO FD836K6UgHXVOBXbLFMKgSRETrnUp1eWw2XE/TyQ9hUwQuP/Z1J7t1UFVateyuEEyTN7 GzfCJzJw6v/3fisUOJk5K5EGxYVLOpRuXZI120o8GpvqrmMsmIjhPGHT/lJbe+Hsj3N8 zJFA== X-Gm-Message-State: AJIora/2VSVLlpGCTMRbC3HAyFEAzJXqALMsrXYKms5kY+AqsqTsnFTA MCi+h/zHdquOJNKYd0x/dn2Z3g== X-Google-Smtp-Source: AGRyM1soW4VjfF+FPjavy5upGoUE6k6uxN3PxNwlKWN5HycdX0MKtInayFUKnhAXzrQz1GOECe6iiQ== X-Received: by 2002:a17:902:e213:b0:16c:4292:9f57 with SMTP id u19-20020a170902e21300b0016c42929f57mr35820308plb.143.1658273256094; Tue, 19 Jul 2022 16:27:36 -0700 (PDT) Received: from google.com (123.65.230.35.bc.googleusercontent.com. [35.230.65.123]) by smtp.gmail.com with ESMTPSA id l5-20020a170903244500b0016befc83c6bsm12274100pls.165.2022.07.19.16.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 16:27:35 -0700 (PDT) Date: Tue, 19 Jul 2022 23:27:31 +0000 From: Sean Christopherson To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Vitaly Kuznetsov , Maxim Levitsky , David Matlack , Lai Jiangshan Subject: Re: [PATCH V3 11/12] KVM: X86/MMU: Don't use mmu->pae_root when shadowing PAE NPT in 64-bit host Message-ID: References: <20220521131700.3661-1-jiangshanlai@gmail.com> <20220521131700.3661-12-jiangshanlai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 19, 2022, Sean Christopherson wrote: > On Sat, May 21, 2022, Lai Jiangshan wrote: > Actually, I think the series is buggy. That patch, which precedes this one, does > > if (vcpu->arch.mmu->root_role.level != PT32E_ROOT_LEVEL) > return 0; > > i.e. does NOT allocate pae_root for a 64-bit host, which means that running KVM > against the on-demand patch would result in the WARN firing and bad things happening. Gah, I take that back, pae_root is allocated by mmu_alloc_special_roots().