]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
6 years agomigration: use bdrv_drain_all_begin/end() instead bdrv_drain_all()
Stefan Hajnoczi [Mon, 22 May 2017 13:57:04 +0000 (14:57 +0100)]
migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all()

blk/bdrv_drain_all() only takes effect for a single instant and then
resumes block jobs, guest devices, and other external clients like the
NBD server.  This can be handy when performing a synchronous drain
before terminating the program, for example.

Monitor commands usually need to quiesce I/O across an entire code
region so blk/bdrv_drain_all() is not suitable.  They must use
bdrv_drain_all_begin/end() to mark the region.  This prevents new I/O
requests from slipping in or worse - block jobs completing and modifying
the graph.

I audited other blk/bdrv_drain_all() callers but did not find anything
that needs a similar fix.  This patch fixes the savevm/loadvm commands.
Although I haven't encountered a read world issue this makes the code
safer.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
6 years agomigration: avoid recursive AioContext locking in save_vmstate()
Stefan Hajnoczi [Mon, 22 May 2017 13:57:03 +0000 (14:57 +0100)]
migration: avoid recursive AioContext locking in save_vmstate()

AioContext was designed to allow nested acquire/release calls.  It uses
a recursive mutex so callers don't need to worry about nesting...or so
we thought.

BDRV_POLL_WHILE() is used to wait for block I/O requests.  It releases
the AioContext temporarily around aio_poll().  This gives IOThreads a
chance to acquire the AioContext to process I/O completions.

It turns out that recursive locking and BDRV_POLL_WHILE() don't mix.
BDRV_POLL_WHILE() only releases the AioContext once, so the IOThread
will not be able to acquire the AioContext if it was acquired
multiple times.

Instead of trying to release AioContext n times in BDRV_POLL_WHILE(),
this patch simply avoids nested locking in save_vmstate().  It's the
simplest fix and we should step back to consider the big picture with
all the recent changes to block layer threading.

This patch is the final fix to solve 'savevm' hanging with -object
iothread.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
6 years agoblock: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()
Stefan Hajnoczi [Mon, 22 May 2017 13:57:02 +0000 (14:57 +0100)]
block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

Calling aio_poll() directly may have been fine previously, but this is
the future, man!  The difference between an aio_poll() loop and
BDRV_POLL_WHILE() is that BDRV_POLL_WHILE() releases the AioContext
around aio_poll().

This allows the IOThread to run fd handlers or BHs to complete the
request.  Failure to release the AioContext causes deadlocks.

Using BDRV_POLL_WHILE() partially fixes a 'savevm' hang with -object
iothread.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
6 years agoblock: count bdrv_co_rw_vmstate() requests
Stefan Hajnoczi [Mon, 22 May 2017 13:57:01 +0000 (14:57 +0100)]
block: count bdrv_co_rw_vmstate() requests

Call bdrv_inc/dec_in_flight() for vmstate reads/writes.  This seems
unnecessary at first glance because vmstate reads/writes are done
synchronously while the guest is stopped.  But we need the bdrv_wakeup()
in bdrv_dec_in_flight() so the main loop sees request completion.
Besides, it's cleaner to count vmstate reads/writes like ordinary
read/write requests.

The bdrv_wakeup() partially fixes a 'savevm' hang with -object iothread.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
6 years agoqemu-iotests: Test exiting qemu with running job
Kevin Wolf [Fri, 9 Jun 2017 11:37:01 +0000 (13:37 +0200)]
qemu-iotests: Test exiting qemu with running job

When qemu is exited, all running jobs should be cancelled successfully.
This adds a test for this for all types of block jobs that currently
exist in qemu.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
6 years agoqemu-iotests: Allow starting new qemu after cleanup
Kevin Wolf [Fri, 9 Jun 2017 11:32:48 +0000 (13:32 +0200)]
qemu-iotests: Allow starting new qemu after cleanup

After _cleanup_qemu(), test cases should be able to start the next qemu
process and call _cleanup_qemu() for that one as well. For this to work
cleanly, we need to improve the cleanup so that the second invocation
doesn't try to kill the qemu instances from the first invocation a
second time (which would result in error messages).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
6 years agocommit: Fix completion with extra reference
Kevin Wolf [Fri, 9 Jun 2017 11:29:36 +0000 (13:29 +0200)]
commit: Fix completion with extra reference

commit_complete() can't assume that after its block_job_completed() the
job is actually immediately freed; someone else may still be holding
references. In this case, the op blockers on the intermediate nodes make
the graph reconfiguration in the completion code fail.

Call block_job_remove_all_bdrv() manually so that we know for sure that
any blockers on intermediate nodes are given up.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
6 years agoMerge remote-tracking branch 'remotes/rth/tags/pull-s390-20170623' into staging
Peter Maydell [Fri, 23 Jun 2017 17:11:48 +0000 (18:11 +0100)]
Merge remote-tracking branch 'remotes/rth/tags/pull-s390-20170623' into staging

Queued target/s390x patches

# gpg: Signature made Fri 23 Jun 2017 17:18:24 BST
# gpg:                using RSA key 0xAD1270CC4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg:                 aka "Richard Henderson <rth@redhat.com>"
# gpg:                 aka "Richard Henderson <rth@twiddle.net>"
# Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B

