xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	David Vrabel <david.vrabel@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 1/1] evtchn: make EVTCHNOP_reset suitable for kexec
Date: Wed, 30 Jul 2014 15:05:33 +0100	[thread overview]
Message-ID: <53D917CD0200007800027B21@mail.emea.novell.com> (raw)
In-Reply-To: <87zjfrc5h1.fsf@vitty.brq.redhat.com>

>>> On 30.07.14 at 15:59, <vkuznets@redhat.com> wrote:
> "Jan Beulich" <JBeulich@suse.com> writes:
> 
>>>>> On 30.07.14 at 15:26, <vkuznets@redhat.com> wrote:
>>> --- a/xen/common/event_channel.c
>>> +++ b/xen/common/event_channel.c
>>> @@ -957,6 +957,17 @@ static long evtchn_reset(evtchn_reset_t *r)
>>>      for ( i = 0; port_is_valid(d, i); i++ )
>>>          (void)__evtchn_close(d, i);
>>>  
>>> +    if ( (d == current->domain) && d->evtchn_fifo )
>>> +    {
>>> +        /*
>>> +         * Guest domain called EVTCHNOP_reset with DOMID_SELF, destroying
>>> +         * FIFO event array and control blocks, resetting evtchn_port_ops 
> to
>>> +         * evtchn_port_ops_2l.
>>> +         */
>>
>> At the very least comment and code should match. In the case here I
>> think you want to change the code: Replace "d == current->domain"
>> with "dom == DOMID_SELF", leaving the unaltered behavior still
>> available when a domain passes its own ID.
> 
> Thanks, missed that case. Is there a reason why unaltered behavior is
> better in that case? I understand it gives a choice but it would look
> very unobvious...

No, it's indeed solely for the caller to have a way to pick between both
behaviors.

Jan

  reply	other threads:[~2014-07-30 14:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 13:26 [PATCH v2 0/1] evtchn: make EVTCHNOP_reset suitable for kexec Vitaly Kuznetsov
2014-07-30 13:26 ` [PATCH v2 1/1] " Vitaly Kuznetsov
2014-07-30 13:41   ` Jan Beulich
2014-07-30 13:59     ` Vitaly Kuznetsov
2014-07-30 14:05       ` Jan Beulich [this message]
2014-07-30 13:42   ` David Vrabel
2014-07-30 13:53     ` Jan Beulich
2014-07-30 14:03       ` David Vrabel
2014-07-30 14:14         ` Jan Beulich

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=53D917CD0200007800027B21@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=drjones@redhat.com \
    --cc=vkuznets@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).