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

Re: [RFC 04/38] x86/hyperlaunch: convert vcpu0 creation to domain builder


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Fri, 25 Apr 2025 16:22:21 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=jtI2W2IgT4q2vABA7JthLVQLkC/UPM3zKWRx5ppodnI=; b=fFkX8l2EwckaoxBXw/lGWz7k8sEChxBorM2q9PWNxA6M8QOYgDN6voGHCtOi2YYRHsGjc8gkGCT30tZKHQS8C8gFQ5FLmJmAcA7XaA1z1ZIPWgwKlYbz9BfLqypnN3Qzp7DERUHL43W+zgGiNcWoZG0mrPuYvW37KRa4/SgRjvgGhykslu0xxMKrGIM9Rpf9xeqWGjbHW4boyOBxK3pbycQHMBEMsJ0UJUC3eAa6lgsgwVPt3xk28uEmDxnD1mrWXvflwI5G2c+lh1WBgbNPlLVRpZWDm3mxLMaWZnN05Y/xIc7nlNis/4jSNAqIUQwsdGaxqAg6PvJ4h+TvhNi9lA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pKbDnYk7gM7+ziPsw8ypZcp/uRKuhg2ElfDDbXZdqczhMI9HtIDUotv3hnXrexHBO6GjS6X7mWX4AfcDxhgwQVVysxvUd8oWfEwEJGmoY9SDNgyiN8Mg0Nd6Bfr7pWBOaNM6dRyMZAUIjayf4d+vW0kUQtaUAt7oaKgR2yxq2xHHnAv5G70ZdFTqP/KRfRINnHOvXGMFlues50jS3eEM+LEQEL4gTNPOK50OZRpQWpcd9Y+Ym3RwPET044UWFojLbDn2D9ot27+RDqx1gAqLT5SNOjJdV7ThO4Pk0a+HTX2KvZekx2EJLnp+V21Qsh1Ntsw4bDyUNt27j9uHrOGpYA==
  • Cc: <jason.andryuk@xxxxxxx>, <stefano.stabellini@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 25 Apr 2025 15:22:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Sat Apr 19, 2025 at 11:07 PM BST, Daniel P. Smith wrote:
> Convert alloc_dom0_vcpu0() to dom0_set_affinity(), making it only set up the
> node affinity based on command line parameters passed. At the same time,
> introduce alloc_dom_vcpu0() as the replacement for alloc_dom0_vcpu(). Then 
> have
> alloc_dom_vcpu0() call dom0_set_affinity() when the boot domain is the control
> domain, otherwise set the affinity to auto.
>
> Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
> ---
>  xen/arch/x86/dom0_build.c                 |  4 +---
>  xen/arch/x86/domain-builder/domain.c      | 11 +++++++++++
>  xen/arch/x86/include/asm/dom0_build.h     |  2 ++
>  xen/arch/x86/include/asm/domain-builder.h |  1 +
>  xen/arch/x86/setup.c                      |  5 +++--
>  5 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/x86/domain-builder/domain.c 
> b/xen/arch/x86/domain-builder/domain.c
> index f2277b9e3cf3..619d36ea0b87 100644
> --- a/xen/arch/x86/domain-builder/domain.c
> +++ b/xen/arch/x86/domain-builder/domain.c
> @@ -9,6 +9,7 @@
>  #include <xen/sched.h>
>  
>  #include <asm/bootinfo.h>
> +#include <asm/dom0_build.h>
>  
>  unsigned int __init dom_max_vcpus(struct boot_domain *bd)
>  {
> @@ -27,6 +28,16 @@ unsigned int __init dom_max_vcpus(struct boot_domain *bd)
>      return bd->max_vcpus;
>  }
>  
> +struct vcpu *__init alloc_dom_vcpu0(struct boot_domain *bd)
> +{
> +    if ( bd->capabilities & BUILD_CAPS_CONTROL )
> +        dom0_set_affinity(bd->d);

Similar as before, this probably wants to be DOMAIN_CAPS_HARDWARE?

I'll adjust while rebasing.

Cheers,
Alejandro



 


Rackspace

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