qemu code reading: where qemu parse the -drive parameter
qemu code reading: how one block image is added to system

The list "drivers" contains all the images attached to the system.

During the bootup, it will parse the -drive parameter. Base on the given
file name to the image file, proper BlockDriver will be matched.

The BlockDriver is linked in "bdrv_drivers" list.
userspace test code: add reference link for tun usage
userspace test code: add the difference between tap and tun
userspace test code: user can specify the name and type of tun/tap
userspace code test: make a tun device persist or non-persist

ioctl(tun_fd, TUNSETPERSIST, 1);  will set the tun device persist.

ioctl(tun_fd, TUNSETPERSIST, 0);  will set the tun device non-persist.
userspace code test: default to tap interface

TAP interface has ethernet header, which is more general.
qemu code reading: savevm_handlers

Each device has an entry in savevm_handlers list.

Several important element:
    save_live_setup
    save_live_pending
    save_live_iterate
    save_live_complete
qemu code reading: blkdebug usage and call pass
qemu code reading: two levels of qemu image file

When reading a -drive parameter, it means two levels concept.
1. protocol
2. format

Procotol could be blkdebug, http, https, file, host_device.
Format could be blkdebug, qcow2, raw, vmdk.

For an opened image, it has two BlockDriverState sturcture to represent these
two levels concept.

Take a look at qcow2.txt for example.
qemu code reading: qcow2 image file

In the Data Structure part, it is a qcow2 file.
userspace code test: one example run as tunnel
qemu code read: find_image_format() is used to probe the disk format
userspace test code: getcontext/setcontext

getcontext first and call setcontext will continue from the previous point.
userspace code test: redo the same thing until it meets some condition
userspace code test: makecontext/setcontext sounds like a jump
userspace code test: makecontext/swapcontext looks like a function call

This is almost the same as makecontext.c.

In makecontext.c, the process exit after executing func.

While swapcontext.c, after executing func, it come back and continues the
task.
userspace code test: pthread key

Every thread could have its own private variable.
userspace code test: setjmp/longjmp cross function jump
qemu code reading: coroute

The coroute is introduced in 00dccaf1f848290d979a4b1e6248281ce1b32aaa.

The common usage is:
    coroutine = qemu_coroutine_create(my_coroutine);
    qemu_coroutine_enter(coroutine, my_data);

Also it could yield and reenter agian.
Take a look at test_yield() in tests/test-coroutine.c