[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: Thu, 26 Dec 2024 11:16:03 -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=1735229767; 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=YqqKeyet+2uUgrlg44C8mno8IzfJtoe6MzUCfi5C2wo=; b=gz8QZ3Gi3q72ZeSylQ3A62sfOi79i26LQgOcbvx4OE5eIooaeQz824NyA02ACLdB3pSluVar9BY3gjSdfR2zI7oov1faMxFsS13kQYTQeAktykVOO3hIAskb3VhGbzP+mN0al7nrPNDeZ2ar+sHZzWXCItCNlTbQ0D5Sl6K6CL0=
  • Arc-seal: i=1; a=rsa-sha256; t=1735229767; cv=none; d=zohomail.com; s=zohoarc; b=a7B9U03m7oglKjoxJdzbsAqRmCNMdY715+dstrtLbYuIAmfWGHI38TjGikOtVcArZH5CuuJhNSsoUzTJZYG8MSbaoL5z8TmiF/xXSgdnnzMmK65FNcwO+T3pc8G8D+uJej/Ef4oPvXF8GHyud6wCPuw3YFE4ZaoqZnnErRwlqfc=
  • 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: Thu, 26 Dec 2024 16:16:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/11/24 12:59, Daniel P. Smith wrote:
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.

Before sending out v2, wanted to respond back that I did not see an immediate way to move this up to dom0_compute_nr_pages() without bring in a series of unrelated changes.

v/r,
dps




 


Rackspace

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