[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC v1 61/74] xen/pvshim: support vCPU hotplug



>>> On 04.01.18 at 14:06, <wei.liu2@xxxxxxxxxx> wrote:
> @@ -1303,22 +1320,20 @@ long do_vcpu_op(int cmd, unsigned int vcpuid, 
> XEN_GUEST_HANDLE_PARAM(void) arg)
>  
>          break;
>  
> -    case VCPUOP_up: {
> -        bool_t wake = 0;
> -        domain_lock(d);
> -        if ( !v->is_initialised )
> -            rc = -EINVAL;

Shouldn't this check remain here? I realize this will complicate
locking (luckily the domain lock is a recursive one, so it shouldn't
be too bad), but I don't think pv_shim_cpu_up() can tolerate failing
because of vcpu_up() failing.

I also think that the use of "long" for return types and values isn't
really warranted here, and there's also no visible to me reason to
special case CPU0 here. But for simplicity reasons I can see why
you've chosen that option; otoh the locking issue above that you'll
need to solve might be easier to deal with if you didn't switch CPUs
for hypercall processing (without dropping the use of
continue_hypercall_on_cpu()).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.