From nobody Wed Oct 22 12:31:19 2025 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=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1759928758; cv=none; d=zohomail.com; s=zohoarc; b=eIo7JDiBtG6aXe2j4e8ikRVyAQ6uJrgaYz6Mu6cVXtK1Q34oauSvyjtl6Vp2sp2giBbv5wP331CJdfi3v715dJXSM3sMB5jFUnO5XMA/JfLq/kTlSddP6idsktk+leOy07mXwNx+q8t5qiKBbdz2XB36yTSLwuTObagbE7j5Mb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759928758; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=55sB9vEHZmpvCvdCCp3CCTNPAB9K6M0ZUkELZ4CFY/E=; b=dYB2vnshY7EC46RTvvswqz8s+JPjIbVAgNLTqeU1ESu6Bwn3KY/MHV+CI4vhdW91N983q1c64qASm9AXmXu4D2hNT5yX9ARZFvhJsQQUn1S5TLubbYJV9gg+CdYXa40wEWBtrlVsVWf0i1RDfs1vbk4Bf/laLBgyrAKroAw18OQ= ARC-Authentication-Results: i=1; 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=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1759928758585303.6797437015442; Wed, 8 Oct 2025 06:05:58 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 98652418C9; Wed, 8 Oct 2025 09:05:57 -0400 (EDT) Received: from [172.19.199.17] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 80D454438B; Wed, 8 Oct 2025 09:04:54 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6BED444310; Wed, 8 Oct 2025 08:54:23 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B0FDD441DC for ; Wed, 8 Oct 2025 08:54:15 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-_sRTAfaYOTmJt84AmJm0ow-1; Wed, 08 Oct 2025 08:54:13 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 011A218002CE for ; Wed, 8 Oct 2025 12:54:13 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.3.236]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4B82319560A2 for ; Wed, 8 Oct 2025 12:54:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759928055; 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=55sB9vEHZmpvCvdCCp3CCTNPAB9K6M0ZUkELZ4CFY/E=; b=AVXPa5JIzMgLAj5Qu4SlU9a6LwfeKJG037opwnEsF/6qWhE5LyUxLuo3uQwZ+lx6unohHA wJR5UhFxT6J7yO3QH3+5q2+R5QKxsFhw2rxF16KfIFzRlfgy4mxc+vgHhGL9lPeNlLSJ8X n2eni/fIpOuiNWWkxlshkT4BxWhfrGI= X-MC-Unique: _sRTAfaYOTmJt84AmJm0ow-1 X-Mimecast-MFC-AGG-ID: _sRTAfaYOTmJt84AmJm0ow_1759928053 To: devel@lists.libvirt.org Subject: [PATCH v2 06/29] qemu_validate: Reflect dependencies of hv-stimer Date: Wed, 8 Oct 2025 14:53:38 +0200 Message-ID: <6dfe7d1e693d36f66c69ecb2dd339bf2e20b43d4.1759927755.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: d5iuv64crNb2MFV4JJ5aT1lyNhzVUjSMg4XewruSK4o_1759928053 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TRUTWDSFYV53ODBPPQHSZ3KDFOPVSZAN X-Message-ID-Hash: TRUTWDSFYV53ODBPPQHSZ3KDFOPVSZAN X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1759928759747116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Per QEMU documentation (docs/system/i386/hyperv.rst): ``hv-stimer`` Enables Hyper-V synthetic timers. Requires: ``hv-vpindex``, ``hv-synic``, ``hv-time`` Reflect these dependencies when validating domain definition. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 279f72f50a..60bf623716 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -114,6 +114,19 @@ qemuValidateDomainDefHypervFeatures(const virDomainDef= *def) =20 CHECK_HV_FEAT(VIR_DOMAIN_HYPERV_SYNIC, VIR_DOMAIN_HYPERV_VPINDEX); =20 + if (def->hyperv_features[VIR_DOMAIN_HYPERV_STIMER] =3D=3D VIR_TRISTATE= _SWITCH_ON) { + if (!virDomainDefHasTimer(def, VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK))= { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("'%1$s' hyperv feature requires '%2$s' timer"= ), + virDomainHypervTypeToString(VIR_DOMAIN_HYPERV_S= TIMER), + virDomainTimerNameTypeToString(VIR_DOMAIN_TIMER= _NAME_HYPERVCLOCK)); + return -1; + } + } + + CHECK_HV_FEAT(VIR_DOMAIN_HYPERV_STIMER, VIR_DOMAIN_HYPERV_VPINDEX); + CHECK_HV_FEAT(VIR_DOMAIN_HYPERV_STIMER, VIR_DOMAIN_HYPERV_SYNIC); + return 0; } =20 --=20 2.49.1