Commit graph

59161 commits

Author SHA1 Message Date
Gerd Hoffmann 6b71ea1138 keymap: numpad keysyms and keycodes are fixed
No need to figure them at runtime from the keymap.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180222070513.8740-4-kraxel@redhat.com
2018-02-22 10:35:22 +01:00
Gerd Hoffmann d713e3fd4c keymap: use glib hash for kbd_layout_t
Drop home-grown lookup code, which is a strange mix of a lookup table
and a list.  Use standard glib hash instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180222070513.8740-3-kraxel@redhat.com
2018-02-22 10:35:17 +01:00
Gerd Hoffmann fe5fca9a03 keymap: make struct kbd_layout_t private to ui/keymaps.c
Also use kbd_layout_t pointers instead of void pointers.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180222070513.8740-2-kraxel@redhat.com
2018-02-22 10:35:14 +01:00
Gerd Hoffmann 4112621420 egl-helpers: add alpha channel to texture format
Needed when rendering cursers which (unlike framebuffers)
actually are transparent.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180220110433.20353-4-kraxel@redhat.com
2018-02-22 10:35:09 +01:00
Gerd Hoffmann b09169282b egl-headless: cursor_dmabuf: handle NULL cursor
The cursor dmabuf can be NULL, in case no cursor defined by the guest.
Happens for example when linux guests show the framebuffer console.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180220110433.20353-3-kraxel@redhat.com
2018-02-22 10:35:05 +01:00
Gerd Hoffmann 6e1f2cb560 console/opengl: split up dpy_gl_cursor ops
Split the cursor callback into two, one for setting the dmabuf,
one for setting the position.  Also add hotspot information.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180220110433.20353-2-kraxel@redhat.com
2018-02-22 10:35:00 +01:00
Gerd Hoffmann afb92eb985 sdl2: fix hotkey keyup
After some hotkey was pressed sdl2 doesn't forward the first modifier
keyup event to the guest, resulting in stuck modifier keys.

Fix the logic in handle_keyup().  Also gui_key_modifier_pressed doesn't
need to be a global variable.

Reported-by: Howard Spoelstra <hsp.cat7@gmail.com>
Tested-by: Howard Spoelstra <hsp.cat7@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180220150444.784-1-kraxel@redhat.com
2018-02-22 10:34:50 +01:00
Peter Maydell a6e0344fa0 ui: reorganize and cleanup display command line parsing.
gtk: fix gtk3 warnings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJajCbNAAoJEEy22O7T6HE4WQoQALwyAeX1+NhPqaMeGrNESiwi
 HKoMx2dgxskC6J6VyVA4XGANKiTXFmsKQxNFiU4F9EqVH9JhP7J6IehgYl8U4Jqg
 U2+nXFu/e0si1M6XBe08MbqM7WDMRpiviyI93oHkd3X1b/jWDCVf3M8MJCc5Lqnq
 HhAiVLu0K+PjaxsAdsCCoBAwZGgfCeiEcDFUR3utJSGHX0Eda3SMdDhtz695C2M7
 i8wQd58Soe/9hC7C7eTdkIt+XY8aogxVLCJS5S1IaeLxjs8QvnC+l0g4BSGViXaF
 sLsXVbA1LXxTZ/kr/Viox+1suDg9GP1Sota7Jss0Gdkriiv0+KQ6jhpFIi1P6zoq
 8wR9kMjFlwjKnVn1oCzbp4Y7YvmKI2gaWzVNRU8rHMUl9hIKquM4Ueqiu9UPTgSA
 fOzdb3PlH/pc5N0KnhrLlfwaclFzUZ2vQctPgycYROirraVH9AaJvoUJOA/CcEJt
 D6ffQyr9PQMHHBeT7/u7s+G3AWx7nX291pafQNwnWWZ8Dc7fhQVInIMJHR5U2xHM
 k5DRckFdp73awfrbv43n/nFmDH3/EGLl1E/SXVJLUE41SRCkkJpytdaatZFB4kOL
 AM8WoIM4QvuaM8mf0T1xHVq7YMHzI76eo5EwSQsRKn1BvI7ToGR4D/nd86iR3SEY
 h+1KTsrwy5LTXZEjUjdR
 =KFKI
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180220-pull-request' into staging