* remotes/rth/tags/pull-s390-20170623:
  target/s390x: Implement idte instruction
  target/s390x: Improve heuristic for ipte
  target/s390x: Indicate and check for local tlb clearing
  target/s390x: Clean up TB flag bits
  target/s390x: Finish implementing ETF2-ENH
  target/s390x: Mark STFLE_49 facility as available
  target/s390x: Implement processor-assist insn
  target/s390x: Implement execution-hint insns
  target/s390x: Mark STFLE_53 facility as available
  target/s390x: Implement load-and-zero-rightmost-byte insns
  target/s390x: Implement load-on-condition-2 insns
  target/s390x: Mark FPSEH facility as available
  target/s390x: implement mvcos instruction
  target/s390x: change PSW_SHIFT_KEY
  target/s390x: Map existing FAC_* names to S390_FEAT_* names

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agotarget/s390x: Implement idte instruction
David Hildenbrand [Thu, 22 Jun 2017 09:41:51 +0000 (11:41 +0200)]
target/s390x: Implement idte instruction

Let's keep it very simple for now and flush the complete tlb,
we currently can't find the right entries in our tlb, we would have
to store the used tables for each element.

As we now fully implement the DAT-enhancement facility, we can allow to
enable it for the qemu CPU model.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170622094151.28633-4-david@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Improve heuristic for ipte
David Hildenbrand [Thu, 22 Jun 2017 09:41:50 +0000 (11:41 +0200)]
target/s390x: Improve heuristic for ipte

If only the page index is set, most likely we don't have a valid
virtual address. Let's do a full tlb flush for that case.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170622094151.28633-3-david@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Indicate and check for local tlb clearing
David Hildenbrand [Thu, 22 Jun 2017 09:41:49 +0000 (11:41 +0200)]
target/s390x: Indicate and check for local tlb clearing

Let's allow to enable it for the qemu cpu model and correctly emulate
it.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170622094151.28633-2-david@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Clean up TB flag bits
Richard Henderson [Mon, 19 Jun 2017 04:11:48 +0000 (21:11 -0700)]
target/s390x: Clean up TB flag bits

Most of the PSW bits that were being copied into TB->flags
are not relevant to translation.  Removing those that are
unnecessary reduces the amount of translation required.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Finish implementing ETF2-ENH
Richard Henderson [Sat, 17 Jun 2017 00:37:59 +0000 (17:37 -0700)]
target/s390x: Finish implementing ETF2-ENH

Missed the proper alignment in TRTO/TRTT, and ignoring the M3
field for all TRXX insns without ETF2-ENH.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Mark STFLE_49 facility as available
Richard Henderson [Sat, 17 Jun 2017 00:16:24 +0000 (17:16 -0700)]
target/s390x: Mark STFLE_49 facility as available

This facility bit includes execution-hint, load-and-trap,
miscellaneous-instruction-extensions and processor-assist.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Implement processor-assist insn
Richard Henderson [Sat, 17 Jun 2017 00:15:39 +0000 (17:15 -0700)]
target/s390x: Implement processor-assist insn

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Implement execution-hint insns
Richard Henderson [Sat, 17 Jun 2017 00:05:50 +0000 (17:05 -0700)]
target/s390x: Implement execution-hint insns

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Mark STFLE_53 facility as available
Richard Henderson [Fri, 16 Jun 2017 23:49:28 +0000 (16:49 -0700)]
target/s390x: Mark STFLE_53 facility as available

This facility bit includes load-on-condition-2 and
load-and-zero-rightmost-byte.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Implement load-and-zero-rightmost-byte insns
Richard Henderson [Fri, 16 Jun 2017 23:47:51 +0000 (16:47 -0700)]
target/s390x: Implement load-and-zero-rightmost-byte insns

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Implement load-on-condition-2 insns
Richard Henderson [Fri, 16 Jun 2017 23:35:34 +0000 (16:35 -0700)]
target/s390x: Implement load-on-condition-2 insns

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Mark FPSEH facility as available
Richard Henderson [Thu, 15 Jun 2017 21:14:06 +0000 (14:14 -0700)]
target/s390x: Mark FPSEH facility as available

This facility bit includes DFP-rounding, FPR-GR-transfer,
FPS-sign-handling, and IEEE-exception-simulation.  We do
support all of these.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: implement mvcos instruction
David Hildenbrand [Wed, 14 Jun 2017 13:38:19 +0000 (15:38 +0200)]
target/s390x: implement mvcos instruction

This adds support for the MOVE WITH OPTIONAL SPECIFICATIONS (MVCOS)
instruction. Allow to enable it for the qemu cpu model using

qemu-system-s390x ... -cpu qemu,mvcos=on ...

This allows to boot linux kernel that uses it for uacccess.

We are missing (as for most other part) low address protection checks,
PSW key / storage key checks and support for AR-mode.

We fake an ADDRESSING exception when called from problem state (which
seems to rely on PSW key checks to be in place) and if AR-mode is used.
user mode will always see a PRIVILEDGED exception.

This patch is based on an original patch by Miroslav Benes (thanks!).

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170614133819.18480-3-david@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: change PSW_SHIFT_KEY
David Hildenbrand [Wed, 14 Jun 2017 13:38:18 +0000 (15:38 +0200)]
target/s390x: change PSW_SHIFT_KEY

Such shifts are usually used to easily extract the PSW KEY from the PSW
mask, so let's avoid the confusing offset of 4.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170614133819.18480-2-david@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agotarget/s390x: Map existing FAC_* names to S390_FEAT_* names
Richard Henderson [Thu, 15 Jun 2017 02:24:16 +0000 (19:24 -0700)]
target/s390x: Map existing FAC_* names to S390_FEAT_* names

The FAC_ names were placeholders prior to the introduction
of the current facility modeling.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
6 years agoMerge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20170622' into staging
Peter Maydell [Fri, 23 Jun 2017 15:19:04 +0000 (16:19 +0100)]
Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20170622' into staging

