KVM: Refactor and simplify kvm_dev_ioctl_get_supported_cpuid
authorSasha Levin <levinsasha928@gmail.com>
Mon, 28 Nov 2011 09:20:29 +0000 (11:20 +0200)
committerAvi Kivity <avi@redhat.com>
Tue, 27 Dec 2011 09:22:02 +0000 (11:22 +0200)
This patch cleans and simplifies kvm_dev_ioctl_get_supported_cpuid by using a table
instead of duplicating code as Avi suggested.

This patch also fixes a bug where kvm_dev_ioctl_get_supported_cpuid would return
-E2BIG when amount of entries passed was just right.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

No differences found