From nobody Sun Feb 8 23:56:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17261525171881018.5450090440124; Thu, 12 Sep 2024 07:48:37 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 149B31715; Thu, 12 Sep 2024 10:48:36 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D7B09145A; Thu, 12 Sep 2024 10:48:13 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6F2A9144E; Thu, 12 Sep 2024 10:48:11 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 000431277 for ; Thu, 12 Sep 2024 10:48:10 -0400 (EDT) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-536-2l0TA3WkNjOJEP_-qPK-6Q-1; Thu, 12 Sep 2024 10:48:09 -0400 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42cb479fab2so10970665e9.1 for ; Thu, 12 Sep 2024 07:48:09 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42caeb81ac0sm178152875e9.34.2024.09.12.07.48.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 07:48:06 -0700 (PDT) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 7948024680F9 for ; Thu, 12 Sep 2024 16:48:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726152490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pjl+yThbBVEpTlYYYnviccdUi96cNTIIBGMhNA93ndA=; b=AHBUheeJnSED4x2h3XDg/ekeGcfl2tc2g/42KQ6SnWFokeWh+cfOitHBhXy3/+X6Rp60Bl tKxonvhGUbiFuRxhS0uDI+pd8KpGu+GtMhAhzygvlnzy5tEI8r9aTh3Lf44uqrHbbwDhBU TuE0lVuQ8InFLKSI88IMiuiTsp0sWrU= X-MC-Unique: 2l0TA3WkNjOJEP_-qPK-6Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726152488; x=1726757288; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pjl+yThbBVEpTlYYYnviccdUi96cNTIIBGMhNA93ndA=; b=ZqdS6Klui2dT8Pj3G4Ciic2VFhuy+sqqKWVNqpNnWRLj02Cr4wz2yEs4CxqNgg0mq/ frWIlDwEijUioTdnHiGVz/dUh/ArPuNCKnOgUFsto3gvSwq07GPHIkyY/jDh+YjL8F4l J73t4BvqglYbSugbPS8kvXpHqQLh+2af6lNfKASTlQqr/MbTVfvGpEIwFxBfRKD9FtMK mDIKDz033pRmFjoHg6+D5kbdtzH++XZ410pa5GGLNACLKcV/3iZrFNJPjIF1wRxav0JB brrrQDy73F44mcxKYNcol0P2IwU9xa8To3bf0lCPdov6Cg2KHMtdzQ1MGO9gr8qPdebU YELA== X-Gm-Message-State: AOJu0YzABw9ViYDiqGND7WSvtsiXMYrWiZvBG0CRQ5z6TsdrvdlkXsyV Q2NrOQ41Qsd+mpeVAW1B+YclZNx2NT7TwQ+AOeb4dPynSol4Evfd4+AYJIy+qg85vWF9sGZrHok XQdJoS6g8tglYJNXd9KL4ssKKanBdgCvxrm3u96lxgrdOl3bOm6SXi2NSPCFptOZD1qLqITsMSa fdGaK0ge7elGPTMfAUr0iy+h3M6i57iWF6BNgxFwE= X-Received: by 2002:a05:600c:314f:b0:42c:b7e1:a9c with SMTP id 5b1f17b1804b1-42cdc8916eamr20606295e9.5.1726152488569; Thu, 12 Sep 2024 07:48:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIStuIJU8ikY2jCSZgkUwsbMM7TaTqGfM03mAAK7el1mfOuAQTQHIzdUnW6UdGJJz1tI4s7Q== X-Received: by 2002:a05:600c:314f:b0:42c:b7e1:a9c with SMTP id 5b1f17b1804b1-42cdc8916eamr20605875e9.5.1726152487141; Thu, 12 Sep 2024 07:48:07 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH 01/10] resctrl: Account for memory bandwidth of 0 being valid Date: Thu, 12 Sep 2024 16:47:50 +0200 Message-ID: <7a81dbddf93d527113e44c3d30e6b071a06c9af0.1726152457.git.mkletzan@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: THTDDO45A22CK2L6IHO2LVXSCUVZLF2F X-Message-ID-Hash: THTDDO45A22CK2L6IHO2LVXSCUVZLF2F X-MailFrom: mkletzan@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1726152518759116600 Content-Type: text/plain; charset="utf-8"; x-default="true" In some scenarios the memory bandwidth in the schemata file might be 0 and so can the minimum allocation in other ones. Remove checks which were added for extra cautiousness. Resolves: https://issues.redhat.com/browse/RHEL-54235 Signed-off-by: Martin Kletzander --- src/util/virresctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 30ae25c48726..8ed111c182e7 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -1425,8 +1425,7 @@ virResctrlAllocParseProcessMemoryBandwidth(virResctrl= Info *resctrl, _("Invalid bandwidth %1$u"), bandwidth); return -1; } - if (bandwidth < resctrl->membw_info->min_bandwidth || - id > resctrl->membw_info->max_id) { + if (id > resctrl->membw_info->max_id) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Missing or inconsistent resctrl info for memory = bandwidth node '%1$u'"), id); @@ -1463,7 +1462,6 @@ virResctrlAllocParseMemoryBandwidthLine(virResctrlInf= o *resctrl, return 0; =20 if (!resctrl || !resctrl->membw_info || - !resctrl->membw_info->min_bandwidth || !resctrl->membw_info->bandwidth_granularity) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Missing or inconsistent resctrl info for memory = bandwidth allocation")); --=20 2.46.0