pull-seccomp-20170622

# gpg: Signature made Thu 22 Jun 2017 09:01:01 BST
# gpg:                using RSA key 0xDF32E7C0F0FFF9A2
# gpg: Good signature from "Eduardo Otubo (Senior Software Engineer) <otubo@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: D67E 1B50 9374 86B4 0723  DBAB DF32 E7C0 F0FF F9A2

* remotes/otubo/tags/pull-seccomp-20170622:
  MAINTAINERS: seccomp: change email contact for Eduardo Otubo

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/queue/misc-pull-request' into staging
Peter Maydell [Fri, 23 Jun 2017 14:40:09 +0000 (15:40 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/queue/misc-pull-request' into staging

# gpg: Signature made Fri 23 Jun 2017 13:48:04 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# 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>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/queue/misc-pull-request:
  applesmc: fix port i/o access width
  applesmc: implement error status port
  applesmc: cosmetic whitespace and indentation cleanup

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoui/cocoa.m: add Speed menu
John Arbuckle [Wed, 14 Jun 2017 03:17:38 +0000 (23:17 -0400)]
ui/cocoa.m: add Speed menu

Programs running inside of QEMU can sometimes use more CPU time than is really
needed. To solve this problem, we just need to throttle the virtual CPU. This
feature will stop laptops from burning up.

This patch adds a menu called Speed that has menu items from 100% to 1% that
represent the speed options. 100% is full speed and 1% is slowest.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Message-id: D6FAAABF-064D-49C0-B572-C73679F34052@gmail.com
[PMM: Moved "mark 100% menu item as checked initially" code to
 after menu item is allocated, not before it]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoapplesmc: fix port i/o access width
Gabriel L. Somlo [Fri, 16 Jun 2017 18:55:16 +0000 (14:55 -0400)]
applesmc: fix port i/o access width

Set access width of all AppleSMC i/o regions to 1 byte, since they
all represent 8-bit-wide ports.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Message-id: 1497639316-22202-4-git-send-email-gsomlo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agoapplesmc: implement error status port
Gabriel L. Somlo [Fri, 16 Jun 2017 18:55:15 +0000 (14:55 -0400)]
applesmc: implement error status port

As of release 10.12.4, OS X (Sierra) refuses to boot unless the
AppleSMC supports an additional I/O port, expected to provide an
error status code.

Update the [cmd|data]_write() and data_read() methods to implement
the required state machine, and add I/O region & methods to handle
access to the error port.

Originally proposed by Eric Shelton <eshelton@pobox.com> based in
part on FakeSMC (git://git.assembla.com/fakesmc.git).

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1497639316-22202-3-git-send-email-gsomlo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agoapplesmc: cosmetic whitespace and indentation cleanup
Gabriel L. Somlo [Fri, 16 Jun 2017 18:55:14 +0000 (14:55 -0400)]
applesmc: cosmetic whitespace and indentation cleanup

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu>
Message-id: 1497639316-22202-2-git-send-email-gsomlo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/ui-and-input-20170623-pull-request...
Peter Maydell [Fri, 23 Jun 2017 11:00:21 +0000 (12:00 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/ui-and-input-20170623-pull-request' into staging

# gpg: Signature made Fri 23 Jun 2017 11:39:22 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# 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>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-and-input-20170623-pull-request:
  ps2: reset queue in ps2_reset_keyboard
  ps2: add ps2_reset_queue
  ps2: add and use PS2State typedef
  sdl2: add assert to make coverity happy
  hid: Reset kbd modifiers on reset
  input: Decrement queue count on kbd delay
  keymaps: add tracing

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agops2: reset queue in ps2_reset_keyboard
Gerd Hoffmann [Tue, 6 Jun 2017 11:21:05 +0000 (13:21 +0200)]
ps2: reset queue in ps2_reset_keyboard

When the guest resets the keyboard also clear the queue.  It is highly
unlikely that the guest is still interested in the events stuck in the
queue, and it avoids confusing the guest in case the queue is full and
the ACK can't be queued up.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1372583
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170606112105.13331-4-kraxel@redhat.com

6 years agops2: add ps2_reset_queue
Gerd Hoffmann [Tue, 6 Jun 2017 11:21:04 +0000 (13:21 +0200)]
ps2: add ps2_reset_queue

Factor out ps2 queue reset to a separate function.
No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170606112105.13331-3-kraxel@redhat.com

6 years agops2: add and use PS2State typedef
Gerd Hoffmann [Tue, 6 Jun 2017 11:21:03 +0000 (13:21 +0200)]
ps2: add and use PS2State typedef

Cleanup: Create and use a typedef for PS2State and stop passing void
pointers.  No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170606112105.13331-2-kraxel@redhat.com

6 years agosdl2: add assert to make coverity happy
Gerd Hoffmann [Wed, 21 Jun 2017 12:22:34 +0000 (14:22 +0200)]
sdl2: add assert to make coverity happy

There is a loop a few lines up counting consoles and setting
sdl2_num_outputs accordingly, so con ptr can't be NULL there.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170621122234.12751-1-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agohid: Reset kbd modifiers on reset
Alexander Graf [Thu, 22 Jun 2017 07:41:35 +0000 (09:41 +0200)]
hid: Reset kbd modifiers on reset

When resetting the keyboard, we need to reset not just the pending keystrokes,
but also any pending modifiers. Otherwise there's a race when we're getting
reset while running an escape sequence (modifier 0x100).

Cc: qemu-stable@nongnu.org
Signed-off-by: Alexander Graf <agraf@suse.de>
Message-id: 1498117295-162030-1-git-send-email-agraf@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agoinput: Decrement queue count on kbd delay
Alexander Graf [Thu, 22 Jun 2017 07:41:58 +0000 (09:41 +0200)]
input: Decrement queue count on kbd delay

Delays in the input layer are special cased input events. Every input
event is accounted for in a global intput queue count. The special cased
delays however did not get removed from the queue, leading to queue overruns
and thus silent key drops after typing quite a few characters.

Signed-off-by: Alexander Graf <agraf@suse.de>
Message-id: 1498117318-162102-1-git-send-email-agraf@suse.de
Fixes: be1a7176 ("input: add support for kbd delays")
Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agokeymaps: add tracing
Gerd Hoffmann [Tue, 6 Jun 2017 13:47:36 +0000 (15:47 +0200)]
keymaps: add tracing

Drop commented debug logging, add trace points instead.

Also cleanup parser code a bit, the key name is copied into a new
variable instead of patching the input line, that way we can log
the unmodified line.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170606134736.26080-1-kraxel@redhat.com

6 years agoMerge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.10-pull-request' into...
Peter Maydell [Thu, 22 Jun 2017 18:01:58 +0000 (19:01 +0100)]
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.10-pull-request' into staging

# gpg: Signature made Wed 21 Jun 2017 22:00:24 BST
# gpg:                using RSA key 0xF30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier/tags/m68k-for-2.10-pull-request:
  target-m68k: add FPCR and FPSR
  target-m68k: define 96bit FP registers for gdb on 680x0
  target-m68k: use floatx80 internally
  target-m68k: initialize FPU registers
  target-m68k: move fmove CR to a function

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/usb-20170621-pull-request' into...
Peter Maydell [Thu, 22 Jun 2017 14:09:48 +0000 (15:09 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20170621-pull-request' into staging

# gpg: Signature made Wed 21 Jun 2017 16:43:14 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# 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>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20170621-pull-request:
  usb-host: support devices with sparse/non-sequential USB interfaces

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/stsquad/tags/pull-ci-updates-210617-2' into...
Peter Maydell [Thu, 22 Jun 2017 13:33:41 +0000 (14:33 +0100)]
Merge remote-tracking branch 'remotes/stsquad/tags/pull-ci-updates-210617-2' into staging

This is mostly Philippe's updates

We add the following cross-compile targets:
  - mipsel-softmmu,mipsel-linux-user,mips64el-linux-user
  - armeb-linux-user

While I was rolling I discovered we could also back out a bunch of the
emdebian hacks as the newly released stretch handles cross compilers
as first class citizens. Unfortunately this also meant I had to drop
the powerpc support as that is no longer in Debian stable.

# gpg: Signature made Wed 21 Jun 2017 15:09:50 BST
# gpg:                using RSA key 0xFBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-ci-updates-210617-2: (21 commits)
  MAINTAINERS: self-appoint me as reviewer in build/test automation
  MAINTAINERS: add Shippable automation platform URL
  shippable: add mipsel target
  shippable: add armeb-linux-user target
  shippable: be verbose while building docker images
  shippable: do not initialize submodules automatically
  shippable: build using all available cpus
  shippable: use C locale to simplify console output
  docker: add mipsel build target
  docker: add extra libs to s390x target to extend codebase coverage
  docker: add extra libs to arm64 target to extend codebase coverage
  docker: add extra libs to armhf target to extend codebase coverage
  docker: use eatmydata in debian arm64 image
  docker: use eatmydata in debian armhf image
  docker: use eatmydata, install common build packages in base image
  docker: use better regex to generate deb-src entries
  docker: install ca-certificates package in base image
  docker: rebuild image if 'extra files' checksum does not match
  docker: add --include-files argument to 'build' command
  docker: let _copy_with_mkdir() sub_path argument be optional
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/queue/ui-pull-request' into staging
Peter Maydell [Thu, 22 Jun 2017 12:18:11 +0000 (13:18 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/queue/ui-pull-request' into staging

# gpg: Signature made Wed 21 Jun 2017 14:23:31 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# 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>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/queue/ui-pull-request:
  ui: Remove inclusion of "hw/qdev.h"
  console: remove do_safe_dpy_refresh
  gtk: use framebuffer helper functions.
  sdl2: use framebuffer helper functions.
  egl-headless: use framebuffer helper functions.
  egl-helpers: add helpers to handle opengl framebuffers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-06-09-v2' into staging
Peter Maydell [Thu, 22 Jun 2017 10:34:38 +0000 (11:34 +0100)]
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-06-09-v2' into staging

QAPI patches for 2017-06-09

# gpg: Signature made Tue 20 Jun 2017 13:31:39 BST
# gpg:                using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2017-06-09-v2: (41 commits)
  tests/qdict: check more get_try_int() cases
  console: use get_uint() for "head" property
  i386/cpu: use get_uint() for "min-level"/"min-xlevel" properties
  numa: use get_uint() for "size" property
  pnv-core: use get_uint() for "core-pir" property
  pvpanic: use get_uint() for "ioport" property
  auxbus: use get_uint() for "addr" property
  arm: use get_uint() for "mp-affinity" property
  xen: use get_uint() for "max-ram-below-4g" property
  pc: use get_uint() for "hpet-intcap" property
  pc: use get_uint() for "apic-id" property
  pc: use get_uint() for "iobase" property
  acpi: use get_uint() for "pci-hole*" properties
  acpi: use get_uint() for various acpi properties
  acpi: use get_uint() for "acpi-pcihp-io*" properties
  platform-bus: use get_uint() for "addr" property
  bcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base"
  aspeed: use {set, get}_uint() for "ram-size" property
  pcihp: use get_uint() for "bsel" property
  pc-dimm: make "size" property uint64
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170619' into staging
Peter Maydell [Thu, 22 Jun 2017 09:25:03 +0000 (10:25 +0100)]
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170619' into staging

Queued TCG patches

# gpg: Signature made Mon 19 Jun 2017 19:12:06 BST
# gpg:                using RSA key 0xAD1270CC4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg:                 aka "Richard Henderson <rth@redhat.com>"
# gpg:                 aka "Richard Henderson <rth@twiddle.net>"
# Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B

* remotes/rth/tags/pull-tcg-20170619:
  target/arm: Exit after clearing aarch64 interrupt mask
  target/s390x: Exit after changing PSW mask
  target/alpha: Use tcg_gen_lookup_and_goto_ptr
  tcg: Increase hit rate of lookup_tb_ptr
  tcg/arm: Use ldr (literal) for goto_tb
  tcg/arm: Try pc-relative addresses for movi
  tcg/arm: Remove limit on code buffer size
  tcg/arm: Use indirect branch for goto_tb
  tcg/aarch64: Use ADR in tcg_out_movi
  translate-all: consolidate tb init in tb_gen_code
  tcg: allocate TB structs before the corresponding translated code
  util: add cacheinfo

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMAINTAINERS: seccomp: change email contact for Eduardo Otubo
otubo [Thu, 22 Jun 2017 07:58:00 +0000 (09:58 +0200)]
MAINTAINERS: seccomp: change email contact for Eduardo Otubo

Signed-off-by: Eduardo Otubo <otubo@redhat.com>
6 years agotarget-m68k: add FPCR and FPSR
Laurent Vivier [Tue, 20 Jun 2017 20:51:20 +0000 (22:51 +0200)]
target-m68k: add FPCR and FPSR

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20170620205121.26515-6-laurent@vivier.eu>

6 years agotarget-m68k: define 96bit FP registers for gdb on 680x0
Laurent Vivier [Tue, 20 Jun 2017 20:51:19 +0000 (22:51 +0200)]
target-m68k: define 96bit FP registers for gdb on 680x0

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20170620205121.26515-5-laurent@vivier.eu>

6 years agotarget-m68k: use floatx80 internally
Laurent Vivier [Tue, 20 Jun 2017 20:51:18 +0000 (22:51 +0200)]
target-m68k: use floatx80 internally

Coldfire uses float64, but 680x0 use floatx80.
This patch introduces the use of floatx80 internally
and enables 680x0 80bits FPU.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20170620205121.26515-4-laurent@vivier.eu>

6 years agotarget-m68k: initialize FPU registers
Laurent Vivier [Tue, 20 Jun 2017 20:51:17 +0000 (22:51 +0200)]
target-m68k: initialize FPU registers

on reset, set FP registers to NaN and control registers to 0

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20170620205121.26515-3-laurent@vivier.eu>

6 years agotarget-m68k: move fmove CR to a function
Laurent Vivier [Tue, 20 Jun 2017 20:51:16 +0000 (22:51 +0200)]
target-m68k: move fmove CR to a function

Move code of fmove to/from control register to a function

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170620205121.26515-2-laurent@vivier.eu>

6 years agoMAINTAINERS: self-appoint me as reviewer in build/test automation
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:30 +0000 (15:56 -0300)]
MAINTAINERS: self-appoint me as reviewer in build/test automation

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agoMAINTAINERS: add Shippable automation platform URL
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:29 +0000 (15:56 -0300)]
MAINTAINERS: add Shippable automation platform URL

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agoshippable: add mipsel target
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:28 +0000 (15:56 -0300)]
shippable: add mipsel target

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[AJB: fixups after dropping powerpc]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agoshippable: add armeb-linux-user target
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:26 +0000 (15:56 -0300)]
shippable: add armeb-linux-user target

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agoshippable: be verbose while building docker images
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:25 +0000 (15:56 -0300)]
shippable: be verbose while building docker images

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agoshippable: do not initialize submodules automatically
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:24 +0000 (15:56 -0300)]
shippable: do not initialize submodules automatically

instead do it in the 'ci' target when needed.

for mips64el-softmmu target:
use dtc submodule if distrib packages are too old.

example with outdated libfdt on mips64el-softmmu target (required is >= 1.4.2):
 # dpkg-query --showformat='${Version}\n' --show libfdt-dev
 1.4.0+dfsg-1

shippable output:
----------------
  LINK    mips64el-softmmu/qemu-system-mips64el
../hw/core/loader-fit.o: In function `load_fit':
/root/src/github.com/philmd/qemu/hw/core/loader-fit.c:278: undefined reference to `fdt_first_subnode'
/root/src/github.com/philmd/qemu/hw/core/loader-fit.c:286: undefined reference to `fdt_next_subnode'
/root/src/github.com/philmd/qemu/hw/core/loader-fit.c:277: undefined reference to `fdt_first_subnode'
collect2: error: ld returned 1 exit status
Makefile:201: recipe for target 'qemu-system-mips64el' failed
make[1]: *** [qemu-system-mips64el] Error 1
Makefile:327: recipe for target 'subdir-mips64el-softmmu' failed
make: *** [subdir-mips64el-softmmu] Error 2

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agoshippable: build using all available cpus
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:23 +0000 (15:56 -0300)]
shippable: build using all available cpus

As of this commit:

$ echo "container proc:" `getconf _NPROCESSORS_ONLN` `getconf _NPROCESSORS_CONF`
container proc: 2 2

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agoshippable: use C locale to simplify console output
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:22 +0000 (15:56 -0300)]
shippable: use C locale to simplify console output

remove this noise:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = "en_US.UTF-8",
    LC_CTYPE = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: add mipsel build target
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:20 +0000 (15:56 -0300)]
docker: add mipsel build target

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[AJB: remove apt-fake kludge]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: add extra libs to s390x target to extend codebase coverage
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:19 +0000 (15:56 -0300)]
docker: add extra libs to s390x target to extend codebase coverage

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: add extra libs to arm64 target to extend codebase coverage
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:18 +0000 (15:56 -0300)]
docker: add extra libs to arm64 target to extend codebase coverage

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: add extra libs to armhf target to extend codebase coverage
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:17 +0000 (15:56 -0300)]
docker: add extra libs to armhf target to extend codebase coverage

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: use eatmydata in debian arm64 image
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:16 +0000 (15:56 -0300)]
docker: use eatmydata in debian arm64 image

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: use eatmydata in debian armhf image
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:15 +0000 (15:56 -0300)]
docker: use eatmydata in debian armhf image

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: use eatmydata, install common build packages in base image
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:14 +0000 (15:56 -0300)]
docker: use eatmydata, install common build packages in base image

