From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2] KVM: x86: Check for host supported fields in shadow vmcs Date: Mon, 21 Apr 2014 23:29:38 -0400 Message-ID: <5355E222.7010607@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , Gleb Natapov , linux-kernel@vger.kernel.org To: Bandan Das , kvm@vger.kernel.org Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Il 21/04/2014 15:20, Bandan Das ha scritto: > + for (i = j = 0; i < max_shadow_read_write_fields; i++) { > + Extra empty line. Not a big deal, but... > + switch (shadow_read_write_fields[i]) { > + case GUEST_BNDCFGS: > + if (!vmx_mpx_supported()) > + continue; > + break; > + default: > + break; > + } > + > + if (j < i) > + shadow_read_write_fields[j] = > + shadow_read_write_fields[i]; > + j++; ... you need to respin anyway because the j++ is wrong. It should be inside the "if". If you prefer, you can put it in the lhs of the assignment, otherwise a separate statement is fine by me too. Paolo