From mboxrd@z Thu Jan 1 00:00:00 1970 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 D3523C83F1A for ; Wed, 23 Jul 2025 18:24:31 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1054626.1423356 (Exim 4.92) (envelope-from ) id 1uee8V-0001BN-Bk; Wed, 23 Jul 2025 18:24:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1054626.1423356; Wed, 23 Jul 2025 18:24:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uee8V-0001BG-7P; Wed, 23 Jul 2025 18:24:15 +0000 Received: by outflank-mailman (input) for mailman id 1054626; Wed, 23 Jul 2025 18:24:15 +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 1uee8U-0001BA-0m for xen-devel@lists.xenproject.org; Wed, 23 Jul 2025 18:24:14 +0000 Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3b16d1d3-67f2-11f0-a31d-13f23c93f187; Wed, 23 Jul 2025 20:24:12 +0200 (CEST) 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: 3b16d1d3-67f2-11f0-a31d-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1753295051; x=1753554251; bh=2/kZ+Q31/+0dcWIDYtMKR9GPl3decczCQtrkGcRybA4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=b007y+g5VKdUQhPPi/GVWU6SmovBWIXg3s6n8bdLGH5jVjqh4nXE4l08pVUUmzqyQ U7n5utBiMCchJLXvrM7Ta4UIsDv9PNy2AGnwLxtXXpOXLsugs0cpMJ+/4iCfX+miIv EXG66cwQr3qBDIYgQsT3HBg+Bk6PC5IxhbBoakCTva8ya2D8apcAY59y9F9WM0+2KU qqtXOF71hzvo1DBpaQdiX77F4pvAVfc2cgqEu2JRyobulV6lETnBW4qLMgbNj1gdg5 sQuKL8tPTmehwitn6hJ72MIsdK9yPY02zy810tGcjHtS/VfcSeEliT+knkuN2sU8Or eebcCMkaB5arQ== Date: Wed, 23 Jul 2025 18:24:07 +0000 To: Jan Beulich From: dmkhn@proton.me Cc: alejandro.garciavallejo@amd.com, andrew.cooper3@citrix.com, anthony.perard@vates.tech, julien@xen.org, michal.orzel@amd.com, oleksii.kurochko@gmail.com, roger.pau@citrix.com, sstabellini@kernel.org, dmukhin@ford.com, xen-devel@lists.xenproject.org Subject: Re: [PATCH v9] xen/console: introduce domain_console struct Message-ID: In-Reply-To: References: <20250723001116.186009-1-dmukhin@ford.com> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: 41039611583913181d6f82f6b08d24dd2cf7e460 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 23, 2025 at 05:10:04PM +0200, Jan Beulich wrote: > On 23.07.2025 02:11, dmkhn@proton.me wrote: > > @@ -559,7 +559,8 @@ void hvm_do_resume(struct vcpu *v) > > static int cf_check hvm_print_line( > > int dir, unsigned int port, unsigned int bytes, uint32_t *val) > > { > > - struct domain *cd =3D current->domain; > > + struct domain *d =3D current->domain; >=20 > Why the renaming? (Iff any renaming was needed here, then please to currd= .) It was requested earlier: https://lore.kernel.org/all/1ac74dd3-e0c5-43e5-9eed-c1a2cc17d068@suse.com= / >=20 > > + struct domain_console *cons =3D d->console; > > char c =3D *val; > > > > ASSERT(bytes =3D=3D 1 && port =3D=3D XEN_HVM_DEBUGCONS_IOPORT); > > @@ -571,16 +572,21 @@ static int cf_check hvm_print_line( > > if ( !is_console_printable(c) ) > > return X86EMUL_OKAY; > > > > - spin_lock(&cd->pbuf_lock); > > + rcu_lock_domain(d); >=20 > Given this is current->domain, it can't go away, and hence I don't think = this > is needed here. Ack >=20 > Jan >=20