From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752207AbeBHQkm (ORCPT ); Thu, 8 Feb 2018 11:40:42 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58610 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751544AbeBHQkk (ORCPT ); Thu, 8 Feb 2018 11:40:40 -0500 Subject: Re: [PATCH] KVM: nVMX: Fix CR4 after VMLAUNCH/VMRESUME failure To: Jim Mattson , Wanpeng Li Cc: kvm list , LKML , Radim Krcmar References: <1517828686-29070-1-git-send-email-wanpengli@tencent.com> From: Paolo Bonzini Message-ID: Date: Thu, 8 Feb 2018 17:40:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2018 16:54, Jim Mattson wrote: > On Thu, Feb 8, 2018 at 7:29 AM, Jim Mattson wrote: >> Similarly, the correct L1 CR4 value should be in vmcs01's CR4 >> read shadow field. > Sorry; that's wrong. L1's CR4 value has to be reconstructed from the > vmcs01 guest CR4 field and CR4 shadow field using the cr4 guest/host > mask. But there is no way to get it from any field(s) in vmcs12. Now that we have the prepare_vmcs02_full/prepare_vmcs02 split, we probably should do more checks in there, and not rely on the processor anymore. Paolo