Received: by 10.223.176.5 with SMTP id f5csp2116867wra; Thu, 8 Feb 2018 08:42:13 -0800 (PST) X-Google-Smtp-Source: AH8x226uEkZGiP5gH41S1k92CIVRNcdSocycsDL7QHtYRS+IT1UQAeA/eBe3yDs9vhex2YX3TVNK X-Received: by 2002:a17:902:20cb:: with SMTP id v11-v6mr1180116plg.63.1518108133220; Thu, 08 Feb 2018 08:42:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518108133; cv=none; d=google.com; s=arc-20160816; b=RGDB4DOh5aGJO2rwD18Xk+OlPontKpZ3L0tONrmQuKEI+uGMy6v3VqqZ8QsG4GlD/q fyeuT92o/oSMb98MCgSy1g/UIETERQ588dZ7I/S0H07PyGAT8lx+ol4zXiGgiwZz467Z 7U5BaXmeLcwTq66ffwTskaHxZ2IMLeIAvKs96/EhGWVLxIMCJf8sfBVCW2RRNXeIH2hB 0SDjLU8fBvQe1oMIwl6Ra4n8V9MrmvqK1YggFTQNeyzHPTss5cY8cIOfKRsvAGVVx8ir uvQbKvPF0YAl5Er0Hq5dTQcKVBHDl/v7XKxjxkjbC+2wZfv8aLs+aDtZ7chmUv3iiXnU EfaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=rKiC1fYPkr8cTmahJvnc8sqkdrZTAdGWeGbCXjrKuRo=; b=BtvSdyGcw4s/E1Ljp+UKTFgSuyWjsPaB3ZxzYgJ2cCGr4udM/jKxaRMPodh0iKqLF3 xxh/Bv7bcrCAEI8XuIKcCg6SBgANYmtMLegsUAN1OO/kxuJELTm7U7K05i/0CyxeS2sJ 43OzRreaxzDofyhYUJae418UVy+wVxrw2MAfC+cUu1CfJP2k3CiMn8cudfuwK/AcwSYr fjGKaYbNmb3hVbSnEKnqO2P81sLdn9m7DDf7vmqm0fPH4n0u9KzqtYwWTg8lfM19ej3G olrgLkkXTr7YGOp192K1sGkRZS1RQQmuSDUelef5hG481j+UnAOcj57r6MCZcOBdZRZt GSBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si148561pgu.714.2018.02.08.08.41.57; Thu, 08 Feb 2018 08:42:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbeBHQkm (ORCPT + 99 others); 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 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3941E81A8B9B; Thu, 8 Feb 2018 16:40:40 +0000 (UTC) Received: from [10.36.116.177] (ovpn-116-177.ams2.redhat.com [10.36.116.177]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BF502026609; Thu, 8 Feb 2018 16:40:39 +0000 (UTC) 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 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 08 Feb 2018 16:40:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 08 Feb 2018 16:40:40 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk 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