You are not logged in.

#1 2022-05-14 19:33:40

ltsdw
Member
Registered: 2020-04-20
Posts: 76

[Solved] QEMU: there is no device "hostdev0" defined

as it was reported here qemu-7.0 there is no device "hostdev0" defined:

Thomas Huth wrote:

Using <qemu:arg value="-set"/> to access a "hostdev0" id that is not specified in the commandline is certainly wrong, and definitely not a QEMU problem. Thus I'm closing this ticket now.

but it's how the wiki says: ArchWiki Intel GVT-g.

so how do I fix it? what would be the correct version of this:

  <qemu:commandline>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-igd-opregion=on"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.xres=1366"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.yres=768"/>
  </qemu:commandline>

tried this but virt-manager will say that "the display isn't ready yet" or something like that.

  <qemu:override>
    <qemu:device alias="hostdev0">
      <qemu:frontend>
        <qemu:property name="x-igd-opregion" type="bool" value="true"/>
      </qemu:frontend>
    </qemu:device>
  </qemu:override>

also trying set the xres and yres in this style will say that both expect uint64 (I specified type="string", because writing type="uint64" gives me a invalid syntax, as I don't know what are the valid types).

I'll keep the downgraded version of qemu until I figure this one.

Last edited by ltsdw (2022-05-16 01:42:33)

Offline

#2 2022-05-16 01:37:45

ltsdw
Member
Registered: 2020-04-20
Posts: 76

Re: [Solved] QEMU: there is no device "hostdev0" defined

someone will need to change the wiki, those syntax isn't working anymore.

so I followed the libvirt's documentation: Overriding properties of QEMU devices.

the valid types for numbers are signed and unsigned.

here's my config now:

  <qemu:override>
    <qemu:device alias="hostdev0">
      <qemu:frontend>
        <qemu:property name="x-igd-opregion" type="bool" value="true"/>
        <qemu:property name="driver" type="string" value="vfio-pci-nohotplug"/>
        <qemu:property name="xres" type="unsigned" value="1366"/>
        <qemu:property name="yres" type="unsigned" value="768"/>
        <qemu:property name="ramfb" type="bool" value="true"/>
      </qemu:frontend>
    </qemu:device>
  </qemu:override>

Offline

Board footer

Powered by FluxBB