• Nitin A Kamble's avatar
    KVM: Fix cpuid iteration on multiple leaves per eac · 0fdf8e59
    Nitin A Kamble authored
    The code to traverse the cpuid data array list for counting type of leaves is
    currently broken.
    
    This patches fixes the 2 things in it.
    
     1. Set the 1st counting entry's flag KVM_CPUID_FLAG_STATE_READ_NEXT. Without
        it the code will never find a valid entry.
    
     2. Also the stop condition in the for loop while looking for the next unflaged
        entry is broken. It needs to stop when it find one matching entry;
        and in the case of count of 1, it will be the same entry found in this
        iteration.
    Signed-Off-By: default avatarNitin A Kamble <nitin.a.kamble@intel.com>
    Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
    0fdf8e59
x86.c 103 KB