From: Paolo Bonzini Subject: Re: [PATCH v4] kvm: nVMX: Remove superfluous VMX instruction fault checks Date: Thu, 27 Apr 2017 17:49:35 +0200 Message-ID: <1a3babfa-4f45-0bb9-349c-de47824170f2@redhat.com> References: <20170426155346.116970-1-jmattson@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: David Hildenbrand , kvm list To: Jim Mattson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54744 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032623AbdD0Ptj (ORCPT ); Thu, 27 Apr 2017 11:49:39 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 27/04/2017 17:32, Jim Mattson wrote: > Also, the allowed/required CR0/CR4 bits may not be the same for the > vCPU as for the physical hardware, so more than just CR4.VMXE may have > to be checked. I think we can pass on that. For CR0 we know the two cases are fundamentally unrestricted guest and !unrestricted guest, and they both are covered (via CR0.PE and EFLAGS.VM respectively). For CR4, we also pretty much know the only FIXED1 bit is VMXE, and FIXED0 bits match the values that are checked by MOV to CR4. Paolo