dev-manual: document CPU features and QB_CPU_KVM
PATCH 1/1 dev-manual: document CPU features and QB_CPU_KVM
As suggested in a recent mail thread by Martin Jansa, there are cases in which QEMU under KVM will crash because of CPU feature incompatibilities between compiled binaries and the host CPU under which qemu is run. Although this is hard to fully escape, we should document the issue to help people work around it.
--- documentation/dev-manual/dev-manual-qemu.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
documentation/dev-manual/dev-manual-qemu.xml +22 -0
@@ -343,6 +343,28 @@ </para> </section> + <section id='qemu-kvm-cpu-compatibility'> + <title>QEMU CPU Compatiblity under KVM</title> + + <para> + By default, the QEMU build compiles for and targets core2duo (for + 64-bit x86) and pentium2 (for 32-bit x86). These CPUS are chose to + have a broad range of CPU feature compatibility with many commonly + used CPUs, but in some cases, they still support a CPU feature that + your host CPU does not. Although this is not a problem when QEMU + uses software emulation of the feature, it can be when running with + KVM enabled. Specifically, software compiled with a certain CPU + feature will crash when run on a CPU under KVM that does not support + that feature. If this becomes a problem, you can override QEMU's + runtime CPU setting by changing the <filename>QB_CPU_KVM</filename> + variable in <filename>qemuboot.conf</filename> in the image deploy + directory. This setting specifies a <filename>-cpu</filename> option + passed into QEMU in the <filename>runqemu</filename> script. Running + <filename>qemu -cpu help</filename> will give a list of supported + CPU types available. + </para> + </section> + <section id='qemu-dev-performance'> <title>QEMU Performance</title>
Signature · 1 line
2.11.0
A message that is not in the archive (sent off-list or not yet received): CAFNP8Os_yoYfEFefKnu_zP+yj1CMNoaaL4Rdjb9zfzUA04Tbcw@mail.gmail.com
Quoted 7 lines · Scott Rifenbark
Hi Martin,
See https://yoctoproject.org/docs/2.5/dev-manual/dev-manual.html#qemu-kvm-cpu-compatibility and let me know if this section works. I took your patch and did some rewriting.
Thanks,
Scott
I like your changes; thanks!
Quoted 66 lines · On Fri, Apr 27, 2018 at 10:46 AM, Martin Kelly <[email protected]…
As suggested in a recent mail thread by Martin Jansa, there are cases in which QEMU under KVM will crash because of CPU feature incompatibilities between compiled binaries and the host CPU under which qemu is run. Although this is hard to fully escape, we should document the issue to help people work around it.
Signed-off-by Martin Kelly <[email protected] <mailto:[email protected]>>---
documentation/dev-manual/dev-manual-qemu.xml | 22
++++++++++++++++++++++
1 file changed, 22 insertions(+)diff --git
a/documentation/dev-manual/dev-manual-qemu.xmlb/documentation/dev-manual/dev-manual-qemu.xmlindexf4719ebc3..1870a6a8d100644
---a/documentation/dev-manual/dev-manual-qemu.xml+++b/documentation/dev-manual/dev-manual-qemu.xml@@ -343,6 +343,28 @@
</para>
</section>+ <section id='qemu-kvm-cpu-compatibility'>
+ <title>QEMU CPU Compatiblity under KVM</title> +
+ <para>
+ By default, the QEMU build compiles for and targets core2duo (for
+ 64-bit x86) and pentium2 (for 32-bit x86). These CPUS are chose to
+ have a broad range of CPU feature compatibility with many commonly
+ used CPUs, but in some cases, they still support a CPU feature that
+ your host CPU does not. Although this is not a problem when QEMU
+ uses software emulation of the feature, it can be when running with
+ KVM enabled. Specifically, software compiled with a certain CPU
+ feature will crash when run on a CPU under KVM that does not support
+ that feature. If this becomes a problem, you can override QEMU's
+ runtime CPU setting by changing the <filename>QB_CPU_KVM</filename>
+ variable in <filename>qemuboot.conf</filename> in the image deploy
+ directory. This setting specifies a <filename>-cpu</filename> option
+ passed into QEMU in the <filename>runqemu</filename> script. Running
+ <filename>qemu -cpu help</filename> will give a list of supported
+ CPU types available.
+ </para>
+ </section>
+
<section id='qemu-dev-performance'>
<title>QEMU Performance</title>--
2.11.0