From nobody Sun May 19 01:26:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1598005180; cv=none; d=zohomail.com; s=zohoarc; b=T6vSWnXPgGRnWnNU2LpcQbdWR/u0jjO2Ahl66zIgtmpUrO5DVMiO9ijQ5T4kkoWO2OxS6zWwKoOygUZzGKDAFArnT4yUQlJgEQ9CnPdwVBg2wd8eB1KDz9g7HtNPTX7s3m/T26pxZPwRo9Q0tlSZyqHwRBY6kviXxhu04mQ2JSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598005180; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=FhNG+GBEUUWtwbKENfD21L1uRQo0oJ5PjwI051+rclI=; b=A8wvOqRK4Ylac0QiLZuQDAP/UzHuo7dwvDRYHyFNnzQH6Xbf+6imnr2JFiZZuKKSohWLwnHJBZZaTDyKTqYH5zMHTrso80Hxte9LzI0qmlptQwQ3nQeyTOfUkEJGzhUcinKknm3qNvKapOq0ZtajyVkUDzWhy8BO98f55DrJBYM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1598005180264364.10873451370753; Fri, 21 Aug 2020 03:19:40 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-411-1L4EhuBHPA-k6iJ0HKfJZQ-1; Fri, 21 Aug 2020 06:19:37 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B28E381CBE5; Fri, 21 Aug 2020 10:19:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E37C6101E247; Fri, 21 Aug 2020 10:19:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BEC7C662B0; Fri, 21 Aug 2020 10:19:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 07LAJIYD007318 for ; Fri, 21 Aug 2020 06:19:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 814C77E31B; Fri, 21 Aug 2020 10:19:18 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-13-17.pek2.redhat.com [10.72.13.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id F28D57E319; Fri, 21 Aug 2020 10:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005179; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FhNG+GBEUUWtwbKENfD21L1uRQo0oJ5PjwI051+rclI=; b=EucZGzfq2naKTUMOPcSg+pkVgxJZR2Kp00wVQovXlCNXN4cDJMEeOecWN6T8oAojTefXg+ 2IPErHXTCcerVYg9eGCP35pysrUQSSmr9gCjraYys2B3C+1XRJwZs8nv0u1oSJmFFZm6h5 L1VhCuvPi1X/g0MCaJ0WQPoFEp4Dh2E= X-MC-Unique: 1L4EhuBHPA-k6iJ0HKfJZQ-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH] qemu_validate: Only allow none address for watchdog ib700 Date: Fri, 21 Aug 2020 18:19:10 +0800 Message-Id: <20200821101910.3934699-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: abologna@redhat.com, Han Han X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Since QEMU 1.5.3, the ib700 watchdog device has no options for address, and not address in device tree: $ /usr/libexec/qemu-kvm -version QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-175.el7), Copyright (c) 2003-20= 08 Fabrice Bellard $ /usr/libexec/qemu-kvm -device ib700,\? $ virsh qemu-monitor-command seabios --hmp info qtree|grep ib700 -A 2 dev: ib700, id "watchdog0" dev: isa-serial, id "serial0" index =3D 0 So only allow it to use none address. https://bugzilla.redhat.com/show_bug.cgi?id=3D1509908 Signed-off-by: Han Han Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 488f258d00..0e5ca81ab4 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1637,8 +1637,7 @@ qemuValidateDomainWatchdogDef(const virDomainWatchdog= Def *dev, break; =20 case VIR_DOMAIN_WATCHDOG_MODEL_IB700: - if (dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && - dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA) { + if (dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("%s model of watchdog can go only on ISA bus"= ), virDomainWatchdogModelTypeToString(dev->model)); --=20 2.27.0