All of lore.kernel.org
 help / color / mirror / Atom feed
From: dmkhn@proton.me
To: Jan Beulich <jbeulich@suse.com>,
	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
Date: Thu, 24 Jul 2025 02:17:20 +0000	[thread overview]
Message-ID: <aIGXrDdDHsOvH5rf@kraken> (raw)
In-Reply-To: <aIEowjUsuWfwqSzX@kraken>

On Wed, Jul 23, 2025 at 06:24:07PM +0000, dmkhn@proton.me wrote:
> 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 = current->domain;
> > > +    struct domain *d = current->domain;
> > 
> > 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/
> 

What would be the preferred way to address this?

Add `const` to domain pointer?
`s/cd/currd/`? 
`s/cd/d/` like in previous review?
Do not touch `cd`?

It make sense to adjust the code now by at least adding `const`.

> > 
> > > +    struct domain_console *cons = d->console;
> > >      char c = *val;
> > >
> > >      ASSERT(bytes == 1 && port == 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);
> > 
> > Given this is current->domain, it can't go away, and hence I don't think this
> > is needed here.
> 
> Ack
> 
> > 
> > Jan
> > 



  reply	other threads:[~2025-07-24  2:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23  0:11 [PATCH v9] xen/console: introduce domain_console struct dmkhn
2025-07-23 15:10 ` Jan Beulich
2025-07-23 18:24   ` dmkhn
2025-07-24  2:17     ` dmkhn [this message]
2025-07-24  7:34       ` Jan Beulich
2025-07-24  7:29     ` Jan Beulich

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=aIGXrDdDHsOvH5rf@kraken \
    --to=dmkhn@proton.me \
    --cc=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dmukhin@ford.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --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.