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

Re: [PATCH 13/15] x86/hyperlaunch: add memory parsing to domain config


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 11 Dec 2024 12:59:08 -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=1733939953; 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=aUUQXotjCoae9FguMP4BnsvFjSve1T6Oc0EOyn8t6SM=; b=D80qysFUmnfdm8MeqtMktXF7bGuL5Qrj1Mc3ojiOpzg3ptUUGqyfmheiUYHFfXy1TVXyFNqkWfsbLxRaubiSl0kp25wKgP88zMoJYP4ukPdnGgDOsAAM0/IpucRisBlcTJWcvIzxe1an1HUY2ZqEm/ecdFrur8+7fV7mEcJhZ9k=
  • Arc-seal: i=1; a=rsa-sha256; t=1733939953; cv=none; d=zohomail.com; s=zohoarc; b=hqxRH5RV7htdgT7GRVx8ZiV5cW3j0gf7biq49LzS4fsk68BwR6hGq86Thk3KT2aBgjLTwwoYLql1ZxCbbR23gGyxXeiVtO3qbr/IFZa+wAfYO+oj3btiFxPulzQ7yWOnwpQwcj8Ey2TJTBzCZYPbVw19CJyX4x0BuiFxOkVIc/g=
  • Cc: christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 11 Dec 2024 17:59:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11/25/24 19:03, Jason Andryuk wrote:
On 2024-11-23 13:20, Daniel P. Smith wrote:
Add three properties, memory, mem-min, and mem-max, to the domain node device tree parsing to define the memory allocation for a domain. All three fields are
expressed in kb and written as a u64 in the device tree entries.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---

diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index c231191faec7..1c3b7ff0e658 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -609,6 +609,14 @@ int __init construct_dom0(struct boot_domain *bd)
      process_pending_softirqs();
+    /* If param dom0_size was not set and HL config provided memory size */
+    if ( !get_memsize(&dom0_size, LONG_MAX) && bd->mem_pages )
+        dom0_size.nr_pages = bd->mem_pages;
+    if ( !get_memsize(&dom0_min_size, LONG_MAX) && bd->min_pages )
+        dom0_size.nr_pages = bd->min_pages;
+    if ( !get_memsize(&dom0_max_size, LONG_MAX) && bd->max_pages )
+        dom0_size.nr_pages = bd->max_pages;
+

This placement seems a little random.  Can this move into dom0_compute_nr_pages()?

As I started to rebase the multi-domain code around all the changes that happened under the boot module review, dom0_compute_nr_pages() became a mess to work with again. The result does see this drop in favor of handling during dom_compute_nr_pages(). I will look to back port that refactoring to here.

v/r,
dps



 


Rackspace

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