qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 06/35] multi-process: build system for re


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC PATCH v2 06/35] multi-process: build system for remote device process
Date: Tue, 18 Jun 2019 08:24:06 +0200
User-agent: NeoMutt/20180716

  Hi,

> +#########################################################
> +# remote-pci-obj-y is common code used by remote devices
> +
> +remote-pci-obj-$(CONFIG_MPQEMU) += hw/
> +remote-pci-obj-$(CONFIG_MPQEMU) += qom/
> +remote-pci-obj-$(CONFIG_MPQEMU) += backends/
> +remote-pci-obj-$(CONFIG_MPQEMU) += block/
> +remote-pci-obj-$(CONFIG_MPQEMU) += migration/
> +remote-pci-obj-$(CONFIG_MPQEMU) += remote/
> +
> +remote-pci-obj-$(CONFIG_MPQEMU) += cpus-common.o
> +remote-pci-obj-$(CONFIG_MPQEMU) += dma-helpers.o
> +remote-pci-obj-$(CONFIG_MPQEMU) += blockdev.o
> +remote-pci-obj-$(CONFIG_MPQEMU) += qdev-monitor.o
> +remote-pci-obj-$(CONFIG_MPQEMU) += bootdevice.o
> +remote-pci-obj-$(CONFIG_MPQEMU) += iothread.o

> +all-remote-pci-obj-y += $(authz-obj-y)
> +all-remote-pci-obj-y += $(block-obj-y)
> +all-remote-pci-obj-y += $(crypto-obj-y)
> +all-remote-pci-obj-y += $(io-obj-y)
> +all-remote-pci-obj-y += $(chardev-obj-y)
> +all-remote-pci-obj-y += $(remote-pci-obj-y)

> +remote-pci-obj-$(CONFIG_MPQEMU) += core/
> +remote-pci-obj-$(CONFIG_MPQEMU) += block/
> +remote-pci-obj-$(CONFIG_MPQEMU) += pci/
> +remote-pci-obj-$(CONFIG_MPQEMU) += nvram/

Phew.  So you are building half of qemu into the remote process.

Wouldn't it be more useful to split off much smaller, well-defined
pieces into separate processes?

Splitting off the block layer looks like a good candidate to me.  You'll
have a qemu-remote-block[1] then which should not need much beside
block/, and a small blockdev-proxy in qemu which talks to
qemu-remote-block instead of accessing the disk image by itself.  It's
also a nice improvement from the security point of view, even without
moving the device emulation too, because the main qemu process doesn't
need access to the image files any more.

Likewise network, especially useful for slirp.

With that in place other remote device objects (the lsi/scsi emulation,
but also vhost-user-blk) can just talk to the qemu-remote-block service
instead of compiling in the block layer.

cheers,
  Gerd

[1] maybe even qemu-remote-block-{raw,qcow2,vmdk,...)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]