From nobody Mon Feb 9 17:24:03 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=1637226123; cv=none; d=zohomail.com; s=zohoarc; b=dVpKka5bsl21g2n+i59ESOK58hGZ5MMYt2IGF0JLDDRkHdYBZxocVgTCZQfwatnUtqIraL6UxrF0R4Y32kXEqZldGMk1dCoGN8bI32M1/Ucr/+VgAyRZ6m6cLIRKjAgva7VPo5qKPKPpOa6ftDy48OHkPY8mQn3hc57JVxLKVQ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637226123; 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=btwRqlYU1/gozFGZUyfmb1Mfc11c1GTwHfobdb1BEH4=; b=X0UeQVeTcVY5l1kx3KsWo3UV/ATqonaONuAswzVozLzEV5b13JfsSMqjykz6Vj0xBDI7JXPGxWHSTeJhPd0V7OoUKoeFzo+2gS8RLY6aEqLUyShsKGCe7nI5JJgQyC1UEQzB3uWOeu/nHE8Ut/hdcGjP3hnQi0CGj/1stB5OcoM= 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 1637226123806254.32753211659303; Thu, 18 Nov 2021 01:02:03 -0800 (PST) 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-453-2fkDlmKdPRqFEL6x_ClFgw-1; Thu, 18 Nov 2021 04:01:59 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ADF2D425C8; Thu, 18 Nov 2021 09:01:54 +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 8F1445C22B; Thu, 18 Nov 2021 09:01:54 +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 5BFCB4A703; Thu, 18 Nov 2021 09:01:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AI8v2uD015642 for ; Thu, 18 Nov 2021 03:57:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0306510495BC; Thu, 18 Nov 2021 08:57:02 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A0091007625 for ; Thu, 18 Nov 2021 08:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637226122; 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=btwRqlYU1/gozFGZUyfmb1Mfc11c1GTwHfobdb1BEH4=; b=MgMXJpDLg5F+GAOMMOtUKKBwIYf3CbNuPuDgEY25lET9aZgH1MaNy1JdJ5qAsxj/n5rPq6 eE0QVWJJiVpbuV0HdTbIYjv+U5MDktaIPfap4udMYll4kLtxi/PxKjbZe4Vd9Q1X8NK2xE 3UeFyexQBa33f+bbAMLAIOJaLgta+Do= X-MC-Unique: 2fkDlmKdPRqFEL6x_ClFgw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] qemuBuildHostdevMediatedDevProps: Format 'ramfb' only when enabled Date: Thu, 18 Nov 2021 09:56:46 +0100 Message-Id: <036565024d38279393de32be09aab71f1f6932ca.1637225757.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.79 on 10.5.11.16 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: 1637226124521100001 Content-Type: text/plain; charset="utf-8" Before commit 73c352ab8c97d3 which converted the hostdev commandline formatter to JSON the 'ramfb' property was formatted only if it was enabled. The main reason for that is that enabling 'ramfb' switches the device model to 'vfio-pci-nohotplug' which actually has the property, while 'vfio-pci' (used when 'ramfb' is disabled or absent) doesn't have it. Restore the logic to format 'ramfb' only when it's enabled and add a comment that it's deliberate. Fixes: 73c352ab8c97d3 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2024435 Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 713304dd22..d1b0205eb2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5329,6 +5329,8 @@ qemuBuildHostdevMediatedDevProps(const virDomainDef *= def, g_autoptr(virJSONValue) props =3D NULL; virDomainHostdevSubsysMediatedDev *mdevsrc =3D &dev->source.subsys.u.m= dev; g_autofree char *mdevPath =3D NULL; + /* 'ramfb' property must be omitted unless it's to be enabled */ + bool ramfb =3D mdevsrc->ramfb =3D=3D VIR_TRISTATE_SWITCH_ON; mdevPath =3D virMediatedDeviceGetSysfsPath(mdevsrc->uuidstr); @@ -5337,7 +5339,7 @@ qemuBuildHostdevMediatedDevProps(const virDomainDef *= def, "s:id", dev->info->alias, "s:sysfsdev", mdevPath, "S:display", qemuOnOffAuto(mdevsrc->display), - "T:ramfb", mdevsrc->ramfb, + "B:ramfb", ramfb, "p:bootindex", dev->info->bootIndex, NULL) < 0) return NULL; --=20 2.31.1