Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into…
Browse files Browse the repository at this point in the history
… staging

* Log filtering from Alex and Peter
* Chardev fix from Marc-André
* config.status tweak from David
* Header file tweaks from Markus, myself and Veronia (Outreachy candidate)
* get_ticks_per_sec() removal from Rutuja (Outreachy candidate)
* Coverity fix from myself
* PKE implementation from myself, based on rth's XSAVE support

# gpg: Signature made Thu 24 Mar 2016 20:15:11 GMT 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: (28 commits)
  target-i386: implement PKE for TCG
  config.status: Pass extra parameters
  char: translate from QIOChannel error to errno
  exec: fix error handling in file_ram_alloc
  cputlb: modernise the debug support
  qemu-log: support simple pid substitution for logs
  target-arm: dfilter support for in_asm
  qemu-log: dfilter-ise exec, out_asm, op and opt_op
  qemu-log: new option -dfilter to limit output
  qemu-log: Improve the "exec" TB execution logging
  qemu-log: Avoid function call for disabled qemu_log_mask logging
  qemu-log: correct help text for -d cpu
  tcg: pass down TranslationBlock to tcg_code_gen
  util: move declarations out of qemu-common.h
  Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND
  hw: explicitly include qemu-common.h and cpu.h
  include/crypto: Include qapi-types.h or qemu/bswap.h instead of qemu-common.h
  isa: Move DMA_transfer_handler from qemu-common.h to hw/isa/isa.h
  Move ParallelIOArg from qemu-common.h to sysemu/char.h
  Move QEMU_ALIGN_*() from qemu-common.h to qemu/osdep.h
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Conflicts:
	scripts/clean-includes
  • Loading branch information
pm215 committed Mar 24, 2016
2 parents b68a801 + 0f70ed4 commit 84a5a80
Show file tree
Hide file tree
Showing 620 changed files with 1,774 additions and 755 deletions.
1 change: 1 addition & 0 deletions arch_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "qemu/error-report.h"
#include "qmp-commands.h"
#include "hw/acpi/acpi.h"
#include "qemu/help_option.h"

#ifdef TARGET_SPARC
int graphic_width = 1024;
Expand Down
1 change: 1 addition & 0 deletions async.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/aio.h"
#include "block/thread-pool.h"
Expand Down
4 changes: 2 additions & 2 deletions audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "monitor/monitor.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "qemu/cutils.h"

#define AUDIO_CAP "audio"
#include "audio_int.h"
Expand Down Expand Up @@ -1869,8 +1870,7 @@ static void audio_init (void)
}
conf.period.ticks = 1;
} else {
conf.period.ticks =
muldiv64 (1, get_ticks_per_sec (), conf.period.hertz);
conf.period.ticks = NANOSECONDS_PER_SECOND / conf.period.hertz;
}

e = qemu_add_vm_change_state_handler (audio_vm_change_state_handler, s);
Expand Down
8 changes: 4 additions & 4 deletions audio/noaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ static int no_run_out (HWVoiceOut *hw, int live)

now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
ticks = now - no->old_ticks;
bytes = muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ());
bytes = audio_MIN (bytes, INT_MAX);
bytes = muldiv64(ticks, hw->info.bytes_per_second, NANOSECONDS_PER_SECOND);
bytes = audio_MIN(bytes, INT_MAX);
samples = bytes >> hw->info.shift;

no->old_ticks = now;
Expand All @@ -61,7 +61,7 @@ static int no_run_out (HWVoiceOut *hw, int live)

static int no_write (SWVoiceOut *sw, void *buf, int len)
{
return audio_pcm_sw_write (sw, buf, len);
return audio_pcm_sw_write(sw, buf, len);
}

static int no_init_out(HWVoiceOut *hw, struct audsettings *as, void *drv_opaque)
Expand Down Expand Up @@ -106,7 +106,7 @@ static int no_run_in (HWVoiceIn *hw)
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int64_t ticks = now - no->old_ticks;
int64_t bytes =
muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ());
muldiv64(ticks, hw->info.bytes_per_second, NANOSECONDS_PER_SECOND);

no->old_ticks = now;
bytes = audio_MIN (bytes, INT_MAX);
Expand Down
4 changes: 2 additions & 2 deletions audio/spiceaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ static int rate_get_samples (struct audio_pcm_info *info, SpiceRateCtl *rate)

now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
ticks = now - rate->start_ticks;
bytes = muldiv64 (ticks, info->bytes_per_second, get_ticks_per_sec ());
bytes = muldiv64(ticks, info->bytes_per_second, NANOSECONDS_PER_SECOND);
samples = (bytes - rate->bytes_sent) >> info->shift;
if (samples < 0 || samples > 65536) {
error_report("Resetting rate control (%" PRId64 " samples)", samples);
rate_start (rate);
rate_start(rate);
samples = 0;
}
rate->bytes_sent += samples << info->shift;
Expand Down
2 changes: 1 addition & 1 deletion audio/wavaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int wav_run_out (HWVoiceOut *hw, int live)
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int64_t ticks = now - wav->old_ticks;
int64_t bytes =
muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ());
muldiv64(ticks, hw->info.bytes_per_second, NANOSECONDS_PER_SECOND);

