[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] domain: move vmtrace_alloc_buffer() invocation in vcpu_create()


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 16 Feb 2026 16:29:16 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AXMzX5X40VQWza4VCbk3ZN7TzYOwbZqo8WSW4WjSIrA=; b=E4+OuqtUxlIHkvPhBfa85vHzAPp1adSMhkGGWPzKVhv2epo4NpDwjVaLqms24K+vH8fs2LRf9CK93iCL66vzHj+7j+hbgJdMzNkyDYfD8jAAlcQlWzuoDLOqdLvSgzqaNvDRU3EMa7fWZhMPdT/gBi//Bqf9oJxCLXPVufavxVgiH0jU1JrJ5QA7rOfEOh8Vs8xoUbLQcxwEGillliN8SKufONsGpvtrSbtl/BIUi2ExD7Yjw4DoqIsOaBEp31BVnBcvAa3HnzaWz2RlfScQhKeufQyeN0d8lHUJTR2cX2GPqPchzbMWDLIvUidlh5bmYnhBZi8T449DnUeHgbj6/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BOk+R92oLmzzB0/P1Mi61GmVu79F5M14KLRqUAyQFi/U7tKVU1hRI5M73IS/bqHVmzIZ4scHoT6+nBrN4ObvGbCs4UdrAUIdfGqm8K6mKilrjnsoN+8BtpEz4fvWLqUIxO+NdhZnSyTTCRb8SW8fgu1loZQxR0/zQh86+d1PbXx8lqzkLrxQ17LMAi06y4Fy6MOMlZUxrFXF73N1JJHAa+yuq3wpGzDZN9xF4bC+Zzh2aqx8KkeB7RMT88nKyiS1tzPhPOSTvOu27wbxun8rohJ+1wragBsduGGDB46a4wQqzSWTX6yJeN5RTu1d7hPxhLfHzKoiwYrUk5rq3ZJGEA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 16 Feb 2026 16:29:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16/02/2026 3:51 pm, Jan Beulich wrote:
> The label used upon the function failing is wrong.

Is it?  Which label do you think it ought to be?

>  Instead of correcting
> the label, move the invocation up a little, to also avoid it altogether
> for the idle domain (where ->vmtrace_size would be zero, and hence the
> function would bail right away anyway).
>
> Fixes: 217dd79ee292 ("xen/domain: Add vmtrace_size domain creation parameter")
> Reported-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -493,14 +493,14 @@ struct vcpu *vcpu_create(struct domain *
>          set_bit(_VPF_down, &v->pause_flags);
>          vcpu_info_reset(v);
>          init_waitqueue_vcpu(v);
> +
> +        if ( vmtrace_alloc_buffer(v) != 0 )
> +            goto fail_wq;
>      }
>  
>      if ( sched_init_vcpu(v) != 0 )
>          goto fail_wq;
>  
> -    if ( vmtrace_alloc_buffer(v) != 0 )
> -        goto fail_wq;
> -
>      if ( arch_vcpu_create(v) != 0 )
>          goto fail_sched;
>  

The positioning was intentional.  I just didn't get to wiring up Intel
PT for Xen context yet, and tying the buffer to the idle vCPU would be
the obvious choice there.

The chances of getting around to that are admittedly low, so I don't
mind moving the call in principle (noting that this is a wish that
likely won't materialise), but the claim over the label needs resolving.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.