qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 17c55d: sockets: add helpers for creating Soc


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 17c55d: sockets: add helpers for creating SocketAddress fr...
Date: Wed, 21 Oct 2015 05:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 17c55decec2a516cf7f290ec8a5f4f207531e8b4
      
https://github.com/qemu/qemu/commit/17c55decec2a516cf7f290ec8a5f4f207531e8b4
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M include/qemu/sockets.h
    M util/qemu-sockets.c

  Log Message:
  -----------
  sockets: add helpers for creating SocketAddress from a socket

Add two helper methods that, given a socket file descriptor,
can return a populated SocketAddress struct containing either
the local or remote address information.

Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: 2a8e21c7c8dcb7d235cfd256be36b7e8f9f3fcb3
      
https://github.com/qemu/qemu/commit/2a8e21c7c8dcb7d235cfd256be36b7e8f9f3fcb3
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M include/qemu/sockets.h
    M qemu-char.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  sockets: move qapi_copy_SocketAddress into qemu-sockets.c

The qapi_copy_SocketAddress method is going to be useful
in more places than just qemu-char.c, so move it into
the qemu-sockets.c file to allow its reuse.

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: 0983f5e6af76d5df8c6346cbdfff9d8305fb6da0
      
https://github.com/qemu/qemu/commit/0983f5e6af76d5df8c6346cbdfff9d8305fb6da0
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M qapi-schema.json
    M util/qemu-sockets.c

  Log Message:
  -----------
  sockets: allow port to be NULL when listening on IP address

If the port in the SocketAddress struct is NULL, it can allow
the kernel to automatically select a free port. This is useful
in particular in unit tests to avoid a race trying to find a
free port to run a test case on.

Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: e0d03b8ceb52e390b8b0a5db1762a8435dd8a44e
      
https://github.com/qemu/qemu/commit/e0d03b8ceb52e390b8b0a5db1762a8435dd8a44e
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M ui/vnc.c

  Log Message:
  -----------
  ui: convert VNC startup code to use SocketAddress

The VNC code is currently using QemuOpts to configure the
sockets connections / listeners it needs. Convert it to
use SocketAddress to bring it in line with modern QAPI
based code elsewhere in QEMU.

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: 57cb38b3833c5215131b983f181b26d6ba9b8d35
      
https://github.com/qemu/qemu/commit/57cb38b3833c5215131b983f181b26d6ba9b8d35
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M include/qemu/osdep.h
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  osdep: add qemu_fork() wrapper for safely handling signals

When using regular fork() the child process of course inherits
all the parents' signal handlers. If the child then proceeds
to close() any open file descriptors, it may break some of those
registered signal handlers. The child generally does not want to
ever run any of the signal handlers that the parent may have
installed in the short time before it exec's. The parent may also
have blocked various signals which the child process will want
enabled.

This introduces a wrapper qemu_fork() that takes care to sanitize
signal handling across fork. Before forking it blocks all signals
in the parent thread. After fork returns, the parent unblocks the
signals and carries on as usual. The child, however, resets all the
signal handlers back to their defaults before it unblocks signals.
The child process can now exec the binary in a "clean" signal
environment.

Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: 10817bf09d5f8cb22711fb0ee8d8da49f6f05f89
      
https://github.com/qemu/qemu/commit/10817bf09d5f8cb22711fb0ee8d8da49f6f05f89
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M MAINTAINERS
    M Makefile.objs
    M block.c
    M block/qcow2.h
    M block/vdi.c
    M block/write-threshold.c
    M blockjob.c
    R coroutine-gthread.c
    R coroutine-sigaltstack.c
    R coroutine-ucontext.c
    R coroutine-win32.c
    M hw/9pfs/codir.c
    M hw/9pfs/cofile.c
    M hw/9pfs/cofs.c
    M hw/9pfs/coxattr.c
    M hw/9pfs/virtio-9p-coth.c
    M hw/9pfs/virtio-9p-coth.h
    M hw/9pfs/virtio-9p.h
    M include/block/block.h
    M include/block/block_int.h
    R include/block/coroutine.h
    R include/block/coroutine_int.h
    A include/qemu/coroutine.h
    A include/qemu/coroutine_int.h
    M migration/qemu-file-buf.c
    M migration/qemu-file-stdio.c
    M migration/qemu-file-unix.c
    M migration/qemu-file.c
    M migration/rdma.c
    M nbd.c
    R qemu-coroutine-io.c
    R qemu-coroutine-lock.c
    R qemu-coroutine-sleep.c
    R qemu-coroutine.c
    M tests/test-coroutine.c
    M tests/test-vmstate.c
    M thread-pool.c
    M util/Makefile.objs
    A util/coroutine-gthread.c
    A util/coroutine-sigaltstack.c
    A util/coroutine-ucontext.c
    A util/coroutine-win32.c
    A util/qemu-coroutine-io.c
    A util/qemu-coroutine-lock.c
    A util/qemu-coroutine-sleep.c
    A util/qemu-coroutine.c

  Log Message:
  -----------
  coroutine: move into libqemuutil.a library

