From nobody Tue Apr 30 22:19:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1598969755; cv=none; d=zohomail.com; s=zohoarc; b=ekTQuTEXSZM2ElP6YunsVpM7utTRIMsiWMwuGh9eJPZfa7bPiQmjnMIe4pcgeNAgIlx6VT96I5U+RB2A3v4XlH0DRCDRZhWca6lRwDCrELwGOJ9QX/uH2N8tYP8PEfwvoNPwfeV7GbK34MK9Z+sTiwrxCTSX6xq1brQs9qBX+Xw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598969755; 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=4473WoKmvQMuLtcro6lGwpKZbGdf3oatce8ghDtzEtg=; b=YBQdE3uM4GpLIN7S04rCQO6URFJ8ZBdOp9VT/0mj9SgmtbJnv+eylmQ5euCIn+Cb2Ud8e0XyaPIBzgsJfZN/S9sZqS9lHF0jr5UG1TtRrX2jt38wjGuR5B/uPei3tp6dcourk/lzlj44HCNgS18SsgK2o+HcdYRTACq9g44B3Ms= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1598969755634483.7316396002336; Tue, 1 Sep 2020 07:15:55 -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-42-IKN1hwuhOSCy90LgRMJzqA-1; Tue, 01 Sep 2020 10:15:47 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5842D10ABDAF; Tue, 1 Sep 2020 14:15:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3166319C66; Tue, 1 Sep 2020 14:15:39 +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 B5C23181A86E; Tue, 1 Sep 2020 14:15:36 +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 081EFZUd014689 for ; Tue, 1 Sep 2020 10:15:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id A1A1178B4A; Tue, 1 Sep 2020 14:15:35 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-13-163.pek2.redhat.com [10.72.13.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10AAB78B59; Tue, 1 Sep 2020 14:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598969750; 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=4473WoKmvQMuLtcro6lGwpKZbGdf3oatce8ghDtzEtg=; b=YIz6qP0kjJpP1s6RYpMy4rvpOZMvkuJtfpjzi6y/fJprm/uowbs2vZevymqwChH6uDuqoE 4BHLWkCAnMzqv1tu8rFH+KZEWHAT8zRk5Zmje5h/PgFwh/kQkaIXi40EarIQ89sITp50vL 5tbiW0HHHzmFYQeUrUfgLT2BhjHAlso= X-MC-Unique: IKN1hwuhOSCy90LgRMJzqA-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH v2] qemu_validate: Only allow none address for watchdog ib700 Date: Tue, 1 Sep 2020 22:15:27 +0800 Message-Id: <20200901141527.4177429-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: jtomko@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.23 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. Fixes: 8a54cc1d08a333283c9cfc3fd7788be2642ca71a Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1509908 Signed-off-by: Han Han Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 488f258d00..402f81a3cd 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1637,10 +1637,9 @@ qemuValidateDomainWatchdogDef(const virDomainWatchdo= gDef *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"= ), + _("%s model of watchdog does not support config= uring the address"), virDomainWatchdogModelTypeToString(dev->model)); return -1; } --=20 2.28.0