Skip to content

Commit

Permalink
io: add abstract QIOChannel classes
Browse files Browse the repository at this point in the history
Start the new generic I/O channel framework by defining a
QIOChannel abstract base class. This is designed to feel
similar to GLib's GIOChannel, but with the addition of
support for using iovecs, qemu error reporting, file
descriptor passing, coroutine integration and use of
the QOM framework for easier sub-classing.

The intention is that anywhere in QEMU that almost
anywhere that deals with sockets will use this new I/O
infrastructure, so that it becomes trivial to then layer
in support for TLS encryption. This will at least include
the VNC server, char device backend and migration code.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
  • Loading branch information
berrange committed Dec 18, 2015
1 parent 6a65332 commit 666a3af
Show file tree
Hide file tree
Showing 7 changed files with 810 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MAINTAINERS
Expand Up @@ -1243,6 +1243,13 @@ S: Odd fixes
F: util/buffer.c
F: include/qemu/buffer.h

I/O Channels
M: Daniel P. Berrange <berrange@redhat.com>
S: Maintained
F: io/
F: include/io/
F: tests/test-io-*

Usermode Emulation
------------------
Overall
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -159,6 +159,7 @@ dummy := $(call unnest-vars,, \
crypto-obj-y \
crypto-aes-obj-y \
qom-obj-y \
io-obj-y \
common-obj-y \
common-obj-m)

Expand All @@ -178,6 +179,7 @@ SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))

$(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
$(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y)
$(SOFTMMU_SUBDIR_RULES): $(io-obj-y)
$(SOFTMMU_SUBDIR_RULES): config-all-devices.mak

subdir-%:
Expand Down
5 changes: 5 additions & 0 deletions Makefile.objs
Expand Up @@ -28,6 +28,11 @@ crypto-aes-obj-y = crypto/

qom-obj-y = qom/

#######################################################################
# io-obj-y is code used by both qemu system emulation and qemu-img

io-obj-y = io/

######################################################################
# Target independent part of system emulation. The long term path is to
# suppress *all* target specific code in case of system emulation, i.e. a
Expand Down
2 changes: 2 additions & 0 deletions Makefile.target
Expand Up @@ -176,6 +176,7 @@ dummy := $(call unnest-vars,.., \
crypto-obj-y \
crypto-aes-obj-y \
qom-obj-y \
io-obj-y \
common-obj-y \
common-obj-m)
target-obj-y := $(target-obj-y-save)
Expand All @@ -185,6 +186,7 @@ all-obj-y += $(qom-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y)
all-obj-$(CONFIG_USER_ONLY) += $(crypto-aes-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)

$(QEMU_PROG_BUILD): config-devices.mak

Expand Down

0 comments on commit 666a3af

Please sign in to comment.