From nobody Thu May 9 22:35:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1691446781; cv=none; d=zohomail.com; s=zohoarc; b=DZpIuH6unrLoZV44G7FEHkpz04sN6BAoL+rGrDhjim8Df79Wqx191MdpzFycZQCFzugsQnrBl8/yuYDCoBYLdKMl7uM2tlGpOiCCFnxbxJIBLCVav70f7xEtA3fSSNgfJJod6LMm4dphCjrVq483tcQGKCY07sE96UGhKZGR2/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691446781; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=B5ddogz6ssKMprKcwC91sbBtEGvoKYSyZ4oIHsEh4mw=; b=LAFpX29wx2PHit2x2nAoV6Mo32Qf2Z+6SszosU/9fA/11Lf/h9DEvpwVaWpE79Cuzyjs+c0d3KzgnLXkn6IbbT2iQgj2Am5swkf972hqKAzyDDrUJHJAFbi1bOMojC0MJKAcPitB7n8movcgCb87nCCCSOKWhXCJJYjdsfYUsjw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 169144678111052.96267643809483; Mon, 7 Aug 2023 15:19:41 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.578964.906703 (Exim 4.92) (envelope-from ) id 1qT8ZA-0004Ri-LW; Mon, 07 Aug 2023 22:19:08 +0000 Received: by outflank-mailman (output) from mailman id 578964.906703; Mon, 07 Aug 2023 22:19:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qT8ZA-0004Rb-Gs; Mon, 07 Aug 2023 22:19:08 +0000 Received: by outflank-mailman (input) for mailman id 578964; Mon, 07 Aug 2023 22:19:07 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qT8Z9-0004RV-6k for xen-devel@lists.xenproject.org; Mon, 07 Aug 2023 22:19:07 +0000 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [2607:f8b0:4864:20::f34]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6b71ed87-3570-11ee-b280-6b7b168915f2; Tue, 08 Aug 2023 00:19:05 +0200 (CEST) Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-63cfd68086dso28200326d6.1 for ; Mon, 07 Aug 2023 15:19:05 -0700 (PDT) Received: from kevinnegy-MS-7B85.home (2603-7081-7e3f-df30-ac18-f9bd-4af9-8893.res6.spectrum.com. [2603:7081:7e3f:df30:ac18:f9bd:4af9:8893]) by smtp.gmail.com with ESMTPSA id q4-20020a0c9a44000000b006300e92ea02sm3230906qvd.121.2023.08.07.15.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 15:19:02 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6b71ed87-3570-11ee-b280-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=exostellar.io; s=google; t=1691446744; x=1692051544; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=B5ddogz6ssKMprKcwC91sbBtEGvoKYSyZ4oIHsEh4mw=; b=cKjCQ7f4JoSJKyQusI8TZiu6fHU9zW8df5m/ibDZJPVZC334HFJDs1v6xqE60+x+DC PK4HfOpskRZaL4RSYrr5ocwi2epEbU5H+DexlwwBVyt7vJnSg2gCYCHg9FUwGP+fW0zH l/L6fKZCJUraHlxYoweP2m31dHrBSQ9zAxlu3tr/yjRCZJDVyiDVQaY5x4qoEyzw2zza zSmrdtXeqFvw7AAavaHJaLx/yj8xvgQ77Bd5XCXmXWq6+ejrEQWDgzIEnKRJo/m1cecQ zLHELV1b+oW670MyO7T+AsgujIUr2R/d1I0SgdcO9UHSZX0g+LKJWvCqIBAuYcuTije1 wjYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691446744; x=1692051544; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B5ddogz6ssKMprKcwC91sbBtEGvoKYSyZ4oIHsEh4mw=; b=bAAzA2Fu1EkaiZwXcpG7j476y1gQti+JcyDZZuVisYG54zwwri0PV7sEBL+AyIygqr LccgVGhNZ5jOgY5xrVz5EUQAoNYLY+9qdS55amzxpGb2LrfOTyHNbQ7WmkA90Tx7G34E wrDtmCsJ2lYCgFuEhpVmRlfb3rS6TuutZY6r3sPE8fos+k1zgw3KDP5MDC8fcTBc5wjQ q1LBmvKuAD7xKDvSm9jz81Z5Iq/VR8lnRPnC1NgrTIFT/lMXqJDKJGn3hSzUavYlChRd 2zmXd51ROfQSIG1idUrxyIs0acgGMImwea8/5wCcP52OgrK9ScwM4P5/h+r66YtpCynh P+VA== X-Gm-Message-State: AOJu0Yx05LySNxQlN8RTS2X76BgV9qObeuRgaVG0/8WFVElOBhHW5Pd7 5piGS4KRLW4x8DOqvEhXgKnKGdhyogu0iX03UPEYLdWx X-Google-Smtp-Source: AGHT+IFAwmFoA8RdUNOlqqGfSxJVgXRlmAojWIbMmWVZLFCbiV6pJYC9V/5ee+kYdfKjeJPA4iXp+g== X-Received: by 2002:a0c:df8f:0:b0:63d:318c:7e0d with SMTP id w15-20020a0cdf8f000000b0063d318c7e0dmr10300369qvl.45.1691446743781; Mon, 07 Aug 2023 15:19:03 -0700 (PDT) From: Kevin Alarcon Negy To: xen-devel@lists.xenproject.org Cc: Kevin Alarcon Negy , Wei Liu , Anthony PERARD , Juergen Gross Subject: [PATCH RESEND] libxl: Make domain build xc_domain_setmaxmem() call use max_memkb Date: Mon, 7 Aug 2023 18:16:10 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @exostellar.io) X-ZM-MESSAGEID: 1691446783236100001 Content-Type: text/plain; charset="utf-8" When building a domain, xc_domain_setmaxmem() is called with target_memkb (= memory in domain config file). If a config specifies maxmem > memory, any attempts to increase the domain = memory size to its max, outside of xl mem-set or xl mem-max, which already call xc_domain_setmaxmem= () properly, will fail. Changed xc_domain_setmaxmem() call inside libxl__build_pre() to use max_mem= kb. Signed-off-by: Kevin Alarcon Negy --- tools/libs/light/libxl_dom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c index 94fef37401..16aa255aad 100644 --- a/tools/libs/light/libxl_dom.c +++ b/tools/libs/light/libxl_dom.c @@ -355,7 +355,7 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, return ERROR_FAIL; } =20 - if (xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb + size) < = 0) { + if (xc_domain_setmaxmem(ctx->xch, domid, info->max_memkb + size) < 0) { LOGE(ERROR, "Couldn't set max memory"); return ERROR_FAIL; } --=20 2.25.1