All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Olaf Hering <olaf@aepfle.de>, Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Julien Grall <julien.grall@linaro.org>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Andrew Jones <drjones@redhat.com>, Tim Deegan <tim@xen.org>,
	David Vrabel <david.vrabel@citrix.com>,
	xen-devel@lists.xenproject.org,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	Keir Fraser <keir@xen.org>
Subject: Re: [PATCH RFC 1/4] xen: evtchn: make evtchn_reset() ready for soft reset
Date: Mon, 08 Jun 2015 17:05:57 +0200	[thread overview]
Message-ID: <874mmicka2.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <5575BE5E02000078000822DE@mail.emea.novell.com> (Jan Beulich's message of "Mon, 08 Jun 2015 15:10:06 +0100")

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

>>>> On 03.06.15 at 15:35, <vkuznets@redhat.com> wrote:
>> --- a/xen/common/event_channel.c
>> +++ b/xen/common/event_channel.c
>> @@ -274,11 +274,13 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
>>  
>>      lchn->u.interdomain.remote_dom  = rd;
>>      lchn->u.interdomain.remote_port = rport;
>> +    lchn->u.interdomain.opened_by   = current->domain;
>>      lchn->state                     = ECS_INTERDOMAIN;
>>      evtchn_port_init(ld, lchn);
>>      
>>      rchn->u.interdomain.remote_dom  = ld;
>>      rchn->u.interdomain.remote_port = lport;
>> +    rchn->u.interdomain.opened_by   = current->domain;
>>      rchn->state                     = ECS_INTERDOMAIN;
>
> For one ld == current->domain. And I don't think you need to store
> domain pointers here; storing the domain ID would seem sufficient
> (with the nice benefit of not growing struct evtchn). Plus
> "opened_by" doesn't really reflect what is being done here - the
> event channels are being bound, not opened.
>
>> @@ -933,26 +935,30 @@ int evtchn_unmask(unsigned int port)
>>  }
>>  
>>  
>> -static long evtchn_reset(evtchn_reset_t *r)
>> +void evtchn_reset(struct domain *d, bool_t soft_reset)
>>  {
>> -    domid_t dom = r->dom;
>> -    struct domain *d;
>> -    int i, rc;
>> -
>> -    d = rcu_lock_domain_by_any_id(dom);
>> -    if ( d == NULL )
>> -        return -ESRCH;
>> -
>> -    rc = xsm_evtchn_reset(XSM_TARGET, current->domain, d);
>> -    if ( rc )
>> -        goto out;
>> +    int i;
>
> unsigned int
>
>> +    struct evtchn *chn;
>
> const (and perhaps moved inside the loop below)
>
>> +    /*
>> +     * ECS_INTERDOMAIN channels with port number suitable for the 2-level ABI
>> +     * opened by other domains should remain opened as the domain doing soft
>> +     * reset won't be able to reopen them.
>
> One question of course is - does this really apply to _all_ interdomain
> event channels (rather than just to the xenstore and xenconsole ones)?

The wild guess here is that if a channel was bound by someone else the
domain doing this reset operation won't probably be able (and allowed)
to bind such interdomain connectivity so we need to keep it, from the
hypervisor PoV xenstore and xenconsole channels are not special. We,
however, won't probably need that in case we go for the
toolstack-assisted approach (and as far as I understand there are no
objections against such approach for now but I'll have to prototype it
so we can make a decision.)

-- 
  Vitaly

  reply	other threads:[~2015-06-08 15:06 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 13:35 [PATCH RFC 0/4] 'reset everything' approach to PVHVM guest kexec Vitaly Kuznetsov
2015-06-03 13:35 ` [PATCH RFC 1/4] xen: evtchn: make evtchn_reset() ready for soft reset Vitaly Kuznetsov
2015-06-04 14:05   ` Tim Deegan
2015-06-04 15:19     ` David Vrabel
2015-06-04 15:47       ` Tim Deegan
2015-06-05  8:52         ` Jan Beulich
2015-06-05  8:58           ` Ian Campbell
2015-06-05  9:07             ` Jan Beulich
2015-06-08 14:10   ` Jan Beulich
2015-06-08 15:05     ` Vitaly Kuznetsov [this message]
2015-06-03 13:35 ` [PATCH RFC 2/4] xen: grant_table: implement grant_table_soft_reset() Vitaly Kuznetsov
2015-06-04 14:11   ` Tim Deegan
2015-06-04 15:22     ` David Vrabel
2015-06-04 15:44       ` Tim Deegan
2015-06-08 14:26   ` Jan Beulich
2015-06-08 14:58     ` Vitaly Kuznetsov
2015-06-08 15:35       ` Jan Beulich
2015-06-03 13:35 ` [PATCH RFC 3/4] xen: implement SCHEDOP_soft_reset Vitaly Kuznetsov
2015-06-08 14:31   ` Jan Beulich
2015-06-22 16:00     ` Vitaly Kuznetsov
2015-06-22 16:06       ` Jan Beulich
2015-06-22 16:24         ` Vitaly Kuznetsov
2015-06-23  7:13           ` Jan Beulich
2015-06-23 12:10             ` Vitaly Kuznetsov
2015-06-23 12:52               ` Jan Beulich
2015-06-03 13:35 ` [PATCH RFC 4/4] xen: arch-specific hooks for domain_soft_reset() Vitaly Kuznetsov
2015-06-04 14:19   ` Tim Deegan
2015-06-22  9:44     ` Vitaly Kuznetsov
2015-06-25  9:57       ` Tim Deegan
2015-06-08 15:32   ` Jan Beulich
2015-06-08 15:59     ` Vitaly Kuznetsov
2015-06-04 14:22 ` [PATCH RFC 0/4] 'reset everything' approach to PVHVM guest kexec Tim Deegan
2015-06-08 15:38 ` Ian Jackson
2015-06-08 15:53 ` Wei Liu
2015-06-08 17:43   ` Wei Liu
2015-06-09  8:19     ` Dave Scott
2015-06-09  9:29       ` Wei Liu
2015-06-09  9:38         ` Wei Liu
2015-06-09 10:02           ` Dave Scott

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=874mmicka2.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=drjones@redhat.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=keir@xen.org \
    --cc=olaf@aepfle.de \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.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.