ui: reorganize and cleanup display command line parsing.
gtk: fix gtk3 warnings.

# gpg: Signature made Tue 20 Feb 2018 13:46:53 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# 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-20180220-pull-request:
  ui: Reorder vte terminal packing to avoid gtk3 warnings
  vl: drop display_type variable
  vl: drop request_opengl variable
  vl: drop full_screen variable
  cocoa: use DisplayOptions
  curses: use DisplayOptions
  egl-headless: use DisplayOptions
  vl: drop no_quit variable
  sdl: use DisplayOptions
  gtk: add and use DisplayOptions + DisplayGTK
  vl: rename DisplayType to LegacyDisplayType
  vl: deprecate -no-frame

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-20 14:05:00 +00:00
Peter Maydell b487e2b2ff Fix memory leak in synth backend.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEtIKLr5QxQM7yo0kQcdTV5YIvc9YFAlqLCY0ACgkQcdTV5YIv
 c9Zl4g/+JNNS87msMawtc30iLwZG/eS57xFYP3B5RJInarboGkPmGalgwXVfyl6b
 hNwZMfeeKHTI5rHDgp59i49BLASxGxdB6ye0Q4Znt7kF8KxOeyGeDN7P6oZD6vUh
 EIvhuNGdicHc3qpEvwAU9pwQ9HiFD6lKFnIUS0zBVofCHIJEwXA+X0F1eYto37Cp
 GBzGf1YVZSIBxOTx7Xqyv6NNerLBcn0henzy2LheEfTYZ9cj7RFT33o39MMa+fIz
 5aRp1Q1XyurDWJe6Ff8T4X3HjTfuvYA6TvG5M55nzZqleopHdrCc0bDKKdYZPQ/5
 khg88MkGPavdzElXd08MZh4WdpNs2p1Sxz4kaTFezM6wbYq1MtrzzAJMvsplTzVD
 xZ1/mIbA7aQcU7R8tMJXVdyYz8YCNlI+5RGqkUEB3Mi4pQQK01g973KiJeUQ69id
 kVDEx+rsFwPK1feFWB5E3dYI41szmqaiHKQMgan0+A0T3GkjIEUJvLKK7LqnQSGp
 ihv53D1GcbmVLwXTNtqhkclZapEtRaOB3/4t8uM7qFP9xeru2EieGtBli9C/YXHv
 qQasviRzmbZYyoaSZDKZqo9HFi+HXyLq9iHZNDyJeGLVSzuG0TiL7fEB4Tk9imOM
 qq4fAbUJp3FZhnWJbT3jF57rPARyV4+NhdtthA7wUsd/dm7EM5w=
 =mqHd
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging

Fix memory leak in synth backend.

# gpg: Signature made Mon 19 Feb 2018 17:29:49 GMT
# gpg:                using RSA key 71D4D5E5822F73D6
# gpg: Good signature from "Greg Kurz <groug@kaod.org>"
# gpg:                 aka "Gregory Kurz <gregory.kurz@free.fr>"
# gpg:                 aka "[jpeg image of size 3330]"
# Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6

* remotes/gkurz/tags/for-upstream:
  9p: fix leak in synth_name_to_path()
  9p: v9fs_path_copy() readability

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-20 11:52:24 +00:00
Jan Kiszka 63ad932567 ui: Reorder vte terminal packing to avoid gtk3 warnings
Fill the terminal box from right to left to avoid

Gtk-WARNING **: Allocating size to GtkScrollbar 0x55f6d54b0200 without
    calling gtk_widget_get_preferred_width/height(). How does the code
    know the size to allocate?

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Message-id: 902aaef8-d20e-0530-dea2-cdfe3db33ff3@web.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:16:11 +01:00
Gerd Hoffmann e3af9f9a40 vl: drop display_type variable
Switch over all leftover users to qapi DisplayType.
Then delete the unused display_type variable.

