From nobody Sun May 5 09:31:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1638800998; cv=none; d=zohomail.com; s=zohoarc; b=VoAeP3FPkMjlJlduQZ3LuZ08B2fQhi8ULi0jGt/0en4XNZEH406tQXtqbTnbS9oTs5cqp2hmER5wjB80AzQ1Sixas5o2taS+VM1NRdoVjn32WbFf5qk5gsA3G7UwRRbG7ULb6OzPMoL2YR6qUmpXGXs9whByWVvdK+iX3ZYbsqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638800998; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nT3PojRsjaFLQH8p/xAS/Bo0Edytu7k5yswmTd3p+WU=; b=OzMkRp6akI1W0kx2TUac3UmcvWO2sAYfjBMEtLhjIBhVV+/cNrPvFm/TqAmjE+BpFFSAxrlLPT4GAoEx/aIaFa6xz/18Vq9vgxnlmAH+6ecoLYa+aZ0OfGOBL5RA3gyc/t2wJ6T2yGLolaPegDQEDBgnRKwqjIFG9NqapNZcku8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1638800998528643.5242524653863; Mon, 6 Dec 2021 06:29:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.239123.414474 (Exim 4.92) (envelope-from ) id 1muEzl-0005au-Sy; Mon, 06 Dec 2021 14:29:33 +0000 Received: by outflank-mailman (output) from mailman id 239123.414474; Mon, 06 Dec 2021 14:29:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muEzl-0005aj-Ot; Mon, 06 Dec 2021 14:29:33 +0000 Received: by outflank-mailman (input) for mailman id 239123; Mon, 06 Dec 2021 14:29:32 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muEzk-0005Zn-Qy for xen-devel@lists.xenproject.org; Mon, 06 Dec 2021 14:29:32 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ed6f0b53-56a0-11ec-a5e1-b9374ead2679; Mon, 06 Dec 2021 15:29:32 +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 E36001FD34; Mon, 6 Dec 2021 14:29:31 +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 B5F9913C32; Mon, 6 Dec 2021 14:29:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iJfiKksermHAOwAAMHmgww (envelope-from ); Mon, 06 Dec 2021 14:29:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: ed6f0b53-56a0-11ec-a5e1-b9374ead2679 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1638800971; 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=nT3PojRsjaFLQH8p/xAS/Bo0Edytu7k5yswmTd3p+WU=; b=l/AVPQvCcOUNyZWRJHaL9WSGm7BqoSi1U3QcYqtENEdexWTxtvkGrsISDso9akMmqD1uPn fgqnDBzxPOM/frDFDx/yOV3tYPhPVbaRLTSe5gMhsWcVfP9l/S1Jod294ENh+5VOS1JSDh 2wEy9V84fp0IoWopk3Cme8c1m3pYsLk= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu , Andrew Cooper Subject: [PATCH v2 1/2] tools/helpers: fix PVH xenstore-stubdom console parameters Date: Mon, 6 Dec 2021 15:29:28 +0100 Message-Id: <20211206142929.29105-2-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20211206142929.29105-1-jgross@suse.com> References: <20211206142929.29105-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1638801000201100003 Content-Type: text/plain; charset="utf-8" When using a PVH mode xenstore-stubdom the frame number of the console should be a PFN instead of a MFN. Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper --- V2: - rename variable (Andrew Cooper) --- tools/helpers/init-xenstore-domain.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xens= tore-domain.c index b205a79ee6..9457d0251b 100644 --- a/tools/helpers/init-xenstore-domain.c +++ b/tools/helpers/init-xenstore-domain.c @@ -30,7 +30,7 @@ static char *param; static char *name =3D "Xenstore"; static int memory; static int maxmem; -static xen_pfn_t console_mfn; +static xen_pfn_t console_gfn; static xc_evtchn_port_or_error_t console_evtchn; =20 static struct option options[] =3D { @@ -283,7 +283,9 @@ static int build(xc_interface *xch) } =20 rv =3D 0; - console_mfn =3D xc_dom_p2m(dom, dom->console_pfn); + console_gfn =3D (dom->container_type =3D=3D XC_DOM_PV_CONTAINER) + ? xc_dom_p2m(dom, dom->console_pfn) + : dom->console_pfn; =20 err: if ( dom ) @@ -528,7 +530,7 @@ int main(int argc, char** argv) do_xs_write_dir_node(xsh, fe_path, "tty", ""); snprintf(buf, 16, "%d", console_evtchn); do_xs_write_dir_node(xsh, fe_path, "port", buf); - snprintf(buf, 16, "%ld", console_mfn); + snprintf(buf, 16, "%ld", console_gfn); do_xs_write_dir_node(xsh, fe_path, "ring-ref", buf); xs_close(xsh); =20 --=20 2.26.2 From nobody Sun May 5 09:31:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1638801001; cv=none; d=zohomail.com; s=zohoarc; b=YQ/VzcslYrg18EVlLDhDmmhPZnGWvfjcwvLvO2GdjTdEOHSPWiQQ8LjPwibjihRLQcQED9ThCiGoLy8eM3ptCCqKCqiSLAqYkSgWwB8FkJosMg4Hz3XMnAYnZUdFqP6r/IcC9GwYkzGr4KmgWZKKqJLBYIGbg1aOmr6EhkM+eBQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638801001; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KQS0ebaKdMfO0vK1bTUVKAaK4Cn4ZEScp/e9jp/SwyM=; b=CHa0FQT8Xb6faiAy5GQDbVOEtAtD9b7rt6MZryvgkwKssCiO15cIP/09ce5C+ANsrltL6PNqD4YtA6lZY7HRhuWSILkF8QOrLVA0HI3052p0H8QidDwo5+B2FZ7hCOHg/44sltkcLAt9eEBMycVWP8whZR3exgR4nUCSV/xHvEk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1638801001592567.2906833672309; Mon, 6 Dec 2021 06:30:01 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.239125.414496 (Exim 4.92) (envelope-from ) id 1muEzn-00065Y-DF; Mon, 06 Dec 2021 14:29:35 +0000 Received: by outflank-mailman (output) from mailman id 239125.414496; Mon, 06 Dec 2021 14:29:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muEzn-00064y-8u; Mon, 06 Dec 2021 14:29:35 +0000 Received: by outflank-mailman (input) for mailman id 239125; Mon, 06 Dec 2021 14:29:33 +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 1muEzl-0005aS-Nc for xen-devel@lists.xenproject.org; Mon, 06 Dec 2021 14:29:33 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ed895e3e-56a0-11ec-8a4d-196798b21f7b; Mon, 06 Dec 2021 15:29:32 +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-out1.suse.de (Postfix) with ESMTPS id 1A97321B3E; Mon, 6 Dec 2021 14:29:32 +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 E817313E13; Mon, 6 Dec 2021 14:29:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YF9ZN0sermHAOwAAMHmgww (envelope-from ); Mon, 06 Dec 2021 14:29:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: ed895e3e-56a0-11ec-8a4d-196798b21f7b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1638800972; 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=KQS0ebaKdMfO0vK1bTUVKAaK4Cn4ZEScp/e9jp/SwyM=; b=SwkCrBQE0avjcYDpBTC/+xzbPko1megwESbCugBUs0zMD7M9Jd9DZCTpp5wKyPPwb2cuz8 UqvEBUOZ/09JSGyShdOX1HohRj8LCuRDZTk5Rac7UtvLag6ayT3cRg0B85RWB7SLBtE8a3 KS+MI3+frpljL6uy/iNpZ9pRWHFqrWk= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH v2 2/2] tools/helpers: set event channel for PVH xenstore-stubdom console Date: Mon, 6 Dec 2021 15:29:29 +0100 Message-Id: <20211206142929.29105-3-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20211206142929.29105-1-jgross@suse.com> References: <20211206142929.29105-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1638801002566100001 Content-Type: text/plain; charset="utf-8" In contrast to the PFN of the console ring page the event channel of the console isn't being set automatically by xc_dom_build_image(). Call xc_hvm_param_set() explicitly for that reason. Signed-off-by: Juergen Gross --- V2: - new patch --- tools/helpers/init-xenstore-domain.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xens= tore-domain.c index 9457d0251b..3eff839827 100644 --- a/tools/helpers/init-xenstore-domain.c +++ b/tools/helpers/init-xenstore-domain.c @@ -249,6 +249,14 @@ static int build(xc_interface *xch) fprintf(stderr, "xc_domain_set_memory_map failed\n"); goto err; } + + rv =3D xc_hvm_param_set(xch, domid, HVM_PARAM_CONSOLE_EVTCHN, + console_evtchn); + if ( rv ) + { + fprintf(stderr, "xc_hvm_param_set failed\n"); + goto err; + } } rv =3D xc_dom_build_image(dom); if ( rv ) --=20 2.26.2