The coroutine files are currently referenced by the block-obj-y
variable. The coroutine functionality though is already used by
more than just the block code. eg migration code uses coroutine
yield. In the future the I/O channel code will also use the
coroutine yield functionality. Since the coroutine code is nicely
self-contained it can be easily built as part of the libqemuutil.a
library, making it widely available.

The headers are also moved into include/qemu, instead of the
include/block directory, since they are now part of the util
codebase, and the impl was never in the block/ directory
either.

Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: 88c5f205fa4c095db4c50eb7ad72816140206819
      
https://github.com/qemu/qemu/commit/88c5f205fa4c095db4c50eb7ad72816140206819
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M MAINTAINERS
    A include/qemu/buffer.h
    M ui/vnc.c
    M ui/vnc.h
    M util/Makefile.objs
    A util/buffer.c

  Log Message:
  -----------
  util: pull Buffer code out of VNC module

The Buffer code in the VNC server is useful for the IO channel
code, so pull it out into a shared module, QIOBuffer.

Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: 426c0df9e3e6e64c7ea489092c57088ca4d227d0
      
https://github.com/qemu/qemu/commit/426c0df9e3e6e64c7ea489092c57088ca4d227d0
  Author: Peter Maydell <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M MAINTAINERS
    M Makefile.objs
    M block.c
    M block/qcow2.h
    M block/vdi.c
    M block/write-threshold.c
    M blockjob.c
    R coroutine-gthread.c
    R coroutine-sigaltstack.c
    R coroutine-ucontext.c
    R coroutine-win32.c
    M hw/9pfs/codir.c
    M hw/9pfs/cofile.c
    M hw/9pfs/cofs.c
    M hw/9pfs/coxattr.c
    M hw/9pfs/virtio-9p-coth.c
    M hw/9pfs/virtio-9p-coth.h
    M hw/9pfs/virtio-9p.h
    M include/block/block.h
    M include/block/block_int.h
    R include/block/coroutine.h
    R include/block/coroutine_int.h
    A include/qemu/buffer.h
    A include/qemu/coroutine.h
    A include/qemu/coroutine_int.h
    M include/qemu/osdep.h
    M include/qemu/sockets.h
    M migration/qemu-file-buf.c
    M migration/qemu-file-stdio.c
    M migration/qemu-file-unix.c
    M migration/qemu-file.c
    M migration/rdma.c
    M nbd.c
    M qapi-schema.json
    M qemu-char.c
    R qemu-coroutine-io.c
    R qemu-coroutine-lock.c
    R qemu-coroutine-sleep.c
    R qemu-coroutine.c
    M tests/test-coroutine.c
    M tests/test-vmstate.c
    M thread-pool.c
    M ui/vnc.c
    M ui/vnc.h
    M util/Makefile.objs
    A util/buffer.c
    A util/coroutine-gthread.c
    A util/coroutine-sigaltstack.c
    A util/coroutine-ucontext.c
    A util/coroutine-win32.c
    M util/oslib-posix.c
    M util/oslib-win32.c
    A util/qemu-coroutine-io.c
    A util/qemu-coroutine-lock.c
    A util/qemu-coroutine-sleep.c
    A util/qemu-coroutine.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/berrange/tags/io-channel-3-for-upstream' into staging

Merge io-channels-3 partial branch

# gpg: Signature made Tue 20 Oct 2015 16:36:10 BST using RSA key ID 15104FDF
# gpg: Good signature from "Daniel P. Berrange <address@hidden>"
# gpg:                 aka "Daniel P. Berrange <address@hidden>"

* remotes/berrange/tags/io-channel-3-for-upstream:
  util: pull Buffer code out of VNC module
  coroutine: move into libqemuutil.a library
  osdep: add qemu_fork() wrapper for safely handling signals
  ui: convert VNC startup code to use SocketAddress
  sockets: allow port to be NULL when listening on IP address
  sockets: move qapi_copy_SocketAddress into qemu-sockets.c
  sockets: add helpers for creating SocketAddress from a socket

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/ee9dfed24261...426c0df9e3e6

reply via email to

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