On 13/04/17 15:53, Jan Beulich wrote: > @@ -223,9 +223,15 @@ int arch_monitor_domctl_event(struct dom > ad->monitor.descriptor_access_enabled = requested_status; > > for_each_vcpu ( d, v ) > - hvm_funcs.set_descriptor_access_exiting(v, requested_status); > + { > + ok = hvm_funcs.set_descriptor_access_exiting(v, > requested_status); > + if ( !ok ) > + break; > + } > > domain_unpause(d); > + if ( !ok ) > + return -EOPNOTSUPP;
While the overall purpose of the patch is clearly a good thing, this implementation isn't ideal. In principle, this structure could hit a failure mid way through the vcpus, leaving them in an inconsistent state. Instead, why not clobber the set_descriptor_access_exiting() function pointer if support isn't available, and use that (before the domain_pause()) to fail with EOPNOTSUPP? ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel