From nobody Sun Feb 8 19:53:35 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=1681913455; cv=none; d=zohomail.com; s=zohoarc; b=BuVcSlhk2rJ4Xdl1AJvTZW1njkIXohhDpq5SIn0W++g1p0/DU9Ss8OCAEZ5YsSmwnudsTbcNjpff7/RYojgkZOKhNcpXH/6khZVlJrzvVueswlYcCgb9kpUmEw1spOkhkQVM6UwrduJqe8MLQ7Yl7ifOWXiN9bEYaoUJ6mrxv64= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681913455; 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=ba1iiy/WYLSfJC3/MPMc3KfxLLWCaxdBd6lofvdb2o4=; b=l4Jnf4T6hxqOJOGofet+9ySoHnCtNr74gXX7IqqFg8RGVhD6amjU+ZP5ORr5d3v87SyESdABnihFBLGDGgmohVWR30cq6iJLwPBi0xgJKuYU0+epvjRCzyVeY3JfcYd0kMJE3Di/C3d0FbxzOSNWfYY95WVpH+J9HTrykIaSW8I= 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 168191345545963.94626334183761; Wed, 19 Apr 2023 07:10:55 -0700 (PDT) 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-211-RE7EDzyCNpucvfQEkfGqRg-1; Wed, 19 Apr 2023 10:10:51 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1703629AA3BF; Wed, 19 Apr 2023 14:10:48 +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 F2F962026D3C; Wed, 19 Apr 2023 14:10:47 +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 DC32819465B1; Wed, 19 Apr 2023 14:10:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CC7BF19465A0 for ; Wed, 19 Apr 2023 14:07:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BEC4940C201F; Wed, 19 Apr 2023 14:07:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7E8040C2064 for ; Wed, 19 Apr 2023 14:07:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 9CDCD85A5A3 for ; Wed, 19 Apr 2023 14:07:21 +0000 (UTC) Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-392-nwj76RlrPuSh981yb2gR4A-1; Wed, 19 Apr 2023 10:07:20 -0400 Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-63b62529864so2871331b3a.2 for ; Wed, 19 Apr 2023 07:07:19 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id r11-20020a65498b000000b004e28be19d1csm10549661pgs.32.2023.04.19.07.07.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 07:07:18 -0700 (PDT) Received: from wheatley.. (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id C3DCDFB3864D for ; Wed, 19 Apr 2023 16:07:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681913454; 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=ba1iiy/WYLSfJC3/MPMc3KfxLLWCaxdBd6lofvdb2o4=; b=UD+uIYzDmexztfssUINmOaB6M4i+LEBfFA3LVEIMavgUy1/qE5ghst++0tHy4T3eVK18N3 EEgcr5xV/RUF4IyHoIzgrxRtVF8q0AY4Q8xucYZXWFl9fBgwvF7BmXD4InsfJWajw013RD ODJzSoUMX2KNCV9TuPFSLxUqSbamfF4= X-MC-Unique: RE7EDzyCNpucvfQEkfGqRg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: nwj76RlrPuSh981yb2gR4A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681913239; x=1684505239; 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=ba1iiy/WYLSfJC3/MPMc3KfxLLWCaxdBd6lofvdb2o4=; b=O41ICnHOukfGpF3pWIE+zUyLGloBzSTlquIDQ6ZsCQV+LP7vzjJ20eL0lzReeUFDgo MSM1W2Ht6kosfUEykW46tFvWRZLy4JIoFptDETPwCeNlShtXczx4BXdOIfoDj4DXuf6L x8kEy26V/4eh/kN3Jb+/G5RMAPf2189Nlex4VYCquhoySjDtYF3o1AOFAEfuyANbzoW8 wE0LlOER5G/1cL00CVGKbxM3BWoGfuY7GpWsspIXLk0wuPgcLN1AFb5jV86s5UbDxe0r ROp/1dLhghYsBBZsyGz7EcTzZaUSKp4PQiZ/QoTalajnE/txAW2HAb1+BRXTyKUNU7Px HkGw== X-Gm-Message-State: AAQBX9d0GUtdBgtHXjCJHTL4iyLIdmiV8z8Ie+ZazM31KONVDEV1GkYd ZQk2iSmoNih3t06+Z7prOtYUhZIZnXSuwLRp+KUtbYhOOgbVonszi0KjcDF4siYgXQLxDFsx+us GBdR+lIj/yAVuGoLsTa9c9DRXHOJ6sZKdim+Z0KnE++FXyIG0ZyEGgSh5lyjDW/OHi0UPbjTHog BCisATkA== X-Received: by 2002:a05:6a00:2303:b0:63a:fae3:9890 with SMTP id h3-20020a056a00230300b0063afae39890mr4251373pfh.24.1681913239157; Wed, 19 Apr 2023 07:07:19 -0700 (PDT) X-Google-Smtp-Source: AKy350Y20MbbBOsvOpSwY/ZyIu3ltFYb5p2EexXOQJ1OU9Y7+r4ttOMWGsEvJDGVdAfYSY/NdDYZcQ== X-Received: by 2002:a05:6a00:2303:b0:63a:fae3:9890 with SMTP id h3-20020a056a00230300b0063afae39890mr4251349pfh.24.1681913238864; Wed, 19 Apr 2023 07:07:18 -0700 (PDT) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH 3/7] qemu: Forbid device attach of existing platform watchdog Date: Wed, 19 Apr 2023 16:07:06 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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.4 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: 1681913456582100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Martin Kletzander --- src/qemu/qemu_driver.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 28e470e4a27e..523a83682ceb 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7315,6 +7315,19 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, return -1; } =20 + if (dev->data.watchdog->model !=3D VIR_DOMAIN_WATCHDOG_MODEL_I6300= ESB) { + size_t i; + + for (i =3D 0; i < vmdef->nwatchdogs; i++) { + if (vmdef->watchdogs[i]->model =3D=3D dev->data.watchdog->= model) { + virReportError(VIR_ERR_OPERATION_INVALID, + _("domain can only have one watchdog wi= th model '%1$s'"), + virDomainWatchdogModelTypeToString(vmde= f->watchdogs[i]->model)); + return -1; + } + } + } + VIR_APPEND_ELEMENT(vmdef->watchdogs, vmdef->nwatchdogs, dev->data.= watchdog); break; =20 --=20 2.40.0