Hi all, I am reading kvm code in 3.2.0-rc4, and found line in virt/kvm/kvm_main.c:kvm_vm_ioctl_create_vcpu if (v->vcpu_id == id) { So I think the member vcpu_id should be u32 type. --- include/linux/kvm_host.h 2011-12-02 06:56:01.000000000 +0800 +++ include/linux/kvm_host.h.new 2011-12-14 11:03:51.000000000 +0800 @@ -117,7 +117,7 @@ struct preempt_notifier preempt_notifier; #endif int cpu; - int vcpu_id; + u32 vcpu_id; int srcu_idx; int mode; unsigned long requests; and arch/powerpc/kvm/book3s_hv.c struct kvm_vcpu *kvmppc_find_vcpu(struct kvm *kvm, int id) Now we have KVM_MAX_VCPUS defined as 254 or 64, but I am afraid the following lines may cause bugs if vcpu numbers more than max value of uint16 . file arch/s390/kvm/sigp.c: __sigp_external_call inti->extcall.code = vcpu->vcpu_id; arch/s390/kvm/priv.c:handle_store_cpu_address rc = put_guest_u16(vcpu, useraddr, vcpu->vcpu_id); Thanks -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html