The common build packages are: build-essential clang git bison flex

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[AJB: fixups following stretch update]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: use better regex to generate deb-src entries
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:13 +0000 (15:56 -0300)]
docker: use better regex to generate deb-src entries

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[AJB: fixed up following dropping emdebian]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: install ca-certificates package in base image
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:11 +0000 (15:56 -0300)]
docker: install ca-certificates package in base image

Resolve SSL verification issue at shippable container's git_sync stage:

shippable logs:
--------------
git_sync
- ssh-agent bash -c 'ssh-add /tmp/ssh/01_deploy; git clone https://github.com/philmd/qemu.git /root/src/github.com/philmd/qemu'
Identity added: /tmp/ssh/01_deploy (rsa w/o comment)
Cloning into '/root/src/github.com/philmd/qemu'...
fatal: unable to access 'https://github.com/philmd/qemu.git/': Problem with the SSL CA cert (path? access rights?)
retrying 1 of 3 times...

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[AJB: fixed re-base conflict following stretch updates]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: rebuild image if 'extra files' checksum does not match
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:09 +0000 (15:56 -0300)]
docker: rebuild image if 'extra files' checksum does not match

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: add --include-files argument to 'build' command
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:08 +0000 (15:56 -0300)]
docker: add --include-files argument to 'build' command

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: let _copy_with_mkdir() sub_path argument be optional
Philippe Mathieu-Daudé [Fri, 2 Jun 2017 18:56:07 +0000 (15:56 -0300)]
docker: let _copy_with_mkdir() sub_path argument be optional

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agodocker: update qemu:debian base following stretch release
Alex Bennée [Wed, 21 Jun 2017 13:21:33 +0000 (14:21 +0100)]
docker: update qemu:debian base following stretch release

