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

Re: [PATCH 11/15] x86/hyperlaunch: add domain id parsing to domain config


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 11 Dec 2024 11:21:35 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733934099; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=kH4d+UX9lpjjueWcRRnkZOevrY0+M4h1bEj5p/ijAQk=; b=ZsCNBle8aLkFEPM72jjlTByMRppLCG4o5KJoWbggtHHdfuQa+7vBYF04DWctj8rXf+niQ6Z929H2eFV7aMGvc4fB521UnkSBI3WAg+EiNVnTaG1aK3ttSZm4BFVAzhH1McXCoWloPivoHu0aro2oOQkXzS8sjWJ9f3tdgYqXwII=
  • Arc-seal: i=1; a=rsa-sha256; t=1733934099; cv=none; d=zohomail.com; s=zohoarc; b=YpQhe8RLm08Q/aT13SNKzLXP2vwFKx360kyGduZVhXxvHFHV8sUjSS2I9valcIBPcPSuj0Gpq7A6YBw2ItnFNBRYuzShDuiReJsXSCKT5eQTd5C0S1gcqAp0DT8YzOCyEyzX8WHG2e5olYckscEfvwKhH5yT5tbhwYaqRrfKWH4=
  • Cc: jason.andryuk@xxxxxxx, christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 11 Dec 2024 16:21:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/2/24 07:02, Jan Beulich wrote:
On 23.11.2024 19:20, Daniel P. Smith wrote:
--- a/xen/arch/x86/domain_builder/fdt.h
+++ b/xen/arch/x86/domain_builder/fdt.h
@@ -27,6 +27,24 @@ static inline int __init fdt_cell_as_u64(const fdt32_t 
*cell, uint64_t *val)
      return 0;
  }
+static inline int __init fdt_prop_as_u32(
+    const struct fdt_property *prop, uint32_t *val)
+{
+    if ( !prop || fdt32_to_cpu(prop->len) < sizeof(u32) )
+        return -EINVAL;
+
+    return fdt_cell_as_u32((fdt32_t *)prop->data, val);
+}
+
+static inline bool __init match_fdt_property(
+    const void *fdt, const struct fdt_property *prop, const char *s)
+{
+    int slen, len = strlen(s);

Plain int isn't quite appropriate for strlen()'s return. It doesn't strictly
need to be size_t, but it should be at least unsigned int.

Ack.

--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1020,7 +1020,8 @@ static struct domain *__init create_dom0(struct boot_info 
*bi)
          dom0_cfg.flags |= XEN_DOMCTL_CDF_iommu;
/* Create initial domain. Not d0 for pvshim. */
-    bd->domid = get_initial_domain_id();
+    if ( bd->domid == DOMID_INVALID )
+        bd->domid = get_initial_domain_id();

Looks like the comment then wants to move, too.

Okay.

v/r,
dps




 


Rackspace

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