From nobody Sun Feb 8 18:11:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673948265; cv=none; d=zohomail.com; s=zohoarc; b=X7epQZcgj0eagsiuS4m/deYbydxNP79xGCGKZKr9cKamtc+5ccYZHZ4e+iGPSNPeFSqYA1K4sCCrVfK7OSLQ1dkjd3WwItyb9fb1pvam6itzbdMAbF00yDDuPZYiRqesPUbH7TBZeXRwPvI5Kt0kQ6W5aEkL38mBD1azJ2SVELM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673948265; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N98G7gBhlDg7GLuI/BcP9R6o1dRlmP5WeSwb14McsEc=; b=ad2oZaDKWJwW0vcxHSMJMSw7uIR1PZufvX5Ve4w9KD1Mv7F9PEu7oh7G+EpnuWP/PzOq9Ez1erp/FK+EpR7hsYgAYATKhla1EBJ8xPWNQD07rQ6hOpDQnMYGSTxE/c0CgZLPKdebG0VWKVEJFcTDA/wjHSkYPkPikWKpX3tVLQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1673948265276561.5125554181091; Tue, 17 Jan 2023 01:37:45 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-342-lJpX0YC2OSe72lcFkVidgg-1; Tue, 17 Jan 2023 04:37:40 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C33838145B3; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77D1914171BE; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 47F5D1946A70; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 65FE919465A3 for ; Tue, 17 Jan 2023 09:37:37 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5BB7339D6D; Tue, 17 Jan 2023 09:37:37 +0000 (UTC) Received: from localhost.localdomain (ovpn-193-112.brq.redhat.com [10.40.193.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED3B87AE5 for ; Tue, 17 Jan 2023 09:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673948264; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=N98G7gBhlDg7GLuI/BcP9R6o1dRlmP5WeSwb14McsEc=; b=QeEWgHHQHcNxpkMBDLq9NPoodNyw44m4GOM8V6cfeS7o4D/Kbu7iYziWCp/BCy1W3YfiT3 E1aH1y47v2qNQf95tjiuL+xkQ8RMGANjceAwfYXs4eTwThGZCtChfvV5hXZGhlcV51QTIT 9aXzRwuxBYr0X4MHlHU+/Hq8YoP++0M= X-MC-Unique: lJpX0YC2OSe72lcFkVidgg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] domain_validate: drop cpu.shares cgroup check Date: Tue, 17 Jan 2023 10:37:26 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673948266974100003 Content-Type: text/plain; charset="utf-8"; x-default="true" This check is done when VM is defined but doesn't take into account what cgroups version is currently used on the host system so it doesn't work correctly. To make proper check at this point we would have to figure out cgroups version while defining a VM but that will still not guarantee that the VM will start correctly in the future as the host may be rebooted with different cgroups version. Signed-off-by: Pavel Hrdina --- src/conf/domain_validate.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 5a9bf20d3f..39d924d4ed 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -1725,16 +1725,6 @@ virDomainDefOSValidate(const virDomainDef *def, static int virDomainDefCputuneValidate(const virDomainDef *def) { - if (def->cputune.shares > 0 && - (def->cputune.shares < VIR_CGROUP_CPU_SHARES_MIN || - def->cputune.shares > VIR_CGROUP_CPU_SHARES_MAX)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Value of cputune 'shares' must be in range [%llu= , %llu]"), - VIR_CGROUP_CPU_SHARES_MIN, - VIR_CGROUP_CPU_SHARES_MAX); - return -1; - } - CPUTUNE_VALIDATE_PERIOD(period); CPUTUNE_VALIDATE_PERIOD(global_period); CPUTUNE_VALIDATE_PERIOD(emulator_period); --=20 2.39.0