On 21.11.2018 20:55, Razvan Cojocaru wrote:
>> +            if ( a == v )
>> +                continue;
>> +
>> +            /* Pause, synced. */
>> +            while ( !a->arch.in_host )
> Why not use a->is_running as a way to know whether the vCPU is
> running?
> 
> I think the logic of using vcpu_pause and expecting the running vcpu
> to take a vmexit and thus set in_host is wrong because a vcpu that
> wasn't running when vcpu_pause_nosync is called won't get scheduled
> anymore, thus not taking a vmexit and this function will lockup.

We can resolve this by using while ( !vcpu_runnable(a) && 
!a->arch.in_host ), if this is suitable.

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

Reply via email to