lkml.org 
[lkml]   [2014]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] KVM: x86: Check for host supported fields in shadow vmcs
Date
Paolo Bonzini <pbonzini@redhat.com> writes:

> 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

j++ outside the "if" looks right to me. Can you please explain why
you think it shouldn't be that way ?

> assignment, otherwise a separate statement is fine by me too.
>
> Paolo


\
 
 \ /
  Last update: 2014-04-22 18:41    [W:0.129 / U:26.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site