|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] VMX: don't blindly enable descriptor table exiting control
>>> On 13.04.17 at 17:16, <andrew.cooper3@xxxxxxxxxx> wrote:
> 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?
Ah, yes, I'll do that. Don't know why it didn't occur to me right away
(as I didn't like this property of the code above either).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |