[libvirt PATCH v2] qemu: format 'ramfb' attribute for mediated devices

Ján Tomko jtomko at redhat.com
Tue Jun 23 21:24:47 UTC 2020


On a Tuesday in 2020, Jonathon Jongsma wrote:
>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=1847791
>
>Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
>---
>
>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 != VIR_TRISTATE_SWITCH_ABSENT)
>                 virBufferAsprintf(buf, " display='%s'",
>                                   virTristateSwitchTypeToString(mdevsrc->display));
>+            if (mdevsrc->ramfb != VIR_TRISTATE_SWITCH_ABSENT)
>+                virBufferAsprintf(buf, " ramfb='%s'",

>+                                  virTristateSwitchTypeToString(mdevsrc->display));

s/display/ramfb/

>         }
>
>     }

Reviewed-by: Ján Tomko <jtomko at redhat.com>

and pushed.

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200623/2b6b16bf/attachment-0001.sig>


More information about the libvir-list mailing list