[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: NJames Morris <jmorris@namei.org> Signed-off-by: NAvi Kivity <avi@qumranet.com> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
Showing
想要评论请 注册 或 登录