From patchwork Wed Nov 1 09:33:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 13442702 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56CBFC4332F for ; Wed, 1 Nov 2023 09:53:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.626333.976539 (Exim 4.92) (envelope-from ) id 1qy7uR-0006Ug-As; Wed, 01 Nov 2023 09:53:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 626333.976539; Wed, 01 Nov 2023 09:53:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qy7uR-0006UY-5d; Wed, 01 Nov 2023 09:53:11 +0000 Received: by outflank-mailman (input) for mailman id 626333; Wed, 01 Nov 2023 09:53:09 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qy7cv-0005sN-79 for xen-devel@lists.xenproject.org; Wed, 01 Nov 2023 09:35:05 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ef4ffffe-7899-11ee-9b0e-b553b5be7939; Wed, 01 Nov 2023 10:35:03 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 723EF1F74A; Wed, 1 Nov 2023 09:35:03 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 46EC513460; Wed, 1 Nov 2023 09:35:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id X4TnD8cbQmVACQAAMHmgww (envelope-from ); Wed, 01 Nov 2023 09:35:03 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ef4ffffe-7899-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1698831303; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=27vJ80eI9t0Dmh4t3Smn4CXNhdUOQ+kVQRJUrk4nmkU=; b=PRegSZq/D2YS2jcVY5VwV2nLmFeWrzfWv3s0ckAcO9GitxC6bbU6jRzOKuC3yyEsMaeopF I9hBWyqW1SSGwpToPCdPOYQhd9htCExSCA2oqoG6MdfqhFKoS0GisSqQ4lyX8hnD0qg428 KfIz0VBjdEYINVgfGt+RE5d5QlxcnrA= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD Subject: [PATCH 17/29] tools/helpers: allocate xenstore event channel for xenstore stubdom Date: Wed, 1 Nov 2023 10:33:13 +0100 Message-Id: <20231101093325.30302-18-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231101093325.30302-1-jgross@suse.com> References: <20231101093325.30302-1-jgross@suse.com> MIME-Version: 1.0 In order to prepare support of PV frontends in xenstore-stubdom, add allocation of a Xenstore event channel to init-xenstore-domain.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/helpers/init-xenstore-domain.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xenstore-domain.c index b2d5df8ba5..140ed610ae 100644 --- a/tools/helpers/init-xenstore-domain.c +++ b/tools/helpers/init-xenstore-domain.c @@ -248,6 +248,13 @@ static int build(xc_interface *xch) dom->cmdline = xc_dom_strdup(dom, cmdline); dom->xenstore_domid = domid; dom->console_evtchn = console_evtchn; + rv = xc_evtchn_alloc_unbound(xch, domid, domid); + if ( rv < 0 ) + { + fprintf(stderr, "xc_evtchn_alloc_unbound failed\n"); + goto err; + } + dom->xenstore_evtchn = rv; rv = xc_dom_mem_init(dom, memory); if ( rv )