diff --git a/xen/common/domain.c b/xen/common/domain.c index a1f8bb4f2f..88bbe984bc 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1364,7 +1364,7 @@ long do_vcpu_op(int cmd, unsigned int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg) struct vcpu *v; long rc = 0; - if ( vcpuid >= d->max_vcpus || (v = d->vcpu[vcpuid]) == NULL ) + if ( (v = domain_vcpu(d, vcpuid)) == NULL ) return -ENOENT; switch ( cmd )