[PATCH] KVM: add valid_vcpu() helper
authorJames Morris <jmorris@namei.org>
Fri, 22 Dec 2006 09:04:55 +0000 (01:04 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 22 Dec 2006 16:55:45 +0000 (08:55 -0800)
commit5aacf0ca4128fdeadf91c0ac50271841b643d1fd
treeb951292c844b53d8be8c315419a12c86463f6b7c
parent5f2a105d5e33a038a717995d2738434f9c25aed2
[PATCH] KVM: add valid_vcpu() helper

Consolidate the logic for checking whether a vcpu index is valid.  Also, use
likely(), as a valid value should be the overwhelmingly common case.

Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/kvm/kvm_main.c