CPU vendor_id handling

Toolybird toolybird at tuta.io
Sun Nov 14 21:52:43 UTC 2021


Hello,

There are times when spoofing the CPU vendor_id is convenient. For example, some x86 guest OS's only run on Intel and refuse to run on an AMD host. Libvirt does support this in the "host-model" case, but it doesn't work for CPU "host-passthrough". On the QEMU command line it's as easy as:

$ qemu-system-x86_64 -cpu host,vendor=GenuineIntel

This works fine in libvirt XML:

<cpu mode='host-model'>
  <model vendor_id='GenuineIntel'/>
</cpu>

This doesn't:

<cpu mode='host-passthrough'>
  <model vendor_id='GenuineIntel'/>
</cpu>

Libvirt silently strips out the model line after saving "virsh edit ..."

Is there any reason why libvirt cannot support this in the host-passthrough case? The status quo means that some folks end up resorting to <qemu:arg value='-cpu'/> hacks which of course causes all sorts of confusion with multiple -cpu lines getting passed to QEMU.

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20211114/457952c4/attachment.htm>


More information about the libvirt-users mailing list