Add 'default' DisplayType, which isn't an actual display type but
a placeholder for "user didn't specify a display".  It will be replaced
by the DisplayType actually used, which in turn depends on the
DisplayTypes availabel in the particular build.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-13-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:05 +01:00
Gerd Hoffmann 9b9b46c71c vl: drop request_opengl variable
Switch over the one leftover user to qapi DisplayType.
The delete the unused request_opengl variable.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-12-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:05 +01:00
Gerd Hoffmann 6815515ede vl: drop full_screen variable
Not used any more, delete it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-11-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:05 +01:00
Gerd Hoffmann 767f9bf3b5 cocoa: use DisplayOptions
Switch cocoa ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-10-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:04 +01:00
Gerd Hoffmann 14f130fad8 curses: use DisplayOptions
Switch curses ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-9-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:04 +01:00
Gerd Hoffmann 0d2dd9f009 egl-headless: use DisplayOptions
Switch egl-headless ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-8-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:04 +01:00
Gerd Hoffmann 78782712a6 vl: drop no_quit variable
Not used any more, delete it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180202111022.19269-7-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:04 +01:00
Gerd Hoffmann fe91f36aa5 sdl: use DisplayOptions
Switch sdl ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-6-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:04 +01:00
Gerd Hoffmann 0c8d706532 gtk: add and use DisplayOptions + DisplayGTK
Add QAPI DisplayType enum, DisplayOptions union and DisplayGTK struct.
Switch gtk configuration to use the qapi type.

Some bookkeeping (fullscreen for example) is done twice now, this is
temporary until more/all UIs are switched over to qapi configuration.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-5-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:04 +01:00
Gerd Hoffmann be045e6bb8 vl: rename DisplayType to LegacyDisplayType
qapi DisplayType will replace the current enum.  For the transition both
will coexist though, so rename it so we don't have a name clash.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180202111022.19269-4-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:12:04 +01:00
Gerd Hoffmann 673584473c vl: deprecate -no-frame
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180202111022.19269-2-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20 12:11:36 +01:00
Peter Maydell f4718c033b -----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJai+diAAoJEPMMOL0/L748BpQP/RV1OjzS0Mk22cN7e1OCdpvz
 SZeMNnUUSHZzODHa1UkRqByrltkyZ8b+kXA/cYd4pRKfJbYmB/Tl/ZZG/YMPJVVv
 EFlG3n0aqgXq22FR1G8A9AIxX914WLDzG04wnNEZaGv8iyBJbbtjb1K3QC8BRixc
 TY+zjaLRg6tSIlZ8nZTJN8ZFHnN7XguHk4uHJOJkkjxUN9aTpe3/1L1Dvc7sVyQP
 5vhlcSL38NXa5P1wz1mSklVw62YdDuuldDiaGkn/Jhl5pNAwJB6ZpNa7n3kEjdUY
 EPJvpzDv8ELVHh2END69oLRSLSD0v5eM1wCtJr/PqmqTNJF0aj4jPyHvhu+3fxng
 rUxrcW+WPmfpaDylrg+K74prWwhlakXu9+7R6bh6FAYaW5NreyENI4zDh+/GCnPV
 0MKT+ei/87OLhsZw37hha47LT3NZZuit4RACbztqIjlZ2Mm/qZbxnbDv8bL4PmzM
 J0PU0Id5q58eTi+x468wFtc078GR+CTbak773qBNgN201TYjttKdUnj67edvXl7V
 hDRJijARHzw6roORwZBIPh3T6EJENbrir+iQVLSWygVHMGu2YdIcnJP6RXs3nVl/
 tZ3BMF0TBOtDv1FJ9ShzOo6M2zy8KDySz90l0J8TkqLqNkkdjJBVnyBK9JzMMFA2
 K6L2sCBgUL6FOuBPzLeg
 =vGv2
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging

# gpg: Signature made Tue 20 Feb 2018 09:16:18 GMT
# gpg:                using RSA key F30C38BD3F2FBE3C
# 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/vivier2/tags/linux-user-for-2.12-pull-request:
  linux-user: Remove THREAD macro
  linux-user: Fix sched_getaffinity mask size
  linux-user: Fix register used for 6th and 7th syscall argument on aarch64
  linux-user: Implement ioctl cmd TIOCGPTPEER

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-20 09:40:51 +00:00
Marc-André Lureau 6ce7177ae2 9p: fix leak in synth_name_to_path()
Leak found thanks to ASAN:

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x55995789ac90 in __interceptor_malloc (/home/elmarco/src/qemu/build/x86_64-softmmu/qemu-system-x86_64+0x1510c90)
    #1 0x7f0a91190f0c in g_malloc /home/elmarco/src/gnome/glib/builddir/../glib/gmem.c:94
    #2 0x5599580a281c in v9fs_path_copy /home/elmarco/src/qemu/hw/9pfs/9p.c:196:17
    #3 0x559958f9ec5d in coroutine_trampoline /home/elmarco/src/qemu/util/coroutine-ucontext.c:116:9
    #4 0x7f0a8766ebbf  (/lib64/libc.so.6+0x50bbf)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-02-19 18:27:32 +01:00
Marc-André Lureau e446a1eb5e 9p: v9fs_path_copy() readability
lhs/rhs doesn't tell much about how argument are handled, dst/src is
and const arguments is clearer in my mind. Use g_memdup() while at it.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-02-19 18:27:15 +01:00
Peter Maydell afd3397a81 -----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJaivkiAAoJEJykq7OBq3PIyFYIAKxOSqa0gQp2YyHDqj3Bg6lS
 qdxiejuoJet8FAb+a2RryZERlaN7ovTFc+1O247FEwy9nQGqFoRHRqF8qsVqOzex
 4zvDQjYDJch9BrIdApzuNHVOpmKXgPHfGKPl+viU3Qh08xLCZ9fWB88mYzYlq3OC
 N6GhpT0ojpjOmAa7k+Ur38zjn4jhHL6MY7RdhwsoNFJGvW62Y00jN58OqBYg0ax7
 YUUN76zwFhyDZPS1ayehUWgTvDP804B5zJWZwv7V4AfXLf29820EU381DgSk9D/n
 1RN1RmJ3nq/K323RNvVabTLXHI8nqrJOluK47BA319X+6jJp5wAhXBl2aL8BHtg=
 =soKg
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

# gpg: Signature made Mon 19 Feb 2018 16:19:46 GMT
# gpg:                using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  trace: avoid SystemTap "char const" warnings
  tracetool: For ust trace bool type as ctf_integer
  tracetool: Update argument format regex to non-greedy star

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-19 16:44:12 +00:00
Stefan Hajnoczi 7f1d87ab0f trace: avoid SystemTap "char const" warnings
SystemTap's dtrace(1) produces the following warning when it encounters
"char const" instead of "const char":

  Warning: /usr/bin/dtrace:trace-dtrace-root.dtrace:66: syntax error near:
  probe flatview_destroy_rcu

  Warning: Proceeding as if --no-pyparsing was given.

This is a limitation in current SystemTap releases.  I have sent a patch
upstream to accept "char const" since it is valid C:

  https://sourceware.org/ml/systemtap/2018-q1/msg00017.html

In QEMU we still wish to avoid warnings in the current SystemTap
release.  It's simple enough to replace "char const" with "const char".

I'm not changing the documentation or implementing checks to prevent
this from occurring again in the future.  The next release of SystemTap
will hopefully resolve this issue.

Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20180201162625.4276-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-19 13:09:44 +00:00
Jon Emil Jahren 61b01bbc6c tracetool: For ust trace bool type as ctf_integer
Previously functions having arguments of type bool was not traced
properly. The bool arguments were missing from the trace.

Signed-off-by: Jon Emil Jahren <jonemilj@gmail.com>
Message-id: 20180129041648.30884-3-jonemilj@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-19 13:09:44 +00:00
Jon Emil Jahren fb1a66bc01 tracetool: Update argument format regex to non-greedy star
Using the greedy star matching, arguments like "...%"PRIx64 caused issues
for functions with multiple PRI formats.