Debian has now released Stretch as its new stable. As we track
debian:stable-slim this has a few consequences. For one thing we can
now drop the emdebian hacks as cross compilers are part of the
official repositories now. However we do loose the ability to build
against powerpc (not ppc64) since that is no longer a release
architecture.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 years agousb-host: support devices with sparse/non-sequential USB interfaces
Samuel Brian [Tue, 13 Jun 2017 23:40:39 +0000 (09:40 +1000)]
usb-host: support devices with sparse/non-sequential USB interfaces

Some USB devices have sparse interface numbering which is not able to be
passthroughed.
For example, the Sierra Wireless MC7455/MC7430:

  # lsusb  -D /dev/bus/usb/003/003 | egrep '1199|9071|bNumInterfaces|bInterfaceNumber'
  Device: ID 1199:9071 Sierra Wireless, Inc.
    idVendor           0x1199 Sierra Wireless, Inc.
    idProduct          0x9071
      bNumInterfaces          5
        bInterfaceNumber        0
        bInterfaceNumber        2
        bInterfaceNumber        3
        bInterfaceNumber        8
        bInterfaceNumber       10

In this case, the interface numbers are 0, 2, 3, 8, 10 and not the
0, 1, 2, 3, 4 that QEMU tries to claim.

This change allows sparse USB interface numbering.
Instead of only claiming the interfaces in the range reported by the USB
device through bNumInterfaces, QEMU attempts to claim all possible
interfaces.

