diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-01-29 16:00:29 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-02-02 17:23:12 +0100 |
commit | 0b99c6c703ef6b7350a8e73636f0fce41b84eb72 (patch) | |
tree | f1105acb155a7e46a1ca853f038ac1564be7467c | |
parent | f810bd1a33acce3e6c29b084bd17a78f00ecb802 (diff) |
Add skeleton
-rw-r--r-- | development/qemu-debugging.mdwn | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/development/qemu-debugging.mdwn b/development/qemu-debugging.mdwn new file mode 100644 index 0000000..44a8a7c --- /dev/null +++ b/development/qemu-debugging.mdwn @@ -0,0 +1,63 @@ +# Enable tracing +In virsh + + qemu-monitor-command <vm> --hmp trace-event usb_xhci_* on + qemu-monitor-command <vm> --hmp info trace-events + +output goes to /var/log/libvirt/qemu/<vm>.log by default + +# 9pfs +* Libvirt XML + + <filesystem type='mount' accessmode='mapped'> + <source dir='/cache/ltstest'/> + <target dir='ltstest'/> + </filesystem> + +*mapped* is important. It uses extended attributes so it needs user_xattr on the host filesystem. + +Guests fstab: + + ltstest /ltstest 9p trans=virtio,version=9p2000.L,rw 0 0 + +Do + + cd /ltstest && touch a + +results on the host as extended attributes + + # attr -l a + Attribute "virtfs.uid" has a 4 byte value for a + Attribute "virtfs.gid" has a 4 byte value for a + Attribute "virtfs.mode" has a 4 byte value for a + +For details on 9pfs see http://man.cat-v.org/plan_9/5/intro + +# Hot (un)plug Devices # + +## PCI devices ## + + http://www.linux-kvm.org/page/Hotadd_pci_devices + +## UARTs ## + + http://nairobi-embedded.org/qemu_character_devices.html + +## Sound ## +Devices are not hotpluggable via libvirt +([#1417464](https://bugzilla.redhat.com/show_bug.cgi?id=1417464)) but +via QMP monitor: + + qemu-monitor-command <vm> '{ "execute": "device_add", "arguments": { "driver": "ES1370", "id": "snd1" }}' + qemu-monitor-command <vm> '{ "execute": "device_del", "arguments": { "id": "snd1" }} + + qemu-monitor-command <vm> '{ "execute": "device_add", "arguments": { "driver": "AC97", "id": "snd2" }}' + qemu-monitor-command <vm> '{ "execute": "device_del", "arguments": { "id": "snd2" }} + +[More details on QMP commands](https://git.qemu.org/?p=qemu.git;a=blob;f=qapi-schema.json) + +# Misc # + +* List all devices: + + qemu-system-x86_64 -device ? |