The issue was only seen with the ust backend, as it is the only one
using the format regex.

The result for many functions was that the arguments coming after the
greedy star end was left out of the tracepoint, and in some cases some
of the arguments that was traced had the wrong format.

Signed-off-by: Jon Emil Jahren <jonemilj@gmail.com>
Message-id: 20180129041648.30884-2-jonemilj@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-19 13:09:44 +00:00
Peter Maydell 299a2e6fac PVRDMA implementation
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJairBBAAoJEDbUwPDPL+Rt5T4H/imcJLrmlUMP3EMJC6/77cDo
 t9I/SAqbBF3DQt6l6nmHwfMk6Y3zjFvE9kCsgwCU/6A5iSjfxS66sNXFZeBQqZD0
 FJECCSLOkAPjMw8JSvE+g1g+6Ja/4fgjX1GxK7d7o/l9YjD4JYwukl8oeRzf3bJW
 GQnJSpXJiwNzuzz97PQaFKoTDuG3oJCMnByQd++2/p4tiaCn7+v3GUHrKFMBNRvt
 bZTzCWUUhKBXwR1xk31oYZ3SAQhQE01FPyd4o9oxgJurPN+4JzqO5l4Z6biqQtyB
 vjLlbOZhqAB3CpzzI2/gImu2lAoGjP0wivCjaM8GJPe9TX9+w7dN/wqNtkiIMrc=
 =yZf/
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging

PVRDMA implementation

# gpg: Signature made Mon 19 Feb 2018 11:08:49 GMT
# gpg:                using RSA key 36D4C0F0CF2FE46D
# gpg: Good signature from "Marcel Apfelbaum <marcel@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: B1C6 3A57 F92E 08F2 640F  31F5 36D4 C0F0 CF2F E46D

* remotes/marcel/tags/rdma-pull-request:
  MAINTAINERS: add entry for hw/rdma
  hw/rdma: Implementation of PVRDMA device
  hw/rdma: PVRDMA commands and data-path ops
  hw/rdma: Implementation of generic rdma device layers
  hw/rdma: Definitions for rdma device and rdma resource manager
  hw/rdma: Add wrappers and macros
  include/standard-headers: add pvrdma related headers
  scripts/update-linux-headers: import pvrdma headers
  docs: add pvrdma device documentation.
  mem: add share parameter to memory-backend-ram

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-19 12:51:11 +00:00
Marcel Apfelbaum a3defabbb5 MAINTAINERS: add entry for hw/rdma
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
2018-02-19 13:03:24 +02:00
Yuval Shaia 919ae3dd11 hw/rdma: Implementation of PVRDMA device
PVRDMA is the QEMU implementation of VMware's paravirtualized RDMA device.
It works with its Linux Kernel driver AS IS, no need for any special
guest modifications.

While it complies with the VMware device, it can also communicate with
bare metal RDMA-enabled machines and does not require an RDMA HCA in the
host, it can work with Soft-RoCE (rxe).

It does not require the whole guest RAM to be pinned allowing memory
over-commit and, even if not implemented yet, migration support will be
possible with some HW assistance.

Implementation is divided into 2 components, rdma general and pvRDMA
specific functions and structures.

The second PVRDMA sub-module - interaction with PCI layer.
- Device configuration and setup (MSIX, BARs etc).
- Setup of DSR (Device Shared Resources)
- Setup of device ring.
- Device management.

Reviewed-by: Dotan Barak <dotanb@mellanox.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2018-02-19 13:03:24 +02:00
Yuval Shaia 98d176f8e5 hw/rdma: PVRDMA commands and data-path ops
First PVRDMA sub-module - implementation of the PVRDMA device.
- PVRDMA commands such as create CQ and create MR.
- Data path QP operations - post_send and post_recv.
- Completion handler.

Reviewed-by: Dotan Barak <dotanb@mellanox.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2018-02-19 13:03:24 +02:00
Yuval Shaia ef6d4ccdc9 hw/rdma: Implementation of generic rdma device layers
This layer is composed of two sub-modules, backend and resource manager.
Backend sub-module is responsible for all the interaction with IB layers
such as ibverbs and umad (external libraries).
Resource manager is a collection of functions and structures to manage
RDMA resources such as QPs, CQs and MRs.