v2 to fix broken v1 patch formatting.
v3 to fix indentation.

Signed-off-by: Samuel Brian <sam.brian@accelerated.com>
Message-id: 20170613234039.27201-1-sam.brian@accelerated.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agoui: Remove inclusion of "hw/qdev.h"
Thomas Huth [Mon, 19 Jun 2017 17:50:17 +0000 (19:50 +0200)]
ui: Remove inclusion of "hw/qdev.h"

Looks like #include "hw/qdev.h" is not needed here, so remove it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 1497894617-12143-1-git-send-email-thuth@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agoconsole: remove do_safe_dpy_refresh
Gerd Hoffmann [Wed, 14 Jun 2017 08:45:38 +0000 (10:45 +0200)]
console: remove do_safe_dpy_refresh

Drop the temporary workaround for the broken display updates.
All display adapters are updated, so this should be safe without
causing regressions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20170614084538.32480-1-kraxel@redhat.com

6 years agogtk: use framebuffer helper functions.
Gerd Hoffmann [Wed, 14 Jun 2017 08:41:49 +0000 (10:41 +0200)]
gtk: use framebuffer helper functions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170614084149.31314-5-kraxel@redhat.com

6 years agosdl2: use framebuffer helper functions.
Gerd Hoffmann [Wed, 14 Jun 2017 08:41:48 +0000 (10:41 +0200)]
sdl2: use framebuffer helper functions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170614084149.31314-4-kraxel@redhat.com

