From nobody Tue Apr 23 10:21:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1592862223; cv=none; d=zohomail.com; s=zohoarc; b=MBAXhoLb5yTtyWnHniVwQRFnSt/qVNBcykRXKgbES1PysR+E8aRpIn5e3Zv8LUMuE43Pbz3g1M72c5/mxrf2jEHmIr7qvTmy23xG2NXTFKP8OuWJki/IdaszG2nS9OTtZtWY0vc9rt27noB6ufcaK7gDmHcjKB7SnxKKbMEfxk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592862223; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=OOMW6kA8hLDtebShdYQMfdDbR4STBsz/e4OGgY7OMik=; b=lFh8e5ncs+VjdTTGoMnLuDT2QCZgjMMVK/4H0t1OJharHufJ/eSwCNEK0uAwFriv9CzhhTw2tIgb8WrdhcpyGPbagv+31CRh14uxHreuOF8b/NlU3INZzwtWK/aIx0D4JD/rExJmG0NYkKFdEh2VnCBZsEEMYQqNlxO4xu8mdfk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 15928622232421005.5848793989829; Mon, 22 Jun 2020 14:43:43 -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-293-OE8WKQU2OCa7UqQT72qiOg-1; Mon, 22 Jun 2020 17:43:39 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CBCF1005512; Mon, 22 Jun 2020 21:43:34 +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 63ED6768AA; Mon, 22 Jun 2020 21:43:32 +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 D56FA1809547; Mon, 22 Jun 2020 21:43:25 +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 05MLhOpw030146 for ; Mon, 22 Jun 2020 17:43:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id E86FB5C240; Mon, 22 Jun 2020 21:43:24 +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 BA9C55C221 for ; Mon, 22 Jun 2020 21:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592862222; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OOMW6kA8hLDtebShdYQMfdDbR4STBsz/e4OGgY7OMik=; b=Xo34+gBuizuSJgdmR9AFbQCuyGgZiFpJf/1HcZkRMHCV/uTGKaUMaoySleEK/Ibr1JOyvI bm3wJPHjdV9ptBJ6/DIfhTSr48LQwJemtLZ9Zc45PidIcuyZyLhw4lqBaR/hylxuCn1CZ/ QEBXwkudy7ME/ZEv9jFUQRno+vHI5IA= X-MC-Unique: OE8WKQU2OCa7UqQT72qiOg-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: format 'ramfb' attribute for mediated devices Date: Mon, 22 Jun 2020 16:43:21 -0500 Message-Id: <20200622214321.7026-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 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.15 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: Erik Skultety --- src/conf/domain_conf.c | 3 ++ ...stdev-mdev-display-ramfb.x86_64-latest.xml | 44 +++++++++++++++++++ .../hostdev-mdev-display-ramfb.xml | 33 ++++++++++++++ tests/qemuxml2xmltest.c | 1 + 4 files changed, 81 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-ramfb.x86= _64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-ramfb.xml diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e9336fd72d..e942dc41ae 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28312,6 +28312,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 + +
+ + + +
+ + + + + + +