Reviewed-by: Dotan Barak <dotanb@mellanox.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2018-02-19 13:03:24 +02:00
Yuval Shaia b3a9227769 hw/rdma: Definitions for rdma device and rdma resource manager
Definition of various structures and constants used in backend and
resource manager modules.

Reviewed-by: Dotan Barak <dotanb@mellanox.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2018-02-19 13:03:24 +02:00
Yuval Shaia dcbf469aef hw/rdma: Add wrappers and macros
As all mapping for this device are from driver to device,
declare wrappers on top of pci_dma_*map functions.

In addition, declare macros to be used for debug messages.

Reviewed-by: Dotan Barak <dotanb@mellanox.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2018-02-19 13:03:24 +02:00
Marcel Apfelbaum 7605e12a51 include/standard-headers: add pvrdma related headers
Import the headers used by the pvrdma device.
Part of them are interfaces between the guest driver and the device,
imported under include/standart-headers/drivers/infiniband/... .

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
2018-02-19 13:03:24 +02:00
Marcel Apfelbaum e1c5f1f04a scripts/update-linux-headers: import pvrdma headers
Modify the script to import the headers used by the pvrdma device.
Part of them are interfaces between the guest driver and the device,
import them under include/standart-headers/drivers/infiniband/... .

Remove the unused functions from pvrdma_verbs.h avoiding the
unnecessary import of several infiniband/networking/other headers.

Reviewed-by: Gal Hammer <ghammer@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
2018-02-19 13:03:24 +02:00
Marcel Apfelbaum edab56321a docs: add pvrdma device documentation.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
2018-02-19 13:03:24 +02:00
Marcel Apfelbaum 06329ccecf mem: add share parameter to memory-backend-ram
Currently only file backed memory backend can
be created with a "share" flag in order to allow
sharing guest RAM with other processes in the host.

Add the "share" flag also to RAM Memory Backend
in order to allow remapping parts of the guest RAM
to different host virtual addresses. This is needed
by the RDMA devices in order to remap non-contiguous
QEMU virtual addresses to a contiguous virtual address range.

Moved the "share" flag to the Host Memory base class,
modified phys_mem_alloc to include the new parameter
and a new interface memory_region_init_ram_shared_nomigrate.

There are no functional changes if the new flag is not used.

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2018-02-19 13:03:24 +02:00
Peter Maydell 72f1094b6c Add some doc for the stable process.
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEw9DWbcNiT/aowBjO3s9rk8bwL68FAlqKoG8SHGNvaHVja0By
 ZWRoYXQuY29tAAoJEN7Pa5PG8C+vGWMQAIU0Xc4qLOA+YR4MLsEg+BWdUbRZbGoF
 zJXBOJ31MoZiFVKWPK8yhdqgtPCKVgmgQ/sZ5akZQkqOn29qM54nJRSP/E16mq4l
 ji1YE+esvaScDaI+52VTpfG5e23Im7Tb/HNByTR/FYj9lK2AEcRbDG+H5kA577fA
 fesHrwXZPnkhCq+6uHE/c/+ZAp1BMLqgteYqKH01jf/r5MJmUkRZhERpHvPPb2BC
 WNmsG0GAL1bRe7mkM3VZnyXzrVm/hhrKapCetRbYpMYclO5kHcX8zq1ECA/zWvet
 cOQw8phEn6kSnZsBxEZ4V7NNTLzLJD8VPNSMlAEtO1tZF2r1jF5FHAhImIFAnhyN
 khwRz5CKyt2B1Ze9cZe/iYExXaplAwz0N/C1MjQ9ylV/MR422rzE0pEfqFGmvje9
 MJzB3rokXwVaOwEa46VupO6rcgr9PTWRAYNFK2kjkSoCjfh6dyvNNgHFlhjesNDC
 FhU/ZydpC5s0/e7UDx5/hrAxfewX6y7228ev/eYxd44ztyxXExW80CEXmuGpNNLs
 hMLMs9YHk+uxOI3Ielpm6dEq1LPXt4aB6Ae9ADrHM84q5BqkshJVg2EdZLcqpLgM
 +GxOkfRuVE97rLHjMRDJLvpVy/RjFgOaCElSQArotIm2sI8IYoqxZE4U+Rkoc9zm
 cT76eywq81uj
 =KSy0
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/cohuck/tags/stable-doc-20180219' into staging

