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

Re: [PATCH v3 02/16] x86/boot: introduce domid field to struct boot_domain


  • To: Alejandro Vallejo <agarciav@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Thu, 10 Apr 2025 12:18:07 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.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=aFNH0dveQUEeq3PVdBKPIu5GhlKXXz5N5FFb48GZA+M=; b=A86DES0EGIveBWznVTEhqW4rIK1zMvaXueDLo77O04Cbh1SApOTJIjK4xPWyJXwYbHlPcQxVP0P1Jge0JthKFuOLmqvz0SFQCBJoputlXKSV3jyv1ZPl02F5af7xkMSsc6Bm1R/M0nbbUbLGW/Oj2eUpsSpxgkvAALQg2xSQfuRdQgb3mX/xfu8h2gpLzzNQagf56XBPSqjhDe1B2oG+SvJSzVfjEnQzGRp3VO2OMScXX4TeV0foEDXEzBPWl/Pg8IKOOJcUnS+iv+W19elxpjr8KThmjVAwpW6kzj9mRvl1dLIty5x8zNsWJSepPBUcoNJ0ZG+HaVxjGj/pJzE/Ig==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bxvcFZcaeupSrvgMEthYUiTudmk+YrM/yGKGAqqupjYPEfQA1V7H/NaixSsUmHQaJ9LFFVeo+4842WVH1QhAp9KSIlecryYNuNXMVO65uuuTBllNCSLxYd9+ZDym8cCDI2LLy5L24bJ4u6ZZp7DyOtVSoTYSlSW8Z3gu1JlWmX+fI9/AJOvPFb6lzMB9orUR1bDXsHi3RtyWr/m12swhanhK/AxhUd8tI75jOa1y9XL1ANujURN1cxPqMf7Rbv6Y55XXEs/KstzgyDQeun8+BNKgRoANXpFOow4p2NbM35p6YrWmFLt1P3I439gXJRemBaO/f/wWTAnBPES590H2xA==
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 10 Apr 2025 16:18:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-04-09 06:33, Alejandro Vallejo wrote:
On Wed Apr 9, 2025 at 7:34 AM BST, Jan Beulich wrote:
On 08.04.2025 18:07, Alejandro Vallejo wrote:
@@ -1010,15 +1010,15 @@ static struct domain *__init create_dom0(struct 
boot_info *bi)
          dom0_cfg.flags |= XEN_DOMCTL_CDF_iommu;
/* Create initial domain. Not d0 for pvshim. */
-    domid = get_initial_domain_id();
-    d = domain_create(domid, &dom0_cfg, pv_shim ? 0 : CDF_privileged);
+    bd->domid = get_initial_domain_id();
+    d = domain_create(bd->domid, &dom0_cfg, pv_shim ? 0 : CDF_privileged);
      if ( IS_ERR(d) )
-        panic("Error creating d%u: %ld\n", domid, PTR_ERR(d));
+        panic("Error creating d%u: %ld\n", bd->domid, PTR_ERR(d));
init_dom0_cpuid_policy(d); if ( alloc_dom0_vcpu0(d) == NULL )
-        panic("Error creating d%uv0\n", domid);
+        panic("Error creating %pd vcpu 0\n", d);

And why exactly is this not %pdv0?

Likely to avoid what looks like a highly cryptic format specifier. But I
agree your option seems nicer.

Hi, Jan.  Sorry, I made this change.  In earlier feedback you wrote:

> That said, since vsprintf.c:print_vcpu() calls print_domain(), using
> %pd is certainly an option here (inconsistencies would arise if %pv
> and %pd presented domain IDs in [perhaps just slightly] different
> ways).

I took that to mean you thought "faking" %pv is undesirable, so I just wrote in in a different form to avoid the potential inconsistency. I'm fine with %pdv0.

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks,
Jason



 


Rackspace

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