From nobody Mon Feb 9 01:16:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633957463; cv=none; d=zohomail.com; s=zohoarc; b=GUh/kAniVZg5eYdhLZehxtThyJ2Av97/3mGl+cM1VMJrTpsc+lGbC7lxWpfHcfR+LCfsGW//4jsWutgsXGVEellUvqRR2qDxMiIOH55t9NOlDVK1iBMTpoAuqjXt9/SG2CR4UHZ2nZtVDqKieE4n39Sq3877xItnYH+RPpev8Wg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633957463; 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=piEFK0RwHV5oK9mbOCkIUVBoDEfQQ++Pf4tYnHBxhn8=; b=STAq+yajSLNuELbt46/KJ2aA4QKW9pcC6ob2VQknFlNERkRHpJWui7jjuy9ZlseqKLVnJhpIr15FiQmzyKHT4B1KR74sHbuid2S803z7u4MZ1bB5bFeU7ZUVUP6sA13mJIIVw8NOzr1Ryho6lmLG0iqpRCd/rU9ByKfedV9Mm5o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633957463653640.5939811879596; Mon, 11 Oct 2021 06:04:23 -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-125-PymphFwHNpa8VkYtrmP7dA-1; Mon, 11 Oct 2021 09:02:32 -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 25D3BEC1D0; Mon, 11 Oct 2021 13:02:22 +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 8D739380; Mon, 11 Oct 2021 13:02:20 +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 96F614EA29; Mon, 11 Oct 2021 13:02:18 +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 19BD2H0h024814 for ; Mon, 11 Oct 2021 09:02:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0DC275F4E5; Mon, 11 Oct 2021 13:02:17 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D78C5F4E4 for ; Mon, 11 Oct 2021 13:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633957462; 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=piEFK0RwHV5oK9mbOCkIUVBoDEfQQ++Pf4tYnHBxhn8=; b=G24J1ylDzmOyd19iStRp3WDAFPhqMe+5PvsmzWje6NuHqRanVDq9/nEIWHQP6tgrA68BT6 CqoVnwd9eAnXcaYuBNukNvHDvduFUa3YpGrVC02C6zU/NP08kLAg+AivsfxFu+gKTE7NiS FLztTcJtghZgZT+aZVgZ0htU+kckXGs= X-MC-Unique: PymphFwHNpa8VkYtrmP7dA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 2/7] qemuValidateDomainDefPCIFeature: Fix validation logic Date: Mon, 11 Oct 2021 15:02:07 +0200 Message-Id: <744cbb1f8c964870ef04fe84b03450a578989013.1633957206.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633957474498100003 Content-Type: text/plain; charset="utf-8" The error that "acpi-bridge-hotplug" is not supported would be triggered only if both the ICH9 and PIIX don't support the capability and the machine is q35. This makes no sense. We want to check that the appropriate platform supports the appropriate feature. Fixes: 7300ccc9b3e Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index e530368cb3..7eb9a37870 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -179,9 +179,6 @@ qemuValidateDomainDefPCIFeature(const virDomainDef *def, int feature) { size_t i; - bool q35Dom =3D qemuDomainIsQ35(def); - bool q35cap =3D q35Dom && virQEMUCapsGet(qemuCaps, - QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRI= DGE); if (def->features[feature] =3D=3D VIR_TRISTATE_SWITCH_ABSENT) return 0; @@ -198,9 +195,9 @@ qemuValidateDomainDefPCIFeature(const virDomainDef *def, virArchToString(def->os.arch)); return -1; } - if (!q35cap && - !virQEMUCapsGet(qemuCaps, - QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE)) { + + if ((qemuDomainIsQ35(def) && !virQEMUCapsGet(qemuCaps, QEM= U_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE)) || + (!qemuDomainIsQ35(def) && !virQEMUCapsGet(qemuCaps, QE= MU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("acpi-bridge-hotplug is not available= with this QEMU binary")); return -1; --=20 2.31.1