Add some doc for the stable process.

# gpg: Signature made Mon 19 Feb 2018 10:01:19 GMT
# gpg:                using RSA key DECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/stable-doc-20180219:
  docs: document our stable process

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-19 10:28:34 +00:00
Cornelia Huck 7aa54229cf docs: document our stable process
Some pointers on how to get a patch into stable.

[contains some suggestions by mdroth and eblake]
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-02-19 10:51:16 +01:00
Peter Maydell b44316fb36 linux-user: Remove THREAD macro
Back when we used to support compiling either with or without
NPTL threading library support, we used a macro THREAD which would
expand either to nothing (no thread support) or to __thread (threads
supported). For a long time now we have required thread support,
so remove the macro and just use __thread directly as other parts
of QEMU do.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180213132246.26844-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-02-18 18:52:32 +01:00
Samuel Thibault 5fdefcf808 linux-user: Fix sched_getaffinity mask size
We properly computed the capped mask size to be put to the application
buffer, but didn't actually used it. Also, we need to return the capped mask
size instead of 0 on success.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180211174704.27441-1-samuel.thibault@ens-lyon.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-02-18 18:52:32 +01:00
Guido Günther 2c418853b9 linux-user: Fix register used for 6th and 7th syscall argument on aarch64
This unbreaks the testcase from

    http://lists.nongnu.org/archive/html/qemu-arm/2018-01/msg00514.html

Thanks to Laurent Vivier for spotting the 7th one.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Suggested-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <671eaa99f4e0bf3a58f76f9151f7cfa24662227f.1517565566.git.agx@sigxcpu.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-02-18 18:52:32 +01:00
Andreas Schwab 2b74f621f1 linux-user: Implement ioctl cmd TIOCGPTPEER
With glibc 2.27 the openpty function prefers the TIOCGPTPEER ioctl.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <mvmbmhdosb9.fsf_-_@suse.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-02-18 18:52:32 +01:00
Peter Maydell e5ecc287a7 HMP pull 2018-02-16
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJahxiiAAoJEAUWMx68W/3nGr8P/iowKSMEy/4ZyKlAU0q6S33v
 oxLNXWoUUMGnMMs9N18vbQtLKQQFuWrfxkLR6mNRdr6sgjpRF45l+JPtdXukM7x0
 rgRQUSWDb3jW1ETw/FwPv1N5s2cPBAh8/kJFzk9dxVW55flg5s4n6fJHIa6sZlgw
 Pz8qutHJ6SOZdtZLG4q/+vYR0se8W6sTfBW0ExPUvLwlczBT+NcySdkzYsveM0zs
 f70do5BNeQ/yzVMmPPdojzDAKvbOv2tXDfi5G10Z1drUUkiaKy3xAuvVnAXNuqta
 UlhnujtNyejVKdBqIb7XKYv3yWCuP3HQ36QwZNTxGgo4EovNr6W7RP5aUbLavjNQ
 FEZxt+r7XskuIVCDBdPuAdpSIjefNQlNZ6Hft8A+ezS2T7BqnOnkkMNrNxh8aQ6H
 UNRj6YiAveGUeYxGsZTEhBhmceAFPiy8L/B1kINJMhgBesjUi0aiPFz8rFTaBz7G
 bJM4rSOVC4yDYyJkQT/zItqBMIZq+z/mfn0gxtcLKg988AKthTBEhxTl7Y5NQUW4
 zzfPuI9zNb9Al8FSyg+a4MFf6euY9HAwlM6zakNDOZvbR3LcG+qVfbNnOwq4xRTE
 Qtmt7VJiteJX4zN+GqpZLPFS5jbDNmF4/5pMrMJnPxImXsI6wlRc9scYj9SYd/1b
 K9bPU3EdVscNpdV5CnjF
 =C+G1
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20180216' into staging

