image works in native but not in vm when cpu mode='host-passthrough' is set

Martin Kletzander mkletzan at redhat.com
Thu Nov 19 21:23:14 UTC 2020


On Tue, Nov 17, 2020 at 11:32:29AM +0100, daggs wrote:
>Greetings.
>
>I have an image I've created with a bunch of chost flags which works on my machine when it comes to native boot.
>if I take that same image into a vm managed via libvirt, I get kernel panic.
>I'd assume that something is missing from my vm config, question is what and what I can do about it?
>here is the flags part of lscpu in native and vm: https://dpaste.com/3TR8QJ5G8
>and the vm's xml: https://dpaste.com/984JX4LUQ
>if I build the image with the default flags (march=x86-64), the vm boots well.
>my new chost is -O2 -pipe -march=skylake -mabm -mno-adx -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-f16c -mno-fma -mno-xsave -mno-xsavec -mno-xsaveopt -mno-xsaves -mno-sgx
>the cpu is Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
>

Not sure, but there might be some flags that are not passed through even with
host-passthrough.  Virtualisation ones are definitely one of those that need to
be enabled on top of host-passthrough.  The easiest thing to check that I can
think of would be booting some live distro and checking the flags in
/proc/cpuinfo and how are they different from your host.

>thoughts?
>
>Thanks,
>
>Dagg.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20201119/8160297e/attachment.sig>


More information about the libvirt-users mailing list