From nobody Tue Feb 10 04:03:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1674485896; cv=none; d=zohomail.com; s=zohoarc; b=hbTfY0EoVORwPXv5Uc4MuOqHZpvrSGl5wqtdi8ECjRrRg/30hAfnHpov8SrYYYNW+xF6vA9pU3svUgW+FiFI5B7pgXH7/5NbAZsihi5Q7K0QxBjF/17js/Js43Vw3Q615c/tlz68NRvsRNFkoxeGQni8KGwxxFtujwgCyUxVojo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674485896; 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=LsxNJU/u2vj9jp6Gu53dPOM1fhNOZzDq6OQCN9x+Npk=; b=WkovdY1Dpi+T8E7hAaPD+tTVnLJEA65wF8iSLV3LuUDNTu15wNUHTpRHI3OUlU2PP3uGjVlJzyImgRZkhDO83GKVjr0wCLps5CYnESSvaz1cSMTJgxbQT0+rGm3Lmm9VyWhgg4KQgWMvyXnSDTN/rxTw6W49HivvlKq+aiT0uts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1674485896599368.43948980662447; Mon, 23 Jan 2023 06:58:16 -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-321-_99HwpfEPF6BH1VWw74QiA-1; Mon, 23 Jan 2023 09:58:09 -0500 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 B07BA2932485; Mon, 23 Jan 2023 14:58:03 +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 E0B6C492C3E; Mon, 23 Jan 2023 14:58:02 +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 BB101194658D; Mon, 23 Jan 2023 14:58:02 +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 20185194658C for ; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B441039D92; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC147175A2 for ; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8A4CF18E0A66 for ; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-501-9RNfPcuyP5eCuiH1-bVEvA-1; Mon, 23 Jan 2023 09:58:00 -0500 Received: by mail-ej1-f69.google.com with SMTP id ds1-20020a170907724100b008775bfcef62so7824022ejc.9 for ; Mon, 23 Jan 2023 06:57:59 -0800 (PST) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id p11-20020a05640243cb00b0049e19136c22sm10942825edc.95.2023.01.23.06.57.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 06:57:58 -0800 (PST) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 9E77FD1AD9BF for ; Mon, 23 Jan 2023 15:57:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674485895; 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=LsxNJU/u2vj9jp6Gu53dPOM1fhNOZzDq6OQCN9x+Npk=; b=d4KMZb2xx+65MpnnKqQhp5ROOWdabwHe0L6+bxY3RVmARvY34SRzWt17V/T5iGKuEZ8hlA dqvkSbu2NpLzlSSWQjdnnfwoFmDKHyJHqAO11WdyrnbHC486E9ldr+01RiN+ZcBgaDMtuT V3FIz0F5GvFl/guJOAT/DdZa2xnJjBI= X-MC-Unique: _99HwpfEPF6BH1VWw74QiA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: 9RNfPcuyP5eCuiH1-bVEvA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=LsxNJU/u2vj9jp6Gu53dPOM1fhNOZzDq6OQCN9x+Npk=; b=midSvLBbU8jEkDYIFtiutr0+fy1NhGJjEbU4pspW+fjrva+AIw4Yz82WjRp93/sgzP qdycDDgTcboovheKQ5gcIwjQJGvLId/FhNDB7QnszKAfPV58nCQ+48+uV2uzaFWN5Nhu V2zXD9fJ0KxXVmG9CnABedwi75fBQqoezb1/W5CN67fBFiMfg1RvsReFEowtdTWT+y+g Pn5VM/x7ZYfV3HurHpFuFiu4hsO3107M+BDaXl+xDOhy+fVWhyPw2f1pT8adZnzpn8x8 SDnw4IsvjOiOXuHEh4OfQtdFB7f2qiDT5Jrqbfe2JhCFaXMX+0EIesRO3s4+NVFeP0SB +NBw== X-Gm-Message-State: AFqh2kouyjghdCoNOPZDSkHtzp4ygTl5i3gw0GKfxsMk7l25cpTObl2G YxwCLRfaz+kU5zv9fd58dQ0bzF0dF677+GtVHXJeEN+PENZybjDU9VQDpf3VCtvKEBcJfnY/2e0 YxEkWl/r/XXfalIFJcHitu5wcG7iX/w2AyuzNSuTrvnFupfQc6JkOH+w1clSOscF7k1UMxmg= X-Received: by 2002:a05:6402:2990:b0:499:8849:5fb8 with SMTP id eq16-20020a056402299000b0049988495fb8mr27873084edb.30.1674485879087; Mon, 23 Jan 2023 06:57:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXunRWTiZ34+DyGQLJmCRwo+JSYoh/5H2E5g8o3jDcTPsBMRYw3Esh72WKltw9KbjWafZdMW8w== X-Received: by 2002:a05:6402:2990:b0:499:8849:5fb8 with SMTP id eq16-20020a056402299000b0049988495fb8mr27873063edb.30.1674485878800; Mon, 23 Jan 2023 06:57:58 -0800 (PST) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH 3/7] Add iTCO watchdog support Date: Mon, 23 Jan 2023 15:57:52 +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.9 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: 1674485898417100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Supported only with q35 machine types. Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_domain_address.c | 1 + src/qemu/qemu_validate.c | 25 +++++++++++++++++++++++++ 5 files changed, 29 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7c61da1d765b..4a5f538a565a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -837,6 +837,7 @@ VIR_ENUM_IMPL(virDomainWatchdogModel, "i6300esb", "ib700", "diag288", + "itco", ); =20 VIR_ENUM_IMPL(virDomainWatchdogAction, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index da785076151d..f125ace9c082 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1745,6 +1745,7 @@ typedef enum { VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB, VIR_DOMAIN_WATCHDOG_MODEL_IB700, VIR_DOMAIN_WATCHDOG_MODEL_DIAG288, + VIR_DOMAIN_WATCHDOG_MODEL_ITCO, =20 VIR_DOMAIN_WATCHDOG_MODEL_LAST } virDomainWatchdogModel; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index a5d0505d9b9b..c051bb7a697d 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -5345,6 +5345,7 @@ i6300esb ib700 diag288 + itco diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index db4e91501d3f..a0168b2f2a2c 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -925,6 +925,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDevic= eDef *dev, =20 case VIR_DOMAIN_WATCHDOG_MODEL_IB700: case VIR_DOMAIN_WATCHDOG_MODEL_DIAG288: + case VIR_DOMAIN_WATCHDOG_MODEL_ITCO: case VIR_DOMAIN_WATCHDOG_MODEL_LAST: return 0; } diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index cb002dee0eb9..03f5a84ffec2 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1191,6 +1191,7 @@ qemuValidateDomainDefTPMs(const virDomainDef *def) static int qemuValidateDomainDefWatchdogs(const virDomainDef *def) { + bool found_itco =3D false; ssize_t i =3D 0; =20 for (i =3D 0; i < def->nwatchdogs; i++) { @@ -1204,6 +1205,15 @@ qemuValidateDomainDefWatchdogs(const virDomainDef *d= ef) "with this QEMU binary")); return -1; } + + if (def->watchdogs[i]->model =3D=3D VIR_DOMAIN_WATCHDOG_MODEL_ITCO= ) { + if (found_itco) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Multiple iTCO watchdogs are not supporte= d")); + return -1; + } + found_itco =3D true; + } } =20 return 0; @@ -2410,6 +2420,21 @@ qemuValidateDomainWatchdogDef(const virDomainWatchdo= gDef *dev, } break; =20 + case VIR_DOMAIN_WATCHDOG_MODEL_ITCO: + if (dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("%s model of watchdog is part of the machine = and cannot have any address set."), + virDomainWatchdogModelTypeToString(dev->model)); + return -1; + } + if (!qemuDomainIsQ35(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("%s model of watchdog is only part of q35 mac= hine"), + virDomainWatchdogModelTypeToString(dev->model)); + return -1; + } + break; + case VIR_DOMAIN_WATCHDOG_MODEL_LAST: default: virReportEnumRangeError(virDomainWatchdogModel, dev->model); --=20 2.39.1