|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] evtchn: make EVTCHNOP_reset suitable for kexec
On 25/07/14 17:16, Andrew Cooper wrote:
> On 25/07/14 17:09, Jan Beulich wrote:
>>>>> On 25.07.14 at 17:48, <vkuznets@xxxxxxxxxx> wrote:
>>> @@ -954,8 +955,20 @@ static long evtchn_reset(evtchn_reset_t *r)
>>> if ( rc )
>>> goto out;
>>>
>>> - for ( i = 0; port_is_valid(d, i); i++ )
>>> - (void)__evtchn_close(d, i);
>>> + for ( i = 1; port_is_valid(d, i); i++ )
>>> + {
>>> + /*
>>> + * Leave all interdomain connections to Dom0 untouched as we need
>>> to
>>> + * preserve store/console channels.
>>> + */
>>> + chn = evtchn_from_port(d, i);
>>> + if ( chn->state != ECS_INTERDOMAIN ||
>>> + chn->u.interdomain.remote_dom->domain_id != 0 )
>>> + (void)__evtchn_close(d, i);
>>> + }
>> You can't alter the behavior of an existing hypercall like this. Did
>> you at all check why it closes all channels, i.e. for what purpose
>> it got introduced?
>>
>> And apart from that blindly leaving all interdomain channels intact
>> doesn't seem reasonable either.
>>
>> Jan
>>
> I agree with your comment regarding interdomain channels.
>
> However, there absolutely nothing a domain can do to recover from a
> closed xenstore or console connection, as it is state set up by the
> toolstack at domain build time, rather than state set up during early boot.
>
> Whatever the intention of this hypercall originally, I can't see how a
> domain could possibly recover having used it.
>
> ~Andrew
Right - digging into the history shows that this was introduced 7 years
ago as a mixed toolstack or use-on-self hypercall. In the toolstack
case, clearing all channels unconditionally is fine as the toolstack can
reset the xenstore/console event channels.
However, when using it with DOMID_SELF, the domain will clobber itself
irrevocably.
I think it would be acceptable to reset the console and store event
channels if and only if current->domain != d
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |