Skip to contentSkip to conversation

docs: add guidance on configuring CPU models for x86

PATCH Superseded Daniel P. Berrangé 2 participants 2 messages Jun 18, 2018 – Jun 25, 2018 Kbuild

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 docs: add guidance on configuring CPU models for x86

With the recent set of CPU hardware vulnerabilities on x86, it is increasingly difficult to understand which CPU configurations are good to use and what flaws they might be vulnerable to.

This doc attempts to help management applications and administrators in picking sensible CPU configuration on x86 hosts. It outlines which of the named CPU models are good choices, and describes which extra CPU flags should be enabled to allow the guest to mitigate hardware flaws.

---

Changed in v2:

- Use texinfo so it can be pulled into main qemu-doc.texi
- Build as a standalone qemu-cpu-models(7) man page too

 MAINTAINERS               |   1 +
 Makefile                  |   7 +-
 docs/qemu-cpu-models.texi | 465 ++++++++++++++++++++++++++++++++++++++
 qemu-doc.texi             |   5 +
 4 files changed, 477 insertions(+), 1 deletion(-)
 create mode 100644 docs/qemu-cpu-models.texi
MAINTAINERS +1 -0
index 8a94517e9e..ac1357cafa 100644
@@ -285,6 +285,7 @@ S: Maintained
 F: target/i386/
 F: hw/i386/
 F: disas/i386.c
+F: docs/qemu-cpu-models.texi
 T: git git://github.com/ehabkost/qemu.git x86-next
 
 Xtensa
Makefile +6 -1
index e46f2b625a..b232c8b0cb 100644
@@ -359,6 +359,7 @@ DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
 DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
 DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
 DOCS+=docs/qemu-block-drivers.7
+DOCS+=docs/qemu-cpu-models.7
 ifdef CONFIG_VIRTFS
 DOCS+=fsdev/virtfs-proxy-helper.1
 endif
@@ -772,6 +773,7 @@ distclean: clean
 	rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
 	rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
 	rm -f docs/qemu-block-drivers.7
+	rm -f docs/qemu-cpu-models.7
 	for d in $(TARGET_LIST); do \
 	rm -rf $$d || exit 1 ; \
         done
@@ -817,6 +819,7 @@ ifdef CONFIG_POSIX
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
 	$(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
+	$(INSTALL_DATA) docs/qemu-cpu-models.7 "$(DESTDIR)$(mandir)/man7"
 ifneq ($(TOOLS),)
 	$(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1"
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
@@ -959,6 +962,7 @@ fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
 qemu-nbd.8: qemu-nbd.texi qemu-option-trace.texi
 qemu-ga.8: qemu-ga.texi
 docs/qemu-block-drivers.7: docs/qemu-block-drivers.texi
+docs/qemu-cpu-models.7: docs/qemu-cpu-models.texi
 
 html: qemu-doc.html docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
 info: qemu-doc.info docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
@@ -968,7 +972,8 @@ txt: qemu-doc.txt docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
 qemu-doc.html qemu-doc.info qemu-doc.pdf qemu-doc.txt: \
 	qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-option-trace.texi \
 	qemu-monitor.texi qemu-img-cmds.texi qemu-ga.texi \
-	qemu-monitor-info.texi docs/qemu-block-drivers.texi
+	qemu-monitor-info.texi docs/qemu-block-drivers.texi \
+	docs/qemu-cpu-models.texi
 
 docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \
     docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \
docs/qemu-cpu-models.texi new file +465 -0

465 lines not on this page · raw message

qemu-doc.texi +5 -0
index cd05760cac..329689bdd1 100644
@@ -602,6 +602,11 @@ The monitor understands integers expressions for every integer
 argument. You can use register names to get the value of specifics
 CPU registers by prefixing them with @emph{$}.
 
+@node cpu_models
+@section CPU models
+
+@include docs/qemu-cpu-models.texi
+
 @node disk_images
 @section Disk Images
 
Signature · 1 line
2.17.0
#1 lore raw
Quoted 10 lines · Daniel P. Berrangé

With the recent set of CPU hardware vulnerabilities on x86, it is increasingly difficult to understand which CPU configurations are good to use and what flaws they might be vulnerable to.

This doc attempts to help management applications and administrators in picking sensible CPU configuration on x86 hosts. It outlines which of the named CPU models are good choices, and describes which extra CPU flags should be enabled to allow the guest to mitigate hardware flaws.

This fails to build on a RHEL7 host:

# make qemu-doc.html V=1
LC_ALL=C makeinfo --no-split --number-sections -I docs -I . -I . --no-headers --html qemu-doc.texi -o qemu-doc.html
qemu-doc.texi:127: node `QEMU PC System emulator' lacks menu item for `cpu_models' despite being its Up target
qemu-doc.texi:605: node `cpu_models' lacks menu item for `recommendations_cpu_models_x86' despite being its Up target
docs/qemu-cpu-models.texi:40: node `recommendations_cpu_models_x86' lacks menu item for `preferred_cpu_models_intel_x86' despite being its Up target
docs/qemu-cpu-models.texi:40: node `recommendations_cpu_models_x86' lacks menu item for `important_cpu_features_intel_x86' despite being its Up target
docs/qemu-cpu-models.texi:40: node `recommendations_cpu_models_x86' lacks menu item for `preferred_cpu_models_amd_x86' despite being its Up target
docs/qemu-cpu-models.texi:40: node `recommendations_cpu_models_x86' lacks menu item for `important_cpu_features_amd_x86' despite being its Up target
docs/qemu-cpu-models.texi:40: node `recommendations_cpu_models_x86' lacks menu item for `default_cpu_models_x86' despite being its Up target
docs/qemu-cpu-models.texi:40: node `recommendations_cpu_models_x86' lacks menu item for `other_non_recommended_cpu_models_x86' despite being its Up target
qemu-doc.texi:605: node `cpu_models' lacks menu item for `cpu_model_syntax_apps' despite being its Up target
docs/qemu-cpu-models.texi:357: node `cpu_model_syntax_apps' lacks menu item for `cpu_model_syntax_qemu' despite being its Up target
docs/qemu-cpu-models.texi:357: node `cpu_model_syntax_apps' lacks menu item for `cpu_model_syntax_libvirt' despite being its Up target
make: *** [qemu-doc.html] Error 1
# rpm -qf /usr/bin/makeinfo 
texinfo-5.1-5.el7.x86_64
Signature · 1 line
Eduardo