From nobody Sat Apr 20 14:27:35 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=1592937022; cv=none; d=zohomail.com; s=zohoarc; b=NyUJNGpVf06r54ADWAjdcToivGksZkgVngCYNZ2Fw9IKfKGCYPM7iHUoHHrDoBpaT02y3SteBhHAew+dJJjysIHWPRZYeVqTooIG5NdytUgO5DRu25GbYx4l3KU3ZOADv4vvCe/epAyHefYmFpvXqBcXbDS9fN7p8Rh6XSg03Fw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592937022; 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=3E6RBzmFFufZZ1pXH6cHWdpkT4DM1EWJrKL0lktIADA=; b=MaqImvU0DMUqQbNmw1SPPoVQSPKTHPxSCIKQQGThiVV3wWvYcN7NAGItKqo3KpR23OzFgAeDk9KdYc/m0AO6ddEaw3JdvKpZIE6NpijWWTcmbeuErARWnud7JEEGa/eloa7ot0uNw90SnVgGyv/Na361ZXxsNm0X7s/64XBO3U0= 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 159293702215983.46793939053885; Tue, 23 Jun 2020 11:30:22 -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-127-btvwJKvqPvmK6q2I3OMn6Q-1; Tue, 23 Jun 2020 14:30:17 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B8068005AD; Tue, 23 Jun 2020 18:30:10 +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 82D22619C0; Tue, 23 Jun 2020 18:30:07 +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 E7605833D0; Tue, 23 Jun 2020 18:30:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05NIU00L008937 for ; Tue, 23 Jun 2020 14:30:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 43EBD5C290; Tue, 23 Jun 2020 18:30:00 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-114-170.phx2.redhat.com [10.3.114.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E2BE65C5FA; Tue, 23 Jun 2020 18:29:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592937020; 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=3E6RBzmFFufZZ1pXH6cHWdpkT4DM1EWJrKL0lktIADA=; b=Zx4A4Ku+DfuuQz3XN5neAoLVumfU4c1y2LySvzb0qHBs6AUR4VmMXWkz4ElVt7BmVKkEY6 K1f+8ChcUgCm+V3bTl6Z4FL4gRWBjTEPOcGRqedWQ+wrjbEXmvRgSn78B4JD4wePBGQYUf 0XmTjW1CO5erLXumcuJa8wne3v0xuMA= X-MC-Unique: btvwJKvqPvmK6q2I3OMn6Q-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH v2] qemu: format 'ramfb' attribute for mediated devices Date: Tue, 23 Jun 2020 13:29:56 -0500 Message-Id: <20200623182956.32678-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: eskultet@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.12 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) Content-Type: text/plain; charset="utf-8" It's possible to use ramfb as the boot display of an assigned vgpu device. This was introduced in 4b95738c, but unfortunately the attribute was not formatted into the xml output for such a device. This patch fixes that oversight and adds a xml2xml test to verify proper behavior. https://bugzilla.redhat.com/show_bug.cgi?id=3D1847791 Signed-off-by: Jonathon Jongsma Reviewed-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- Changes in v2: - drop unnecessary input xml file for test src/conf/domain_conf.c | 3 ++ ...stdev-mdev-display-ramfb.x86_64-latest.xml | 44 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 3 files changed, 48 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-ramfb.x86= _64-latest.xml diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e0855a2476..da02255142 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28343,6 +28343,9 @@ virDomainHostdevDefFormat(virBufferPtr buf, if (mdevsrc->display !=3D VIR_TRISTATE_SWITCH_ABSENT) virBufferAsprintf(buf, " display=3D'%s'", virTristateSwitchTypeToString(mdevsrc->d= isplay)); + if (mdevsrc->ramfb !=3D VIR_TRISTATE_SWITCH_ABSENT) + virBufferAsprintf(buf, " ramfb=3D'%s'", + virTristateSwitchTypeToString(mdevsrc->d= isplay)); } =20 } diff --git a/tests/qemuxml2xmloutdata/hostdev-mdev-display-ramfb.x86_64-lat= est.xml b/tests/qemuxml2xmloutdata/hostdev-mdev-display-ramfb.x86_64-latest= .xml new file mode 100644 index 0000000000..c134400486 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hostdev-mdev-display-ramfb.x86_64-latest.xml @@ -0,0 +1,44 @@ + + QEMUGuest2 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-i386 + +
+ + + +
+ + + + + + +