6 years agoegl-headless: use framebuffer helper functions.
Gerd Hoffmann [Wed, 14 Jun 2017 08:41:47 +0000 (10:41 +0200)]
egl-headless: use framebuffer helper functions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170614084149.31314-3-kraxel@redhat.com

6 years agoegl-helpers: add helpers to handle opengl framebuffers
Gerd Hoffmann [Wed, 14 Jun 2017 08:41:46 +0000 (10:41 +0200)]
egl-helpers: add helpers to handle opengl framebuffers

Add a collection of egl_fb_*() helper functions to manage and use opengl
framebuffers, which is a common pattern in UI code with opengl support.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170614084149.31314-2-kraxel@redhat.com

6 years agotcg/tci: fix tcg-interpreter build
Philippe Mathieu-Daudé [Tue, 20 Jun 2017 16:30:09 +0000 (13:30 -0300)]
tcg/tci: fix tcg-interpreter build

fix regression from commit 244f144134:

    $ make subdir-arm-softmmu
    make[1]: *** No rule to make target 'tci.o', needed by 'qemu-system-arm'.  Stop.
    Makefile:328: recipe for target 'subdir-arm-softmmu' failed
    make: *** [subdir-arm-softmmu] Error 2

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170620163009.21764-1-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
Peter Maydell [Tue, 20 Jun 2017 16:12:41 +0000 (17:12 +0100)]
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pc: fixes, cleanups, features

Some fixes and cleanups. Extended TSEG sizes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 16 Jun 2017 16:45:07 BST
# gpg:                using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  hw/i386: fix nvdimm check error path
  intel_iommu: cleanup vtd_interrupt_remap_msi()
  intel_iommu: cleanup vtd_{do_}iommu_translate()
  intel_iommu: switching the rest DPRINTF to trace
  tests/q35-test: add TSEG size checks
  tests/q35-test: push down qtest_start / qtest_end to test case(s)
  q35/mch: implement extended TSEG sizes

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/famz/tags/docker-and-block-pull-request' into...
Peter Maydell [Tue, 20 Jun 2017 15:01:15 +0000 (16:01 +0100)]
Merge remote-tracking branch 'remotes/famz/tags/docker-and-block-pull-request' into staging

# gpg: Signature made Fri 16 Jun 2017 01:18:46 BST
# gpg:                using RSA key 0xCA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/docker-and-block-pull-request: (23 commits)
  block: make accounting thread-safe
  block: split BlockAcctStats creation and setup
  block: introduce block_account_one_io
  block: protect modification of dirty bitmaps with a mutex
  migration/block: reset dirty bitmap before reading
  block: introduce dirty_bitmap_mutex
  block: protect tracked_requests and flush_queue with reqs_lock
  block: access write_gen with atomics
  block: use Stat64 for wr_highest_offset
  util: add stats64 module
  throttle-groups: protect throttled requests with a CoMutex
  throttle-groups: do not use qemu_co_enter_next
  throttle-groups: only start one coroutine from drained_begin
  block: access io_plugged with atomic ops
  block: access wakeup with atomic ops
  block: access serialising_in_flight with atomic ops
  block: access io_limits_disabled with atomic ops
  block: access quiesce_counter with atomic ops
  block: access copy_on_read with atomic ops
  docker: Add flex and bison to centos6 image
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
Peter Maydell [Tue, 20 Jun 2017 13:20:34 +0000 (14:20 +0100)]
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* nbd and qemu-nbd fixes (Eric, Max)
* nbd refactoring (Vladimir)
* vhost-user-scsi, take N+1 (Felipe)
* replace memory_region_set_fd with memory_region_init_ram_from_fd (Marc-André)
* docs/ movement (Paolo)
* megasas TOCTOU fixes (Paolo)
* make async_safe_run_on_cpu work on kvm/hax accelerators (Paolo)
* Build system and poison.h improvements (Thomas)
* -accel thread=xxx fix (Thomas)
* move files to accel/ (Yang Zhong)

# gpg: Signature made Thu 15 Jun 2017 10:51:55 BST
# gpg:                using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream: (41 commits)
  vhost-user-scsi: Introduce a vhost-user-scsi sample application
  vhost-user-scsi: Introduce vhost-user-scsi host device
  qemu-doc: include version number
  docs: create interop/ subdirectory
  include/exec/poison: Mark some CONFIG defines as poisoned, too
  include/exec/poison: Add missing TARGET defines
  nbd/server: refactor nbd_trip
  nbd/server: rename rc to ret
  nbd/server: get rid of fail: return rc
  nbd/server: nbd_negotiate: fix error path
  nbd/server: remove NBDClientNewData
  nbd/server: refactor nbd_co_receive_request
  nbd/server: get rid of EAGAIN dead code
  nbd/server: refactor nbd_co_send_reply
  nbd/server: get rid of ssize_t
  nbd/server: get rid of nbd_negotiate_read and friends
  nbd: make nbd_drop public
  nbd: rename read_sync and friends
  accel: move kvm related accelerator files into accel/
  tcg: move tcg backend files into accel/tcg/
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agotests/qdict: check more get_try_int() cases
Marc-André Lureau [Wed, 7 Jun 2017 16:36:33 +0000 (20:36 +0400)]
tests/qdict: check more get_try_int() cases

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20170607163635.17635-42-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoconsole: use get_uint() for "head" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:32 +0000 (20:36 +0400)]
console: use get_uint() for "head" property

