On 23.07.2025 02:11, [email protected] 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.)

> +    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.

Jan

Reply via email to