summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch ↵Peter Maydell2015-10-2047-199/+613
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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 <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" * 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 <peter.maydell@linaro.org>
| * util: pull Buffer code out of VNC moduleDaniel P. Berrange2015-10-206-58/+191
| | | | | | | | | | | | | | 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 <berrange@redhat.com>
| * coroutine: move into libqemuutil.a libraryDaniel P. Berrange2015-10-2036-39/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <berrange@redhat.com>
| * osdep: add qemu_fork() wrapper for safely handling signalsDaniel P. Berrange2015-10-203-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <berrange@redhat.com>
| * ui: convert VNC startup code to use SocketAddressDaniel P. Berrange2015-10-201-70/+90
| | | | | | | | | | | | | | | | | | | | 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 <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
| * sockets: allow port to be NULL when listening on IP addressDaniel P. Berrange2015-10-202-7/+17
| | | | | | | | | | | | | | | | | | 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 <berrange@redhat.com>
| * sockets: move qapi_copy_SocketAddress into qemu-sockets.cDaniel P. Berrange2015-10-203-25/+34
| | | | | | | | | | | | | | | | | | 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 <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
| * sockets: add helpers for creating SocketAddress from a socketDaniel P. Berrange2015-10-202-0/+140
| | | | | | | | | | | | | | | | 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 <berrange@redhat.com>
* | Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20151020-1' ↵Peter Maydell2015-10-201-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging virtio-input: ignore events until the guest driver is ready # gpg: Signature made Tue 20 Oct 2015 08:10:00 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-input-20151020-1: virtio-input: ignore events until the guest driver is ready Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | virtio-input: ignore events until the guest driver is readyGerd Hoffmann2015-10-201-0/+4
| | | | | | | | | | | | | | | Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20151020-1' into ↵Peter Maydell2015-10-203-4/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging vga: enable virtio-vga for pseries, vmsvga cursor checks. # gpg: Signature made Tue 20 Oct 2015 08:27:44 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-vga-20151020-1: vmsvga: more cursor checks ppc/spapr: Allow VIRTIO_VGA Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | vmsvga: more cursor checksGerd Hoffmann2015-10-201-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the cursor size more carefully. Also switch to unsigned while being at it, so they can't be negative. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | ppc/spapr: Allow VIRTIO_VGABenjamin Herrenschmidt2015-10-202-0/+2
| |/ / | | | | | | | | | | | | | | | | | | It works fine with the Linux driver out of the box Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'remotes/kraxel/tags/pull-fw_cfg-20151020-1' ↵Peter Maydell2015-10-208-32/+388
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging fw_cfg: add dma interface, add strings via cmdline. # gpg: Signature made Tue 20 Oct 2015 07:07:34 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-fw_cfg-20151020-1: fw_cfg: Define a static signature to be returned on DMA port reads Enable fw_cfg DMA interface for x86 Enable fw_cfg DMA interface for ARM Implement fw_cfg DMA interface fw_cfg DMA interface documentation fw_cfg: document fw_cfg_modify_iXX() update functions fw_cfg: insert string blobs via qemu cmdline Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | fw_cfg: Define a static signature to be returned on DMA port readsKevin O'Connor2015-10-192-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a static signature ("QEMU CFG") if the guest does a read to the DMA address io register. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | Enable fw_cfg DMA interface for x86Marc Marí2015-10-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the fw_cfg DMA interface for all the x86 platforms. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí <markmb@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | Enable fw_cfg DMA interface for ARMMarc Marí2015-10-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the fw_cfg DMA interface for the ARM virt machine. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí <markmb@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | Implement fw_cfg DMA interfaceMarc Marí2015-10-194-15/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the specifications on docs/specs/fw_cfg.txt This interface is an addon. The old interface can still be used as usual. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí <markmb@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | fw_cfg DMA interface documentationMarc Marí2015-10-191-4/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add fw_cfg DMA interface specification in the documentation. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Marí <markmb@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | fw_cfg: document fw_cfg_modify_iXX() update functionsGabriel L. Somlo2015-10-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the behavior of fw_cfg_modify_iXX() for leak-less updating of integer-type blobs. Currently only fw_cfg_modify_i16() is coded, but 32- and 64-bit versions may be added later if necessary.. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | fw_cfg: insert string blobs via qemu cmdlineGabriel L. Somlo2015-10-193-7/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow users to provide custom fw_cfg blobs with ascii string payloads specified directly on the qemu command line. Suggested-by: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Message-id: 1443544141-26568-1-git-send-email-somlo@cmu.edu Reviewd-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20151020-1' into ↵Peter Maydell2015-10-203-4/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging usb: misc small tweaks. # gpg: Signature made Tue 20 Oct 2015 08:24:09 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-20151020-1: usb-audio: increate default buffer size usb: print device id in "info usb" monitor command usb-host: add wakeup call for iso xfers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | usb-audio: increate default buffer sizeGerd Hoffmann2015-10-201-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb: print device id in "info usb" monitor commandGerd Hoffmann2015-10-201-3/+6
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb-host: add wakeup call for iso xfersGerd Hoffmann2015-10-201-0/+1
| | |/ | |/| | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch ↵Peter Maydell2015-10-2015-60/+1412
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/mdroth/tags/qga-pull-2015-10-14-v4-tag' into staging qemu-ga patch queue * add unit tests for qemu-ga * add guest-exec support for posix/w32 guests * added 'qemu-ga' target for w32. this allows us to do full MSI build, without overloading 'qemu-ga.exe' target with uneeded dependencies. * number of s/g_new/g_malloc/ conversions for qga v2: * commit message and qapi documentation spelling fixes * rename 'inp-data' guest-exec param to 'input-data' v3: * fix OSX build errors for test-qga by using PRId64 format in place of glib's, and dropping use of G_SPAWN_DEFAULT macro for glib 2.22 compat * fix win32 build warnings for 32-bit builds by avoid int casts of process HANDLEs v4: * assert connect_qga() doesn't fail * only enable test-qga for linux hosts * allow get-memory-block-info* to fail if memory blocks aren't exposed in sysfs # gpg: Signature made Tue 20 Oct 2015 00:33:43 BST using RSA key ID F108B584 # gpg: Good signature from "Michael Roth <flukshun@gmail.com>" # gpg: aka "Michael Roth <mdroth@utexas.edu>" # gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>" * remotes/mdroth/tags/qga-pull-2015-10-14-v4-tag: qga: fix uninitialized value warning for win32 qga: guest-exec simple stdin/stdout/stderr redirection qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all() qga: handle possible SIGPIPE in guest-file-write qga: guest exec functionality qga: drop guest_file_init helper and replace it with static initializers tests: add a local test for guest agent qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocks glib-compat: add 2.38/2.40/2.46 asserts qtest: add a few fd-level qmp helpers qga: do not override configuration verbosity qga: add QGA_CONF environment variable qga: Use g_new() & friends where that makes obvious sense build: qemu-ga: add 'qemu-ga' build target for w32 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | qga: fix uninitialized value warning for win32Michael Roth2015-10-191-1/+1
| | | | | | | | | | | | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: guest-exec simple stdin/stdout/stderr redirectionYuri Pudgorodskiy2015-10-192-9/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented with base64-encoded strings in qga json protocol. Glib portable GIOChannel is used for data I/O. Optinal stdin parameter of guest-exec command is now used as stdin content for spawned subprocess. If capture-output bool flag is specified, guest-exec redirects out/err file descriptiors internally to pipes and collects subprocess output. Guest-exe-status is modified to return this collected data to requestor in base64 encoding. Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> * switch from 'struct GuestIOExecData' to 'GuestIOExecData' * s/TRUE/true/g, s/FALSE/false/g for gboolean return values * s/inp_data/input_data/ Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()Yuri Pudgorodskiy2015-10-191-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glib may return G_IO_STATUS_AGAIN which is actually not an error. Also fixed a bug when on incomplete write buf pointer was not adjusted. Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: handle possible SIGPIPE in guest-file-writeDenis V. Lunev2015-10-192-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qemu-ga should not exit on guest-file-write to pipe without read end but proper error code should be returned. The behavior of the spawned process should be default thus SIGPIPE processing should be reset to default after fork() but before exec(). Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: guest exec functionalityYuri Pudgorodskiy2015-10-192-0/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guest-exec rewritten in platform-independent style with glib spawn. Child process is spawn asynchronously and exit status can later be picked up by guest-exec-status command. stdin/stdout/stderr of the child now is redirected to /dev/null Later we will add ability to specify stdin in guest-exec command and to get collected stdout/stderr with guest-exec-status. Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Michael Roth <mdroth@linux.vnet.ibm.com> * use g_new0 in place of g_malloc for GuestExec struct * commit msg spelling fixes * s/inp-data/input-data * document capture-input mode as false by default * use GetProcessId() for pids on w32 instead of casting HANDLE Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: drop guest_file_init helper and replace it with static initializersDenis V. Lunev2015-10-192-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just makes code shorter and better. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | tests: add a local test for guest agentMarc-André Lureau2015-10-192-0/+786
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some local guest agent tests, as it is better than nothing, only when CONFIG_POSIX (using unix sockets). With the QGA_TEST_SIDE_EFFECTING environment variable, it will include tests with side effects, such as freezing/thawing the FS or changing the time. (a better test would involve a managed VM (or container), but it might be better to leave that off to autotest/avocado) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> * use mkdtemp() in placeof g_mkdtemp() for glib 2.22 compat * drop redundant/conflicting compat defines for g_assert_{true,false}, since glib-compat has them now. * build fixes for OSX: use PRId64 instead of glib formats, drop g_spawn_default usage for glib compat * assert connect_qga() doesn't fail * only enable test-qga for linux hosts * allow get-memory-block-info* to fail Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocksMichael Roth2015-10-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Some guests don't expose memory blocks via sysfs at all. This shouldn't be a failure, instead just return an empty list. For other access failures we still report an error. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | glib-compat: add 2.38/2.40/2.46 assertsMarc-André Lureau2015-10-191-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | Those are mostly useful for writing tests. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qtest: add a few fd-level qmp helpersMarc-André Lureau2015-10-192-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | Add a few functions to interact with qmp via a simple fd. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: do not override configuration verbosityMarc-André Lureau2015-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the default verbosity settings before loading the configuration file, or it will overwrite it. Found thanks to writing qga tests :) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: add QGA_CONF environment variableMarc-André Lureau2015-10-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a environment variable allows to override default configuration path, useful for testing. Note that this can't easily be an argument, since loading config is done before parsing the arguments. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | qga: Use g_new() & friends where that makes obvious senseMarkus Armbruster2015-10-196-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form sizeof(T). Same Coccinelle semantic patch as in commit b45c03f. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | build: qemu-ga: add 'qemu-ga' build target for w32Michael Roth2015-10-192-7/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently POSIX builds rely on 'qemu-ga' target to do qga-only distributable build. On w32, as with most standalone binary targets, we rely on 'qemu-ga.exe' target. Unlike with POSIX, qemu-ga for w32 has a number of related targets such as VSS DLL and MSI package. We can do the full distributable qga-only build on w32 with: make qemu-ga.exe or: make msi To make that work, we tie VSS dependencies onto qemu-ga.exe. However, in reality the DLL isn't part of the binary, so we use a filter to pull them out of the LINK recipe, which attempts to link against prereqs for binary targets. Additionally, it could be argued that VSS is a separate distributable, and shouldn't be implied by qemu-ga.exe binary target. To avoid this, we can tie the VSS dependencies only to the 'msi' target, but that would make it impossible to do a qga-only build of the w32 distributable without building the 'msi' package, which was supported in the past. An alternative approach is to add a new target to build the whole distributable. w32 allows us to use the same build target we use on POSIX, 'qemu-ga', since the current binary-only target on w32 is 'qemu-ga.exe'. To further simplify the build, we also make 'qemu-ga' build the MSI package if the appropriate ./configure options are set, making the full qga-only build the same on both POSIX and w32: `make qemu-ga` Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'remotes/sstabellini/tags/2015-10-19-tag' into ↵Peter Maydell2015-10-192-0/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | staging Xen 2015-10-19 # gpg: Signature made Mon 19 Oct 2015 11:24:05 BST using RSA key ID 70E1AE90 # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" * remotes/sstabellini/tags/2015-10-19-tag: xen-platform: Ensure xen is enabled when initializing pc: Require xen when initializing xenfv machine Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * xen-platform: Ensure xen is enabled when initializingEduardo Habkost2015-10-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The xen-platform code crashes on reset if the xen backend is not initialized, because it calls xc_hvm_set_mem_type(). Ensure xen-platform won't be created without initializing the xen backend. The assert can't be triggered by the user because the device is not hotpluggable, and the only code creating it (at pc_xen_hvm_init()) already checks xen_enabled(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * pc: Require xen when initializing xenfv machineEduardo Habkost2015-10-191-0/+5
| | | | | | | | | | | | | | | | | | | | Without this check, the xen-platform device will crash on reset if using the accel option with anything other than xen (e.g. "-machine xenfv,accel=kvm"). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2015-10-1955-444/+723
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * KVM page size fix for PPC * Support for Linux 4.4's new Hyper-V features * Eliminate g_slice from areas I maintain * checkpatch fix * Peter's cpu_reload_memory_map() cleanups * More changes to MAINTAINERS * Require Python 2.6 * chardev creation fixes * PCI requester id for ARM KVM * cleanups and doc fixes * Allow customization of the Hyper-V vendor id # gpg: Signature made Mon 19 Oct 2015 09:13:10 BST using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream: (49 commits) kvm: Allow the Hyper-V vendor ID to be specified kvm: Move x86-specific functions into target-i386/kvm.c kvm: Pass PCI device pointer to MSI routing functions hw/pci: Introduce pci_requester_id() kvm: Make KVM_CAP_SIGNAL_MSI globally available doc/rcu: fix g_free_rcu() usage example qemu-char: cleanup after completed conversion to cd->create qemu-char: convert ringbuf backend to data-driven creation qemu-char: convert vc backend to data-driven creation qemu-char: convert spice backend to data-driven creation qemu-char: convert console backend to data-driven creation qemu-char: convert stdio backend to data-driven creation qemu-char: convert testdev backend to data-driven creation qemu-char: convert braille backend to data-driven creation qemu-char: convert msmouse backend to data-driven creation qemu-char: convert mux backend to data-driven creation qemu-char: convert null backend to data-driven creation qemu-char: convert pty backend to data-driven creation qemu-char: convert UDP backend to data-driven creation qemu-char: convert socket backend to data-driven creation ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * kvm: Allow the Hyper-V vendor ID to be specifiedAlex Williamson2015-10-193-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Microsoft documentation, the signature in the standard hypervisor CPUID leaf at 0x40000000 identifies the Vendor ID and is for reporting and diagnostic purposes only. We can therefore allow the user to change it to whatever they want, within the 12 character limit. Add a new hv-vendor-id option to the -cpu flag to allow for this, ex: -cpu host,hv_time,hv-vendor-id=KeenlyKVM Link: http://msdn.microsoft.com/library/windows/hardware/hh975392 Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Message-Id: <20151016153356.28104.48612.stgit@gimli.home> [Adjust error message to match the property name, use error_report. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * kvm: Move x86-specific functions into target-i386/kvm.cThomas Huth2015-10-194-41/+26
| | | | | | | | | | | | | | | | | | The functions for checking xcrs, xsave and pit_state2 are only used on x86, so they should reside in target-i386/kvm.c. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1444933820-6968-1-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * kvm: Pass PCI device pointer to MSI routing functionsPavel Fedin2015-10-1911-25/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In-kernel ITS emulation on ARM64 will require to supply requester IDs. These IDs can now be retrieved from the device pointer using new pci_requester_id() function. This patch adds pci_dev pointer to KVM GSI routing functions and makes callers passing it. x86 architecture does not use requester IDs, but hw/i386/kvm/pci-assign.c also made passing PCI device pointer instead of NULL for consistency with the rest of the code. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Message-Id: <ce081423ba2394a4efc30f30708fca07656bc500.1444916432.git.p.fedin@samsung.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * hw/pci: Introduce pci_requester_id()Pavel Fedin2015-10-195-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For GICv3 ITS implementation we are going to use requester IDs in KVM IRQ routing code. This patch introduces reusable convenient way to obtain this ID from the device pointer. The new function is now used in some places, where the same calculation was used. MemTxAttrs.stream_id also renamed to requester_id in order to better reflect semantics of the field. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <5814bcb03a297f198e796b13ed9c35059c52f89b.1444916432.git.p.fedin@samsung.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * kvm: Make KVM_CAP_SIGNAL_MSI globally availablePavel Fedin2015-10-192-5/+14
| | | | | | | | | | | | | | | | | | This capability is useful to determine whether we can use KVM ITS emulation on ARM Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Message-Id: <ff4ccb09b837d37defd639b885526949a25276de.1444916432.git.p.fedin@samsung.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * doc/rcu: fix g_free_rcu() usage exampleSergey Fedorov2015-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | The first argument of g_free_rcu() is a pointer to a structure. But foo_reclaim is used as a function name in the previous example along with &foo as a pointer to the structure being reclaimed. Make the example consistent with the previous one. Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Message-Id: <1444837604-13712-1-git-send-email-serge.fdrv@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud