From: Nitin A Kamble Date: Wed, 5 Nov 2008 23:56:21 +0000 (-0800) Subject: KVM: Fix cpuid iteration on multiple leaves per eac X-Git-Tag: v2.6.29-rc1~539^2~87 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fdf8e59faa5c60e9d77c8e14abe3a0f8bfcf586;p=pandora-kernel.git KVM: Fix cpuid iteration on multiple leaves per eac 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: Nitin A Kamble Signed-off-by: Avi Kivity --- Reading git-diff-tree failed