multi-process.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. .. _Multi-process QEMU:
  2. Multi-process QEMU
  3. ==================
  4. This document describes how to configure and use multi-process qemu.
  5. For the design document refer to docs/devel/qemu-multiprocess.
  6. 1) Configuration
  7. ----------------
  8. multi-process is enabled by default for targets that enable KVM
  9. 2) Usage
  10. --------
  11. Multi-process QEMU requires an orchestrator to launch.
  12. Following is a description of command-line used to launch mpqemu.
  13. * Orchestrator:
  14. - The Orchestrator creates a unix socketpair
  15. - It launches the remote process and passes one of the
  16. sockets to it via command-line.
  17. - It then launches QEMU and specifies the other socket as an option
  18. to the Proxy device object
  19. * Remote Process:
  20. - QEMU can enter remote process mode by using the "remote" machine
  21. option.
  22. - The orchestrator creates a "remote-object" with details about
  23. the device and the file descriptor for the device
  24. - The remaining options are no different from how one launches QEMU with
  25. devices.
  26. - Example command-line for the remote process is as follows:
  27. /usr/bin/qemu-system-x86_64 \
  28. -machine x-remote \
  29. -device lsi53c895a,id=lsi0 \
  30. -drive id=drive_image2,file=/build/ol7-nvme-test-1.qcow2 \
  31. -device scsi-hd,id=drive2,drive=drive_image2,bus=lsi0.0,scsi-id=0 \
  32. -object x-remote-object,id=robj1,devid=lsi0,fd=4,
  33. * QEMU:
  34. - Since parts of the RAM are shared between QEMU & remote process, a
  35. memory-backend-memfd is required to facilitate this, as follows:
  36. -object memory-backend-memfd,id=mem,size=2G
  37. - A "x-pci-proxy-dev" device is created for each of the PCI devices emulated
  38. in the remote process. A "socket" sub-option specifies the other end of
  39. unix channel created by orchestrator. The "id" sub-option must be specified
  40. and should be the same as the "id" specified for the remote PCI device
  41. - Example commandline for QEMU is as follows:
  42. -device x-pci-proxy-dev,id=lsi0,socket=3