TYPE_QEMU_CONSOLE property "head" is defined with
object_property_add_uint*_ptr().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-41-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoi386/cpu: use get_uint() for "min-level"/"min-xlevel" properties
Marc-André Lureau [Wed, 7 Jun 2017 16:36:31 +0000 (20:36 +0400)]
i386/cpu: use get_uint() for "min-level"/"min-xlevel" properties

These are properties of TYPE_X86_CPU, defined with DEFINE_PROP_UINT32()

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-40-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agonuma: use get_uint() for "size" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:30 +0000 (20:36 +0400)]
numa: use get_uint() for "size" property

"size" is a property of TYPE_MEMORY_BACKEND.
host_memory_backend_get_size() and host_memory_backend_set_size() use
visit_type_size().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-39-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agopnv-core: use get_uint() for "core-pir" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:29 +0000 (20:36 +0400)]
pnv-core: use get_uint() for "core-pir" property

This is an alias of TYPE_PNV_CORE's property "pir", which is defined
with DEFINE_PROP_UINT32()

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-38-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agopvpanic: use get_uint() for "ioport" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:28 +0000 (20:36 +0400)]
pvpanic: use get_uint() for "ioport" property

TYPE_ISA_PVPANIC_DEVICE's property PVPANIC_IOPORT_PROP is defined with
DEFINE_PROP_UINT16().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-37-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoauxbus: use get_uint() for "addr" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:27 +0000 (20:36 +0400)]
auxbus: use get_uint() for "addr" property

This is TYPE_MEMORY_REGION's property.  Its getter
memory_region_get_addr() uses visit_type_uint64().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-36-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoarm: use get_uint() for "mp-affinity" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:26 +0000 (20:36 +0400)]
arm: use get_uint() for "mp-affinity" property

TYPE_ARM_CPU's property "mp-affinity" is defined with
DEFINE_PROP_UINT64().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-35-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoxen: use get_uint() for "max-ram-below-4g" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:25 +0000 (20:36 +0400)]
xen: use get_uint() for "max-ram-below-4g" property

TYPE_PC_MACHINE's property PC_MACHINE_MAX_RAM_BELOW_4G's getter and
setter pc_machine_get_max_ram_below_4g() and
pc_machine_set_max_ram_below_4g() use visit_type_size()

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-34-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agopc: use get_uint() for "hpet-intcap" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:24 +0000 (20:36 +0400)]
pc: use get_uint() for "hpet-intcap" property

TYPE_HPET's property HPET_INTCAP is defined with DEFINE_PROP_UINT32().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-33-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agopc: use get_uint() for "apic-id" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:23 +0000 (20:36 +0400)]
pc: use get_uint() for "apic-id" property

TYPE_X86_CPU's property "apic-id" is defined with DEFINE_PROP_UINT32().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-32-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agopc: use get_uint() for "iobase" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:22 +0000 (20:36 +0400)]
pc: use get_uint() for "iobase" property

TYPE_ISA_FDC's property "iobase" is defined with DEFINE_PROP_UINT32().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-31-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoacpi: use get_uint() for "pci-hole*" properties
Marc-André Lureau [Wed, 7 Jun 2017 16:36:21 +0000 (20:36 +0400)]
acpi: use get_uint() for "pci-hole*" properties

Those properties use visit_type_uint*()

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-30-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoacpi: use get_uint() for various acpi properties
Marc-André Lureau [Wed, 7 Jun 2017 16:36:20 +0000 (20:36 +0400)]
acpi: use get_uint() for various acpi properties

PIIX4: piix4_pm_add_propeties() defines these with
object_property_add_uint*_ptr().

Q35: ich9_lpc_add_properties() and ich9_pm_add_properties() define them
similarly, except for ACPI_PM_PROP_GPE0_BLK().  That one's getter
ich9_pm_get_gpe0_blk() uses visit_type_uint32().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-29-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoacpi: use get_uint() for "acpi-pcihp-io*" properties
Marc-André Lureau [Wed, 7 Jun 2017 16:36:19 +0000 (20:36 +0400)]
acpi: use get_uint() for "acpi-pcihp-io*" properties

Those are defined with object_property_add_uint16_ptr()

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-28-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoplatform-bus: use get_uint() for "addr" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:18 +0000 (20:36 +0400)]
platform-bus: use get_uint() for "addr" property

This is TYPE_MEMORY_REGION's property.  Its getter
memory_region_get_addr() uses visit_type_uint64().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-27-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agobcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base"
Marc-André Lureau [Wed, 7 Jun 2017 16:36:17 +0000 (20:36 +0400)]
bcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base"

Both properties are defined with DEFINE_PROP_UINT32().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-26-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agoaspeed: use {set, get}_uint() for "ram-size" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:16 +0000 (20:36 +0400)]
aspeed: use {set, get}_uint() for "ram-size" property

This property is an alias for device TYPE_ASPEED_SDMC's property
"ram-size", which is defined with DEFINE_PROP_UINT64().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-25-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
6 years agopcihp: use get_uint() for "bsel" property
Marc-André Lureau [Wed, 7 Jun 2017 16:36:15 +0000 (20:36 +0400)]
pcihp: use get_uint() for "bsel" property

The property is defined with object_property_add_uint32_ptr()

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-24-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>