if (bytes > INT_MAX) {
samples = INT_MAX >> hw->info.shift;
Expand Down
3 changes: 2 additions & 1 deletion backends/baum.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/char.h"
#include "qemu/timer.h"
Expand Down Expand Up @@ -336,7 +337,7 @@ static int baum_eat_packet(BaumDriverState *baum, const uint8_t *buf, int len)

/* Allow 100ms to complete the DisplayData packet */
timer_mod(baum->cellCount_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) +
get_ticks_per_sec() / 10);
NANOSECONDS_PER_SECOND / 10);
for (i = 0; i < baum->x * baum->y ; i++) {
EAT(c);
cells[i] = c;
Expand Down
1 change: 1 addition & 0 deletions backends/hostmem-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/hostmem.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions backends/hostmem-ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
#include "sysemu/hostmem.h"
#include "qapi/error.h"
#include "qom/object_interfaces.h"

#define TYPE_MEMORY_BACKEND_RAM "memory-backend-ram"
Expand Down
1 change: 1 addition & 0 deletions backends/hostmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "sysemu/hostmem.h"
#include "hw/boards.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "qapi-types.h"
#include "qapi-visit.h"
Expand Down
1 change: 1 addition & 0 deletions backends/rng-egd.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "sysemu/rng.h"
#include "sysemu/char.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "hw/qdev.h" /* just for DEFINE_PROP_CHR */

Expand Down
1 change: 1 addition & 0 deletions backends/rng-random.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "sysemu/rng-random.h"
#include "sysemu/rng.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/main-loop.h"

Expand Down
1 change: 1 addition & 0 deletions backends/rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "qemu/osdep.h"
#include "sysemu/rng.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qom/object_interfaces.h"

Expand Down
1 change: 1 addition & 0 deletions backends/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "qemu/osdep.h"
#include "sysemu/tpm_backend.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/tpm.h"
#include "qemu/thread.h"
Expand Down
3 changes: 2 additions & 1 deletion block.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
Expand All @@ -40,6 +39,8 @@
#include "qemu/timer.h"
#include "qapi-event.h"
#include "block/throttle-groups.h"
#include "qemu/cutils.h"
#include "qemu/id.h"

#ifdef CONFIG_BSD
#include <sys/ioctl.h>
Expand Down
2 changes: 1 addition & 1 deletion block/archipelago.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "block/block_int.h"
#include "qemu/error-report.h"
#include "qemu/thread.h"
Expand Down
2 changes: 2 additions & 0 deletions block/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
#include "block/block.h"
#include "block/block_int.h"
#include "block/blockjob.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "qemu/cutils.h"
#include "sysemu/block-backend.h"
#include "qemu/bitmap.h"

Expand Down
3 changes: 2 additions & 1 deletion block/blkdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qapi/error.h"
#include "qemu/cutils.h"
#include "qemu/config-file.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
2 changes: 2 additions & 0 deletions block/blkverify.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
*/

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
#include "block/block_int.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
#include "qemu/cutils.h"

typedef struct {
BdrvChild *test_file;
Expand Down
1 change: 1 addition & 0 deletions block/block-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "qapi-event.h"
#include "qemu/id.h"

/* Number of coroutines to reserve per attached device model */
#define COROUTINE_POOL_RESERVATION 64
Expand Down
1 change: 1 addition & 0 deletions block/bochs.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions block/cloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions block/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "sysemu/block-backend.h"
Expand Down
2 changes: 2 additions & 0 deletions block/curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "block/block_int.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qstring.h"
#include "crypto/secret.h"
#include <curl/curl.h>
#include "qemu/cutils.h"

// #define DEBUG_CURL
// #define DEBUG_VERBOSE
Expand Down
2 changes: 1 addition & 1 deletion block/dirty-bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "config-host.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "trace.h"
#include "block/block_int.h"
Expand Down
1 change: 1 addition & 0 deletions block/dmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/bswap.h"
Expand Down
1 change: 1 addition & 0 deletions block/gluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include <glusterfs/api/glfs.h>
#include "block/block_int.h"
#include "qapi/error.h"
#include "qemu/uri.h"

typedef struct GlusterAIOCB {
Expand Down
2 changes: 2 additions & 0 deletions block/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "block/blockjob.h"
#include "block/block_int.h"
#include "block/throttle-groups.h"
#include "qemu/cutils.h"
#include "qapi/error.h"
#include "qemu/error-report.h"

#define NOT_DONE 0x7fffffff /* used while emulated sync operation in progress */
Expand Down
1 change: 1 addition & 0 deletions block/mirror.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "block/blockjob.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "qemu/bitmap.h"
Expand Down
3 changes: 2 additions & 1 deletion block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@

#include "qemu/osdep.h"
#include "block/nbd-client.h"
#include "qapi/error.h"
#include "qemu/uri.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qstring.h"

#include "qemu/cutils.h"

#define EN_OPTSTR ":exportname="

Expand Down
1 change: 1 addition & 0 deletions block/null.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "block/block_int.h"

#define NULL_OPT_LATENCY "latency-ns"
Expand Down
1 change: 1 addition & 0 deletions block/parallels.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
Expand Down
1 change: 1 addition & 0 deletions block/qapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "qapi/qmp-output-visitor.h"
#include "qapi/qmp/types.h"
#include "sysemu/block-backend.h"
#include "qemu/cutils.h"

BlockDeviceInfo *bdrv_block_device_info(BlockDriverState *bs, Error **errp)
{
Expand Down
1 change: 1 addition & 0 deletions block/qcow.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
Expand Down
1 change: 1 addition & 0 deletions block/qcow2-cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include <zlib.h>

#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
Expand Down
1 change: 1 addition & 0 deletions block/qcow2-refcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
Expand Down
3 changes: 2 additions & 1 deletion block/qcow2-snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qapi/error.h"
#include "block/block_int.h"
#include "block/qcow2.h"
#include "qemu/error-report.h"
#include "qemu/cutils.h"

void qcow2_free_snapshots(BlockDriverState *bs)
{
Expand Down
Loading

0 comments on commit 84a5a80

Please sign in to comment.