From nobody Mon Feb 9 04:46:10 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=1647961538; cv=none; d=zohomail.com; s=zohoarc; b=dSqhPaO76uI6w+pLvAI5CN51dwjmuvpZFM0BWSpC5VrtprrWQI6bENp1m49ahyGYaPyrQQp2cnM9pCmf2pDPD4mmJYsjDmBBJ6XcKHvlej22IAjNCX9xWycCbWHfMPSbRFxO1iB+7TMRkc/0zMJsu/bcHbE3JgtXCE53aMhP/no= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647961538; 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=0OJMcYLwvI43p5o5u5ZTbshsXwzwqWw4vIItVFqn288=; b=FrJAUaNXre5QetH1u20IsYoRV1tZHHFVi+kh2p2d4wqdB+Gy9hgnFUf96GScllEj3otZPx2u5/tjg8rGba4q83zHUJHETcwcP7wZepSt3u/YFCZ445aPaDcIvEF+JJdOL2Hi0HhOQsXz2aVe6sDVsFPEQGDUgYbVrXM9WYS0X6c= 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 1647961538780467.6590287911972; Tue, 22 Mar 2022 08:05:38 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-110-S-nhtkTRPV2_HDyT8_65Bw-1; Tue, 22 Mar 2022 11:05:35 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3FA7983397D; Tue, 22 Mar 2022 15:05:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B43756F7C3; Tue, 22 Mar 2022 15:05:27 +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 403021949762; Tue, 22 Mar 2022 15:05:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B601B1940360 for ; Tue, 22 Mar 2022 15:05:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A41D2401E80; Tue, 22 Mar 2022 15:05:21 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C5A8401052 for ; Tue, 22 Mar 2022 15:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647961537; 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=0OJMcYLwvI43p5o5u5ZTbshsXwzwqWw4vIItVFqn288=; b=M2jloDldJliPeDv56PYrZJPRm1js2bvvNKTzZCPNBRBHQAr8//dXOx/SojndUt5cvaGuAM ja9cQtn+6UXzdFYuG/GvjRzJNmghRTwSgHyYAh8/0rn9SN5a39QTOo9BFMmU+S9vOsoiGt 92ws1yAy7CVHV//UA+69nMd7+5Hq0/o= X-MC-Unique: S-nhtkTRPV2_HDyT8_65Bw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/4] qemu_validate: Validate prealloc threads against qemuCpas Date: Tue, 22 Mar 2022 16:05:16 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1647961539069100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Only fairly new QEMUs are capable of user provided number of preallocation threads. Validate this assumption. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f27e480696..e0708b8a76 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -739,6 +739,13 @@ qemuValidateDomainDefMemory(const virDomainDef *def, return -1; } =20 + if (mem->allocation_threads > 0 && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREAD= S)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("preallocation threads are unsupported with this = QEMU")); + return -1; + } + if (mem->source =3D=3D VIR_DOMAIN_MEMORY_SOURCE_ANONYMOUS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("hugepages are not allowed with anonymous " --=20 2.34.1