q35: Improve sample configuration files
PATCH v3 1/1 q35: Improve sample configuration files
Instead of having a single sample configuration file, we now have several:
* q35-emulated.cfg documents the default devices QEMU adds to a q35 guest and the additional devices that are pretty much guaranteed to be present in a physical q35-based machine;
* q35-virtio-graphical.cfg can be used to start a fully-featured (USB, graphical console, audio, etc.) guest that uses VirtIO instead of emulated devices;
* q35-virtio-serial.cfg is similar but has a minimal set of devices and uses the serial console.
All configuration files are fully commented and neatly organized.
---
Changes since [v2]
* Address review comments:
- use -nodefaults in q35-emulated.cfg too;
- add explicit VGA and Ethernet.
* Improvements:
- use virtconsole and virtio-serial instead of isa-serial in q35-virtio-serial.cfg.
* Possibily controversial:
- get rid of q35-virtio-common.cfg and add the PCIe Root Ports back into q35-virtio-*.cfg: while this leads to having some duplicated content, I feel like the sample configurations are much more useful when they can stand entirely on their own, especially now that they start with a detailed hardware listing.
* Cosmetic stuff:
- hardware listing looks like the output of lspci;
- section names match what's used in the hardware listing so it's faster to jump to the section;
- PCI addresses also match the output of lspci;
- PCI Express is used instead of PCIe.
Changes since [v1]
* Address review comments:
- improve the existing configuration file instead of removing it;
- split off the common part for VirtIO guests;
- plug all ioh3420 devices in a single slot;
- use slot 1c for ioh3420 devices;
- remove useless USB keyboard.
* Improve usage description:
- make sure the OS disk actually uses the VirtIO SCSI controller, as intended, rather than the built-in SATA one;
- provide a command line for running live CDs.
* Document more devices:
- the video card is added by default;
- so is the Ethernet adapter, apparently.
[v1] http://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg06342.html
[v2] http://lists.nongnu.org/archive/html/qemu-devel/2017-02/msg00184.html
docs/q35-chipset.cfg | 152 --------------------------- docs/q35-emulated.cfg | 234 ++++++++++++++++++++++++++++++++++++++++++ docs/q35-virtio-graphical.cfg | 203 ++++++++++++++++++++++++++++++++++++ docs/q35-virtio-serial.cfg | 178 ++++++++++++++++++++++++++++++++ 4 files changed, 615 insertions(+), 152 deletions(-) delete mode 100644 docs/q35-chipset.cfg create mode 100644 docs/q35-emulated.cfg create mode 100644 docs/q35-virtio-graphical.cfg create mode 100644 docs/q35-virtio-serial.cfg
docs/q35-chipset.cfg deleted +0 -152
@@ -1,152 +0,0 @@ -################################################################ -# -# qemu -M q35 creates a bare machine with just the very essential -# chipset devices being present: -# -# 00.0 - Host bridge -# 1f.0 - ISA bridge / LPC -# 1f.2 - SATA (AHCI) controller -# 1f.3 - SMBus controller -# -# This config file documents the other devices and how they are -# created. You can simply use "-readconfig $thisfile" to create -# them all. Here is a overview: -# -# 19.0 - Ethernet controller (not created, our e1000 emulation -# doesn't emulate the ich9 device). -# 1a.* - USB Controller #2 (ehci + uhci companions) -# 1b.0 - HD Audio Controller -# 1c.* - PCI Express Ports -# 1d.* - USB Controller #1 (ehci + uhci companions, -# "qemu -M q35 -usb" creates these too) -# 1e.0 - PCI Bridge -# - -[device "ich9-ehci-2"] - driver = "ich9-usb-ehci2" - multifunction = "on" - bus = "pcie.0" - addr = "1a.7" - -[device "ich9-uhci-4"] - driver = "ich9-usb-uhci4" - multifunction = "on" - bus = "pcie.0" - addr = "1a.0" - masterbus = "ich9-ehci-2.0" - firstport = "0" - -[device "ich9-uhci-5"] - driver = "ich9-usb-uhci5" - multifunction = "on" - bus = "pcie.0" - addr = "1a.1" - masterbus = "ich9-ehci-2.0" - firstport = "2" - -[device "ich9-uhci-6"] - driver = "ich9-usb-uhci6" - multifunction = "on" - bus = "pcie.0" - addr = "1a.2" - masterbus = "ich9-ehci-2.0" - firstport = "4" - - -[device "ich9-hda-audio"] - driver = "ich9-intel-hda" - bus = "pcie.0" - addr = "1b.0" - - -[device "ich9-pcie-port-1"] - driver = "ioh3420" - multifunction = "on" - bus = "pcie.0" - addr = "1c.0" - port = "1" - chassis = "1" - -[device "ich9-pcie-port-2"] - driver = "ioh3420" - multifunction = "on" - bus = "pcie.0" - addr = "1c.1" - port = "2" - chassis = "2" - -[device "ich9-pcie-port-3"] - driver = "ioh3420" - multifunction = "on" - bus = "pcie.0" - addr = "1c.2" - port = "3" - chassis = "3" - -[device "ich9-pcie-port-4"] - driver = "ioh3420" - multifunction = "on" - bus = "pcie.0" - addr = "1c.3" - port = "4" - chassis = "4" - -## -# Example PCIe switch with two downstream ports -# -#[device "pcie-switch-upstream-port-1"] -# driver = "x3130-upstream" -# bus = "ich9-pcie-port-4" -# addr = "00.0" -# -#[device "pcie-switch-downstream-port-1-1"] -# driver = "xio3130-downstream" -# multifunction = "on" -# bus = "pcie-switch-upstream-port-1" -# addr = "00.0" -# port = "1" -# chassis = "5" -# -#[device "pcie-switch-downstream-port-1-2"] -# driver = "xio3130-downstream" -# multifunction = "on" -# bus = "pcie-switch-upstream-port-1" -# addr = "00.1" -# port = "1" -# chassis = "6" - -[device "ich9-ehci-1"] - driver = "ich9-usb-ehci1" - multifunction = "on" - bus = "pcie.0" - addr = "1d.7" - -[device "ich9-uhci-1"] - driver = "ich9-usb-uhci1" - multifunction = "on" - bus = "pcie.0" - addr = "1d.0" - masterbus = "ich9-ehci-1.0" - firstport = "0" - -[device "ich9-uhci-2"] - driver = "ich9-usb-uhci2" - multifunction = "on" - bus = "pcie.0" - addr = "1d.1" - masterbus = "ich9-ehci-1.0" - firstport = "2" - -[device "ich9-uhci-3"] - driver = "ich9-usb-uhci3" - multifunction = "on" - bus = "pcie.0" - addr = "1d.2" - masterbus = "ich9-ehci-1.0" - firstport = "4" - - -[device "ich9-pci-bridge"] - driver = "i82801b11-bridge" - bus = "pcie.0" - addr = "1e.0"
docs/q35-emulated.cfg new file +234 -0
234 lines not on this page · raw message
docs/q35-virtio-graphical.cfg new file +203 -0
203 lines not on this page · raw message
docs/q35-virtio-serial.cfg new file +178 -0
178 lines not on this page · raw message
Signature · 1 line
2.7.4
Hi,
docs/q35-emulated.cfg line 217
Quoted 8 lines
+++ b/docs/q35-emulated.cfg
docs/q35-emulated.cfg new file +5
-0+# 00:01.0 VGA compatible controller +[device "video"] + driver = "VGA" + bus = "pcie.0" + addr = "02.0"
Here is a address mismatch ;)
Otherwise looks all fine to me.
cheers,
Gerd
Quoted 4 lines · Gerd Hoffmann
Quoted 4 lines
+++ b/docs/q35-emulated.cfg
+# 00:01.0 VGA compatible controller
Quoted 8 lines
Quoted 4 lines
+[device "video"]
+ driver = "VGA"
+ bus = "pcie.0"
+ addr = "02.0"
Here is a address mismatch ;)
Otherwise looks all fine to me.
Good catch! I'll fix it and wait for input on the questions raised by Marcel before sending out a v4 :)
--
Andrea Bolognani / Red Hat / Virtualization
Quoted 10 lines · Gerd Hoffmann
Quoted 8 lines
+++ b/docs/q35-emulated.cfg
+# 00:01.0 VGA compatible controller
+[device "video"]
+ driver = "VGA"
+ bus = "pcie.0"
+ addr = "02.0"
Here is a address mismatch ;)
Oh, wait, I realize where the mismatch comes from now:
on real hardware (my laptop) the video card is plugged into 00:02.0, but the default one you get when you don't pass -nodefault to QEMU is plugged into 00:01.0!
I think we should use 00:02.0, do you agree? I would also use the same slot in q35-virtio-graphical.cfg.
--
Andrea Bolognani / Red Hat / Virtualization
Quoted 12 lines · Andrea Bolognani
Quoted 10 lines · Gerd Hoffmann
docs/q35-emulated.cfg line 217
Quoted 8 lines
+++ b/docs/q35-emulated.cfg
docs/q35-emulated.cfg new file +5
-0+# 00:01.0 VGA compatible controller +[device "video"] + driver = "VGA" + bus = "pcie.0" + addr = "02.0"Here is a address mismatch ;)
Quoted 4 lines
Oh, wait, I realize where the mismatch comes from now:
on real hardware (my laptop) the video card is plugged into 00:02.0, but the default one you get when you don't pass -nodefault to QEMU is plugged into 00:01.0!
And that depends on the chipset. On q35 it is 01.0, whereas on pc it is 02.0 because 01.0 is occupied by the piix southbridge.
Quoted 2 lines
I think we should use 00:02.0, do you agree? I would also use the same slot in q35-virtio-graphical.cfg.
Matter of taste really. I have some guests where the vga is at 04.0, works fine too. But being consistent across all configurations makes sense.
cheers,
Gerd
Quoted 8 lines · Gerd Hoffmann
Quoted 4 lines
Oh, wait, I realize where the mismatch comes from now:
on real hardware (my laptop) the video card is plugged into 00:02.0, but the default one you get when you don't pass -nodefault to QEMU is plugged into 00:01.0!
And that depends on the chipset. On q35 it is 01.0, whereas on pc it is 02.0 because 01.0 is occupied by the piix southbridge.
Quoted 6 lines
Quoted 2 lines
I think we should use 00:02.0, do you agree? I would also use the same slot in q35-virtio-graphical.cfg.
Matter of taste really. I have some guests where the vga is at 04.0, works fine too. But being consistent across all configurations makes sense.
Cool, I will stick to 00:01.0 across the board then.
--
Andrea Bolognani / Red Hat / Virtualization