Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp970088pxv; Fri, 25 Jun 2021 02:30:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlWU8B/hxByWTfB6GmTsGMr3e68eeF86j9aSRNuRLq1NnCZ/6zmQhMqDYwxdRJz73AT19F X-Received: by 2002:a17:906:748b:: with SMTP id e11mr9839712ejl.297.1624613442496; Fri, 25 Jun 2021 02:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624613442; cv=none; d=google.com; s=arc-20160816; b=NOMmWM05qxrFV+hJkSpfyHKvjLqNgpsQPMQZtVXXOzuik3gAo6ule3uRBmes7D4wO3 9ogWnsgT4wYJLHELHw+iOw99L3fOTrdjeyFbLjAWniX8vhkh95/1AI8Qq8+t/BwxSLl+ NVyhRi2ATXwch7tT0fyy5v7W/Sy9uqsCE0nt9GMt27tCryTTaj6Txh/deiB5h+UQpRFV b8N1dDlo/0mTYS1X4pjqPO0kQgNZXP8tt62KhegynINAfCD5XUZY6d/AK3DAcv4ip8Nl oiwUwLK9DKt6rjA7Dcc9GCCLo+/506QHhy1bYmGOsydl46+bo1ObYdiHk7apAlbxtASi sJQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=eXtHfe4E/BvdWf6L3eUl+LL5AHTA8ZDfLdV5NGl75FA=; b=FZnLBcSaDHye+67T1fjBdIaM68SzDO6vgoa9f3zSe+8tCx6c8RhRkqvR/SQxoQanep XEi6flZbK4aCczzx9THh64K3JywYI7QwIQjFuZ4fihssiXY04wEzqXfOQ74LAGuJZ0uz FOuW/IzffUCYxGAWkjYXxhIAX4wwclM/k4dp1rm0ROEHF3s1f7gpi6qxmbmqIQ9MwHGo NbvpMtn3miTRkTB52ZhTw247Chqg3/2Pz+ayNw+mO/ak8fNSGO9cljgPZTve9NIGwQAr KuTOtLe6OqaFs7IHjpxRDZ2VsVlDzTLpx9SWtySMP75x1rjAlmW2gvKyih2eMGjEWu7n wczQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw18si5405343edb.180.2021.06.25.02.30.18; Fri, 25 Jun 2021 02:30:42 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231276AbhFYJba (ORCPT + 99 others); Fri, 25 Jun 2021 05:31:30 -0400 Received: from mga18.intel.com ([134.134.136.126]:45141 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbhFYJb3 (ORCPT ); Fri, 25 Jun 2021 05:31:29 -0400 IronPort-SDR: dleT7UTL/dM7xS07NuxzoiRt2oHlrE9bYL3svqXyE8xdDrTxtj4F0f0J2tvXukUK62z9cAiMPa jNtI/t4t3gtQ== X-IronPort-AV: E=McAfee;i="6200,9189,10025"; a="194934721" X-IronPort-AV: E=Sophos;i="5.83,298,1616482800"; d="scan'208";a="194934721" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2021 02:29:08 -0700 IronPort-SDR: kUTDCduX01Qi/Pr7H1QfMHw8nhF3ptuEP/84jT1JJGZHNzgDfKJ09QrWcrh3dX7gW3kdWHQjyy j4g9oyjw/VAQ== X-IronPort-AV: E=Sophos;i="5.83,298,1616482800"; d="scan'208";a="453751946" Received: from junyuton-mobl.ccr.corp.intel.com (HELO localhost) ([10.249.170.209]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2021 02:29:05 -0700 Date: Fri, 25 Jun 2021 17:29:02 +0800 From: Yu Zhang To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Levitsky Subject: Re: [PATCH 05/54] Revert "KVM: x86/mmu: Drop kvm_mmu_extended_role.cr4_la57 hack" Message-ID: <20210625092902.o4kqx67zvvbudggh@linux.intel.com> References: <20210622175739.3610207-1-seanjc@google.com> <20210622175739.3610207-6-seanjc@google.com> <20210625084644.ort4oojvd27oy4ca@linux.intel.com> <09a49caf-6ff5-295b-d1ab-023549f6a23b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09a49caf-6ff5-295b-d1ab-023549f6a23b@redhat.com> User-Agent: NeoMutt/20171215 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 25, 2021 at 10:57:51AM +0200, Paolo Bonzini wrote: > On 25/06/21 10:47, Yu Zhang wrote: > > > But if L1 is crafty, it can load a new CR4 on VM-Exit and toggle LA57 > > > without having to bounce through an unpaged section. L1 can also load a > > > > May I ask how this is done by the guest? Thanks! > > It can set HOST_CR3 and HOST_CR4 to a value that is different from the one > on vmentry. Thanks, Paolo. Do you mean the L1 can modify its paging mode by setting HOST_CR3 as root of a PML5 table in VMCS12 and HOST_CR4 with LA57 flipped in VMCS12, causing the GUEST_CR3/4 being changed in VMCS01, and eventually updating the CR3/4 when L0 is injecting a VM Exit from L2? B.R. Yu > Paolo >