HMP pull 2018-02-16

# gpg: Signature made Fri 16 Feb 2018 17:45:06 GMT
# gpg:                using RSA key 0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-hmp-20180216:
  monitor.c: Fix infinite loop in monitor's auto-complete
  monitor: Remove legacy "-mon default=on" parameter

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-16 18:39:05 +00:00
Dr. David Alan Gilbert f0fa817675 cuda.h: Fix multiple typedef
RHEL6's compilers don't like the repeated typedef.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-16 18:38:21 +00:00
Dr. David Alan Gilbert bf67f1c0b1 monitor.c: Fix infinite loop in monitor's auto-complete
The QEMU monitor enters an infinite loop when trying to auto-complete commands
that accept only optional parameters. The commands currently affected by this
issue are 'info registers' and 'info mtree'.

Reported-by: Dimitris Karagkasidis <t.pagef.lt@gmail.com>
Fixes: 48fe86f640
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20180213125143.23488-1-dgilbert@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-02-16 17:36:16 +00:00
Thomas Huth 149da2f063 monitor: Remove legacy "-mon default=on" parameter
The "default" parameter of the "-mon" option is useless since
QEMU v2.4.0, and marked as deprecated since QEMU v2.8.0. That
should have been long enough to let people update their scripts,
so time to remove it now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1513700253-10045-1-git-send-email-thuth@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-02-16 17:36:16 +00:00
Peter Maydell 5e8d6a12d6 bugfixes for vnc and sdl2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJahsZBAAoJEEy22O7T6HE42BQP/30HL2gZu53fGjsaO7m6C43X
 V5lr4iQEnxcLLEpPZxzbHrfhuHFc+wAuOcgW6HBuHZTRoeDRTfDuhovF4zPcQwqf
 pKdz9+GSzEhyX3ti8Dl7pDByybVy2k4fGanYPdI8rElQxyypIsjY/QRpuNTByX7q
 Rcl76AcDffCsmYhBU3Hc9bsTWS4nmJbZdPKAN6ul1W6TQLMeVDf1QUGHZABZXM4M
 ihcXUM11THH8SEI7uLtuqkOXOVJdtHRqTgonT2jTRccO9th+535g8Lxz/cQftv/N
 0cjVtlpMbPXcOhHonmQveRz2p7AV/7XaLKwKLyOFAdXQVZfc1k8Y9hhGiP2rPuxl
 qCrRRCUoejG8Jz1s+eQPVgGWgG+uPmZN+QxbfDLu3NOsRn286nzWkvDw/x3Dq+xk
 Y8QqMTtGDsu+r6OKkul47p3M8luZwnSqqFleR1VzmibFwEYzttCxqwP+8UqPlcoA
 oaTNzjMpMVLIPJCSruxBR3PLxqNGCks6igaOnNpSIK+lk9vIZFsWxqA3smuEopxA
 07Dqyt+kUJb/uomCCYnFBifDgkdOE9r8rgWe/NAbhf3BWyo+xpIEVnMYeDIiIu65
 I7hUwW6wK5GY7Zg56CHLA4LcAmbIzpLyD96vVLGC0bMfEQW3StKJoXbUx789B3Wn
 QLygX3/PuFDy0T1rMMXR
 =1q9G
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180216-pull-request' into staging

bugfixes for vnc and sdl2

# gpg: Signature made Fri 16 Feb 2018 11:53:37 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# 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-20180216-pull-request:
  ui: extend VNC trottling tracing to SASL codepaths
  ui: check VNC audio frequency limit at time of reading from client
  ui: avoid 'local_err' variable shadowing in VNC SASL auth
  ui: avoid risk of 32-bit int overflow in VNC buffer check
  sdl2: fix mouse grab
  sdl: restore optimized redraw
  vnc: fix segfault in closed connection handling
  vnc: add qapi/error.h include to stubs
  vnc: remove bogus object_unref on client socket

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-16 15:55:45 +00:00