From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH v3 01/15] xen: add xenstore domain flag to hypervisor Date: Fri, 8 Jan 2016 17:10:00 +0100 Message-ID: <568FDF58.6080605@suse.com> References: <1452258526-4797-1-git-send-email-jgross@suse.com> <1452258526-4797-2-git-send-email-jgross@suse.com> <568FD0B902000078000C4E8F@suse.com> <568FC60F.4090605@suse.com> <568FEBE402000078000C500D@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <568FEBE402000078000C500D@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Tim Deegan , wei.liu2@citrix.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, Andrew Cooper , ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, David Vrabel , Keir Fraser , dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On 08/01/16 17:03, Jan Beulich wrote: >>>> On 08.01.16 at 15:22, wrote: >> On 08/01/16 15:07, Jan Beulich wrote: >>>>>> On 08.01.16 at 14:08, wrote: >>>> --- a/xen/common/domain.c >>>> +++ b/xen/common/domain.c >>>> @@ -318,6 +318,12 @@ struct domain *domain_create(domid_t domid, unsigned >> int domcr_flags, >>>> hardware_domain = d; >>>> } >>>> >>>> + if ( domcr_flags & DOMCRF_xs_domain ) >>>> + { >>>> + d->is_xenstore = 1; >>>> + d->disable_migrate = 1; >>>> + } >>> >>> It only occurred to me now: Wouldn't it be worth denying the domain >>> creation request if there already is a xenstore domain? >> >> Hmm, the only cases where this would make sense would be: >> >> - some bug in dom0 resulting in parallel calls of init-xenstore-domain > > Or human (admin) error? I don't think so. init-xenstore-domain checks whether xenstored or another xenstore domain is already running and will fail in this case. Multiple xenstore domains are possible only if init-xenstore-domain is running multiple times in parallel and at least two instances succeed in passing the check for another xenstored domain before one instance did create the domain. The only way to achieve this via admin error would be to duplicate the start script/service and configure both to run in parallel. I think this scenario is plausible only for an action done on purpose. Juergen