All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Andrew Jones <drjones@redhat.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] evtchn: make EVTCHNOP_reset suitable for kexec
Date: Fri, 25 Jul 2014 18:38:12 +0200	[thread overview]
Message-ID: <8738dpjswb.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <53D29D5F020000780002622D@mail.emea.novell.com> (Jan Beulich's message of "Fri, 25 Jul 2014 17:09:35 +0100")

"Jan Beulich" <JBeulich@suse.com> writes:

>>>> On 25.07.14 at 17:48, <vkuznets@redhat.com> 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?

Originally I though about introducing new hypercall to cleans up all
control blocks when FIFO-based event channel ABI is being used (see
"[PATCH RFC] evtchn: introduce EVTCHNOP_fifo_destroy hypercall"
email). Andrew and Ian convinced me to reuse EVTCHNOP_reset to be
ABI-agnostic here.

I'm not sure how to check the purpose of introduction but I did check
that EVTCHNOP_reset is not being used neither in Linux kernel nor in
http://xenbits.xensource.com/ext/win-pvdrivers/. The original commit
which introduces it is:
 commit 115209d91bcd3734ddaaf58a4a1cdbb4c44cd4fa
 Author: kfraser@localhost.localdomain <kfraser@localhost.localdomain>
 Date:   Fri Jan 19 17:20:57 2007 +0000

    [XEN] New event-channel reset operation.
    Plumbed through libxenctrl to python.
    
    From: Andrei Petrov <andrei.petrov@xensource.com>
    Signed-off-by: Keir Fraser <keir@xensource.com>

It would be great if you can point out EVTCHNOP_reset usages I'm not
aware of. We can revise the descision of reusing EVTCHNOP_reset in case
we break things.

>
> And apart from that blindly leaving all interdomain channels intact
> doesn't seem reasonable either.

I agree here, see my reply to Andrew. We need to preserve console/store
channels only and any suggestion on how to distinguish them from other
interdomain mappings to Dom0 on hypervisor side are welcome.

>
> Jan
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

-- 
  Vitaly

  parent reply	other threads:[~2014-07-25 16:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 15:48 [PATCH] evtchn: make EVTCHNOP_reset suitable for kexec Vitaly Kuznetsov
2014-07-25 15:58 ` Andrew Cooper
2014-07-25 16:25   ` Vitaly Kuznetsov
2014-07-25 17:06     ` Andrew Cooper
2014-07-28  6:24       ` Jan Beulich
2014-07-25 16:09 ` Jan Beulich
2014-07-25 16:16   ` Andrew Cooper
2014-07-25 16:23     ` Andrew Cooper
2014-07-28  6:18       ` Jan Beulich
2014-07-25 16:38   ` Vitaly Kuznetsov [this message]
2014-07-28  9:26     ` Ian Campbell
2014-07-28 12:36 ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738dpjswb.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=drjones@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.