Commit Graph

59773 Commits

Author SHA1 Message Date
Daniel P. Berrange 58dc31f1a7 sockets: move fd_is_socket() into common sockets code
The fd_is_socket() helper method is useful in a few places, so put it in
the common sockets code. Make the code more compact while moving it.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-03-13 18:06:06 +00:00
Daniel P. Berrange abd983c0e0 sockets: strengthen test suite IP protocol availability checks
Instead of just checking whether it is possible to bind() on a socket, also
check that we can successfully connect() to the socket we bound to. This
more closely replicates the level of functionality that tests will actually
use.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-03-13 18:06:06 +00:00
Daniel P. Berrange 9b589ffb12 sockets: pull code for testing IP availability out of specific test
The test-io-channel-socket.c file has some useful helper functions for
checking if a specific IP protocol is available. Other tests need to
perform similar kinds of checks to avoid running tests that will fail
due to missing IP protocols.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-03-13 18:06:06 +00:00
Daniel P. Berrange 473a2a331e cutils: add qemu_strtoi & qemu_strtoui parsers for int/unsigned int types
There are qemu_strtoNN functions for various sized integers. This adds two
more for plain int & unsigned int types, with suitable range checking.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-03-13 18:06:05 +00:00
Daniel P. Berrange 63bab2b696 char: don't silently skip tn3270 protocol init when TLS is enabled
Even if common tn3270 implementations do not support TLS, it is trivial to
have them proxied over a proxy like stunnel which adds TLS at the sockets
layer. We should thus not silently skip tn3270 protocol initialization
when TLS is enabled.

Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-03-13 16:32:15 +00:00
Peter Maydell 59667bb167 x86 queue, 2018-03-12
* Intel Processor Trace support
 * KVM_HINTS_DEDICATED
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJaptvvAAoJECgHk2+YTcWmiZUP/3crzf9eiRyrXG2Pw8xY95ia
 62a/xdZH5UnIvhczVDiIsbDgnGGKwSce690ypHVCle0Pr5jv0Seym5Pb5DUGKwWa
 O/LI9UjjzthK96a2uMjf0DuAlwbBGtUnryO1y1PJqrlZa4N2nMPKeZLatUY5qybS
 sM0OmmQvdl2PESx0DrtY2wTap+Mx4/FTefx8FoICpFj+tjkDTNyEM3znG5cejuCo
 vD7098Y0XW9pnVdEEfsugV52HNX8cHtaT5E+uL2RRPJyuZW2/10mczTGd2SZEgoj
 DZlKLr7gqXYAOOvO/J9pSYqwIhCiED2VG7ceI0ulfEPrLMJeXsq/D8G0fkszvURr
 TgDblNKR37Iogth64teZBS1YXvNF6cIaTLuEJ3xtLDPZuNpC4x4fNJZDrj06YAAy
 l8ReOec/KCuD9Oi+XhWj/Teb/MxCI+C8MR7S1qS+Wb405jIJwUS27f1hjcOu0AdA
 9a54HIRxByiDYUhzVauHushfMyxfB6Erc+c6XGHWnfsQBbH9So8rHCbCKrHsFi4q
 QGPmPMvR6Im6v2ExtU91w6mZp+J54Jzx0lZMOKqf/V6eBndyn/OF91cfOBu/vZtv
 5WYfJrkbXDfR0+Xnd464FvrwhhlqQJ/xtpgjeeil9PD/HhLeIc7qAyWHfWhRpijS
 diiKJNui+QKTDOoRrxtL
 =uEnF
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging

x86 queue, 2018-03-12

* Intel Processor Trace support
* KVM_HINTS_DEDICATED

# gpg: Signature made Mon 12 Mar 2018 19:58:39 GMT
# gpg:                using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/x86-next-pull-request:
  i386: Add support to get/set/migrate Intel Processor Trace feature
  i386: Add Intel Processor Trace feature support
  target-i386: add KVM_HINTS_DEDICATED performance hint

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-13 14:02:47 +00:00
Peter Maydell 22ef7ba8e8 docker patches
-----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEEUAN8t5cGD3bwIa1WyjViTGqRccYFAlqmuCUQHGZhbXpAcmVk
 aGF0LmNvbQAKCRDKNWJMapFxxqEvB/0cOa3sLoQT0HJYGO9uQJyiV6+8w9eVGdeS
 ZqO049YGIuuJM5VzSlzTQH10vvwymqVBbsWc+YQETU2MxbNtwwuBrce0SJ70Z4uf
 06E+OaoMf++RzAY9HY3O50tGgwHt3qOGAhGA91V0B1UqdnoJrIk6EVOZQe6VJMnF
 KVBN/bj2xXPMPBYJzmCl+akXc/n8gU1S1S2dst5ApyfdJL2GqBmqhs1ep1uflS3h
 46qNCgZXCd7id9iURvA/brihrv8WjNg4G5sFJRiiPmsdsr2lBZUd3CSSJE1bPO43
 Snh9OEEDJpTk/3pM+Uzokt41DwNCZtIcwbygY8HG6fC9kgPWqqBw
 =HgMx
 -----END PGP SIGNATURE-----

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

docker patches

# gpg: Signature made Mon 12 Mar 2018 17:25:57 GMT
# gpg:                using RSA key CA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/staging-pull-request:
  tests: make docker-test-debug@fedora run sanitizers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-13 11:42:45 +00:00
Peter Maydell 834eddf22e -----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJapqRMAAoJEJykq7OBq3PISrYIAKXc7psqt0A5f3Cz74IwvIiw
 hhcLGWdwA8tNYkTs/OU+xzwGPJYWgLbzvnday2FsfVuzJ0iYAPm/nCVtuMCS/ZFT
 hEAV7gvDU0VNwfDrVLwGiNf7mGqDBAlLdO1hUkth0kJ7URuqO8RVOSNuLWiKLYtv
 nHSpuZwGSM+eKfA4MB4GUR1zvg9cTTY0P9pCDK/1iUXxfP62xYbeC6SX55C2W50c
 nU0YeGw6gbAnX49AzwM/gDo5NOCAPct22p/9wy4KShiBWDkzf7+VBKUZ9wBle6xV
 wEGVDS4Iv1IrKN0KsnCcYDuylflrTC0mTeC4bN9UVAtqPnrnESobFQMuVMVOU44=
 =eDNN
 -----END PGP SIGNATURE-----

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

# gpg: Signature made Mon 12 Mar 2018 16:01:16 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/block-pull-request:
  block: make BDRV_POLL_WHILE() re-entrancy safe

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-13 10:49:02 +00:00
Peter Maydell 73988d529e -----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJapqP6AAoJEJykq7OBq3PIZasIAL+NKBQGa/e0FD28PYdLU/JE
 sKZZ0O6+eVTCejGXap4bzbKOy+qZyOXvaRk5KNREc5A9R8HFBt5GotMfE80Cw9Nt
 rryX+qVdf4w27u2jMqY4215jD5jy/nPijRQ0a8UBsi6z2PXVPPNeS3lMB8RSFEZS
 IZu+l3j1op1wUlM4GfZvLCjmgHC+73lk6a5xZLJ2UvH9UoqJepgVZnSs2YvOctzG
 LVGMhk6/yAy4hh3NWx/M2h2B2ASMJJya8XrLgelAVnr6CxKBeBII0bSPur+1YIH7
 OkJhNsk6QKSWNFKtzXE6N+y1ryWLnbE8vzKSZt+xSzUDjhnqTm5iFpZQ+Ed16qA=
 =nCAn
 -----END PGP SIGNATURE-----

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

# gpg: Signature made Mon 12 Mar 2018 15:59:54 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: only permit standard C types and fixed size integer types
  trace: remove use of QEMU specific types from trace probes
  trace: include filename when printing parser error messages
  simpletrace: fix timestamp argument type
  log-for-trace.h: Split out parts of log.h used by trace.h

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-13 09:43:44 +00:00
Peter Maydell 1396156f50 usbredir: reorder fields in USBRedirDevice to reduce padding
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJapl7vAAoJEEy22O7T6HE4WeMQAIEEyKiIY9KemRRUPskcAJrs
 IOC+FK+9GulAqOm09ISm4BJN5fMNh3R/shPNqPm0WjORdnSBxF9SHQ/85HkodMCW
 phnPUeMjMTD140F7UckFnvkgbpJWQUq8McmeMKGhoUM3IlaJ5xDIttRwG9qJXjQo
 xljdzwh5ZQ6SS2lHCwZqlrWzwiP1rlGaA40nnIZG2u+CTeitfSyq5830sJnSC0Yr
 /zhmP9MzPgYPD/0bsY9v3KWdtj9BZ+2UrhPXaiDQNNQCYFmoVpqLmwC+1feVlBaO
 CjGeoBKP3opTGxXryi0oy22am32mcqxt7ZU8EZeky0l3aOdQPhMQNBxrwfxGlVyt
 yU33t/7KmQ95Wspyi6y8s1/Q4N5+wLRWWMXQyZZkuOfN6jk2hf+4koLL1X5L6zTg
 OU9GFyvwMFzCo7vTqmmWeXgcnja9Tu4LRttfrDsnpV2ZTcWCvWToBkdzhAVbosYA
 tjvvcXtl+Fg4p7lQaCHotGu6MUJsoOa0zxwkUnb1E+FZaYW5eBLB9+bg4f/yAKvO
 AVdvI7w0KMaLfpTw2DWk/CoyVYd9Vq3VQfTrVtfsqQcw3ovuTfPyZjMlcIpptjMi
 MRH0Y87mRhHVEzFXl/O5LEcr3NP9xBQ/nqPpkfCMqE7MYfR+QZZaoS54DIpkwq9/
 4yDaihdZ+BnP3Qi/+OGY
 =vv6O
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180312-pull-request' into staging

usbredir: reorder fields in USBRedirDevice to reduce padding

# gpg: Signature made Mon 12 Mar 2018 11:05:19 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/usb-20180312-pull-request:
  usbredir: reorder fields in USBRedirDevice to reduce padding

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12 19:40:44 +00:00
Chao Peng b77146e9a1 i386: Add support to get/set/migrate Intel Processor Trace feature
Add Intel Processor Trace related definition. It also add
corresponding part to kvm_get/set_msr and vmstate.

Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Message-Id: <1520182116-16485-2-git-send-email-luwei.kang@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-03-12 15:59:46 -03:00
Chao Peng e37a5c7fa4 i386: Add Intel Processor Trace feature support
Expose Intel Processor Trace feature to guest.

To make Intel PT live migration safe and get same CPUID information
with same CPU model on diffrent host. CPUID[14] is constant in this
patch. Intel PT use EPT is first supported in IceLake, the CPUID[14]
get on this machine as default value. Intel PT would be disabled
if any machine don't support this minial feature list.

Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Message-Id: <1520182116-16485-1-git-send-email-luwei.kang@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-03-12 15:59:46 -03:00
Wanpeng Li be7773268d target-i386: add KVM_HINTS_DEDICATED performance hint
Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit
to determine if they run on dedicated vCPUs, allowing optimizations such
as usage of qspinlocks.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1518185725-69559-1-git-send-email-wanpengli@tencent.com>
[ehabkost: Renamed property to kvm-hint-dedicated]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-03-12 15:57:39 -03:00
Peter Maydell fb5fff1588 7cdc61becd vga: fix region calculation
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJapl2MAAoJEEy22O7T6HE49uEP/1CDmBqVzijc+2hjygDNb5Fr
 bMyzosvXaKQKsV7W01eB7QzrQInfpmR1SppkKJVLvMd/26WbxZJr9NO583uDAFdF
 9XVq6Ihvr7agd1Vd7e0jieGi4v3KHXJTCLQ2f1sjfal0oj5w4mrl50QvRKqfbVyp
 dL7Hj/3ru0pY9qZ6tBYyb27NHijf0HjVstd7q8RRqlbT02D4yu3a4djxBP412T+v
 YVPJPJLensgkfm5+h2j9Gcyg913BKZwlYPvWHoUKFPVvpK3zpE0wIfeTPlXcJe1W
 sBy0/AMyJDG/MzZVLhglVq5aCJ3XH7qwqR26UQGlfMLfYsjC5SSZd4AplLBgXlIw
 1Zoszjxutv1brQkHIXebEx+7GNAot+xhd1PEDzmoHN9RUH3xGK8zl0hgU9bUpbBf
 pYsqImoEeb1bahTq39lW3ZgKw2h3eodBULihKz87ht08kFodMIODt6BD7c3V/CqP
 hqEUZO62nQZ3PkWwQkkiCWru5czA80rBvcIsnUJHwCvkSC0YvaduDJ0wFWBeRkyW
 yGZzxK9hnMaej1q/WlC/8IkSOOIfHfyMuGDH1e9Ua79XLuglzQnrzn+t1tG1Q3sx
 4sdHeCPlqSFjFM1cJYuWW8UaTJIEbj7CQBAYBeh+StRHlZBWXygrEOxB49pwEkXO
 eT3YLOSjjk1rD2VMaSoB
 =IZPD
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180312-pull-request' into staging

7cdc61becd vga: fix region calculation

# gpg: Signature made Mon 12 Mar 2018 10:59:24 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/vga-20180312-pull-request:
  vga: fix region calculation

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12 18:35:37 +00:00
Marc-André Lureau 02f769b7ee tests: make docker-test-debug@fedora run sanitizers
Since --enable-debug no longer enable sanitizers, we need explicit
--enable-sanitizers.

llvm package is required for llvm-symbolizer, to get symbols in
backtraces.

Add make V=1 to get details about failing tests.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180312120849.20073-1-marcandre.lureau@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
2018-03-13 01:19:56 +08:00
Peter Maydell 6ceb1b51f0 modules: use gmodule-export.
audio: add driver registry, enable module builds.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJaplmLAAoJEEy22O7T6HE4SQEP/18a0Vqk0ejx3HLzt0NPCiGG
 nQVPJlZFzEaMf6llMqyNyIQBuwrJJWSpXBF+k70adK984BuE4QoTiJ1ZNDxvRyID
 Lag3VsIHfmM8v3Nu2SKzy6icIGS4gQOda0G4kwwOXHyHJPmr/OY+JaiFZU8Qz0sb
 ZXATjoQuJh8PXD8P9k62T5BuTjXA/Hah1dWYn5KzNG8cPTc5dqMvA2KdFlFKcmvT
 s0isuQ7tDEr1IG+X5LCgFfbNUwjppodc3cxpF9qy+FhbC0RSlovakuFLG7T/PJAs
 yoDEEAbE3MmuCWWGN7eJ1iyHtz4B/kPl5cYYOiCUQ3rPNxuaTCjO9LXAcX9kBxg2
 ZM6FAmOKrMPTFVDsmsJi1eUn5d/batsE3aMgUNVlK+3pJwGr7J/B1LdKN0pU3zic
 rWcyLGU8SWfhmjiWEG20iL6kHhcKjW1Y9NtiBhICmR/3+Y3DHCSPSxbvzIW/ECaN
 9PEdjPukMHMfZD1yY1sSGNNtFNj+3rRXThfQJktzkHU+RnaRouimfOzPZT58c3HR
 vwQu6pBYJydpUY8g7WzCfY7l+jVanuXNOPIWzlQNB8l0gjL0Xyq9sxrBAT8TghCX
 Y3JeN/WIeMM4+QTeQHoR8A9xmqZ2IcUmE6mT5Wj/eXE/SiO6/2KGUArn4dQSnPMF
 9ufxaJvtr+YDNcExCbSL
 =CjTD
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/audio-20180312-pull-request' into staging

modules: use gmodule-export.
audio: add driver registry, enable module builds.

# gpg: Signature made Mon 12 Mar 2018 10:42:19 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/audio-20180312-pull-request:
  audio/sdl: build as module
  audio/pulseaudio: build as module
  audio/oss: build as module
  audio/alsa: build as module
  build: enable audio modules
  audio: add module loading support
  audio: add driver registry
  modules: use gmodule-export

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12 16:14:37 +00:00
Peter Maydell b16a54da06 gtk,spice: add dmabuf support.
sdl,vnc,gtk: bugfixes.
 ui/qapi: add device ID and head parameters to screendump.
 build: try improve handling of clang warnings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJapkS4AAoJEEy22O7T6HE4868P/i1HqNsrWjvQOlslHSiqa+L+
 t1YYM47qdy+Qv12z9wc5dVYLZy6xhKqUE41Ks/5IdeDmOmnSJSU6YNnQsav0BNwJ
 RDsaahiIVHyWN5cihZeL9aZvw6c+2GjJ2oBJbLgeogqukKuHluEfcSXfUPT3AT+M
 yGZe3jqQXqSqdG9B3yYxejFOnlAy26HlqD9CmTeqs9es2m9kUq3b/0EQaJd4BwiU
 1ObNqJy32t+6NjIlhlgUAFuZm+M+E/gCFQqjfnERiQPzMuE3d2go87mHfZ3LkvSl
 dCOrQJ7kEFJB2hjppVvm8NtpQ9QUS4KXpwqtyJEh6+cuHVpgOxBNUyeiSV3ItjQa
 tMlFsFIpR4YBD/Gj5pbx8doqfSpFV8tMv62ncCrfsC2/8XqGtLO33DZPguJDJOee
 qg8hzc7VIZmuT4fpjyMDzOkGG6X5fKnSSRvnpEkswBz0Vyf8t/0B029ksr9Jxger
 AvrOB96LWVW8mR1ksI/HO3iMkDeQP/xiHGUh4Cy1cR+qJuVVKNwXBQHg3viDcpbV
 YdoBG5CQ2MDsI7v3XvNihCqLFMZ2OigpAGLDe4a26IR/3Rz+0XEIdtfZHcGbxJ6l
 4cAb4JP+DOgVGGLyRBW+bDcg7q4BXwCp77mzipcsocnMu/HtZ5uoSH+EKFkKLcnP
 PKpab2lurVbG9oqYfD1P
 =3Hmp
 -----END PGP SIGNATURE-----

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

gtk,spice: add dmabuf support.
sdl,vnc,gtk: bugfixes.
ui/qapi: add device ID and head parameters to screendump.
build: try improve handling of clang warnings.

# gpg: Signature made Mon 12 Mar 2018 09:13:28 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-20180312-pull-request:
  qapi: Add device ID and head parameters to screendump
  spice: add cursor_dmabuf support
  spice: add scanout_dmabuf support
  spice: drop dprint() debug logging
  vnc: deal with surface NULL pointers
  ui/gtk-egl: add cursor_dmabuf support
  ui/gtk-egl: add scanout_dmabuf support
  ui/gtk: use GtkGlArea on wayland only
  ui/opengl: Makefile cleanup
  ui/gtk: group gtk.mo declarations in Makefile
  ui/gtk: make GtkGlArea usage a runtime option
  sdl: workaround bug in sdl 2.0.8 headers
  make: switch language file build to be gtk module aware
  build: try improve handling of clang warnings

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12 14:06:23 +00:00
Peter Maydell 819fd4699c Migration pull 2018-03-09
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJaosnuAAoJEAUWMx68W/3njQQQAIcLokkEviUHBTpWuHFGhMH/
 +GJz51Q0GkjUx2WY1rx4TZl8YeptHlPEDI5NT48t8ADq0UzThTQFIWq23sbI73Fl
 blV99IWNOF5rj8WYRwSrV5XtT8l2Rq8tDGAV4jSLbkLi3MXXU5FcT7/1sWAeV2VV
 Fq3DfEqZdzCPmL615vlxYuNf2eG2ZOy45jJLifaJCJSw9UIKSjm0RtMPdu1KyVvd
 7+5o0LI/CfGdAddCDoJe/Dg3dYOaCwgE2Xl0GKlgzKby1ScfDtbeiqG4No7MmopG
 mmQE/fhf60tKw4LETnc/NsWP1+VFLZkAOZoim3Bh9rZClrNJmFyQVxRY+e5Ig0oJ
 /C9CZkHirrucwTrYbv2r4cU+PmfGGkNPkoOMcKViA1EfmaWJDW1Pchs3Vob6K4Wd
 J/h9ZIV8ek2TGfqcHj9hX5DPQjpOLXA9XLnfGAC/lh8qgVqvrgNCSqY6sNY/Oy/I
 hJ21M3QkSWIFZunc5r8HD1YttShvMCa8tdm6W73ExnF9fGPspyjfLVBwzV4J1hsK
 RDSNZTZK+aOM/ZO8yJj4QtGtLus1MTttNmDOPwzpJPurtuDxC6bktc3Mrnzi4HRg
 b/RvngeZHzDK0o/q+YYG3xNpp2cG7dVcDUwB0rMzkPmQx2qYrzeGwmkoXTRaDmYK
 GXPGLc+SUwUg/IhEgRVn
 =ZvD9
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180309a' into staging

Migration pull 2018-03-09

# gpg: Signature made Fri 09 Mar 2018 17:52:46 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-migration-20180309a:
  tests: Silence migration-test 'bad' test
  migration: fix applying wrong capabilities
  migration/block: rename MAX_INFLIGHT_IO to MAX_IO_BUFFERS
  migration/block: reset dirty bitmap before read in bulk phase
  migration: do not transfer ram during bulk storage migration
  migration: fix minor finalize leak

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12 13:21:53 +00:00
Peter Maydell 5df089564b target-arm queue:
* i.MX: Add i.MX7 SOC implementation and i.MX7 Sabre board
  * Report the correct core count in A53 L2CTLR on the ZynqMP board
  * linux-user: preliminary SVE support work (signal handling)
  * hw/arm/boot: fix memory leak in case of error loading ELF file
  * hw/arm/boot: avoid reading off end of buffer if passed very
    small image file
  * hw/arm: Use more CONFIG switches for the object files
  * target/arm: Add "-cpu max" support
  * hw/arm/virt: Support -machine gic-version=max
  * hw/sd: improve debug tracing
  * hw/sd: sdcard: Add the Tuning Command (CMD 19)
  * MAINTAINERS: add Philippe as odd-fixes maintainer for SD
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJaosNHAAoJEDwlJe0UNgzexcoP/RHqkdKk91Dzg4MirndihMrJ
 nCu4n1J68uEOt79SlS4ES+EVKmfPvo2DP94Kp8L4bjqiHuvSMQfjX7YnPzCvQKOC
 Idz4BklbjYg3QP+UWFysoHvv5vXvytRhwu6LeVoTgebpBIwvKKyQh/89mwp1hKRm
 ZkpdkTRP2lsQUCG36kYUiAyhcJH+9nxQBtecfYjpzKsQg49Piltt999l9c8VzTfw
 yY72rEw4vFKFUjHfkbi0m2lPhZWIwGMoU0/qFNfIrMRi4vp6WDeQaRYgDgxpGfwy
 ZCbHVQeuQg87xD48HQMoQO+F3iaCvbjllDKnqAL80W8NreAyKJX8e8Cz9FD2k0n5
 RvDeQ6QOq5jzOW6uSDlJgT71kajiEzJH43TLLB6k7/mdJICt/JGU7EWVSP6C0fZz
 cEjRLfx8JoZN4HmFy2f8K+IwdWpGkshzTVO1XmFsWZmSHUD+6vcUv9Nd1MP3ACGN
 BPqmbjk2guiacuKs3gbOSCB1mLWXCu4HMAc6ppO1d3pVHRWaR9UAVCiYJNuXd/VU
 dXELAbcP6WOwHteBxgwGnEALcgz40gx149+gePD3MLc3ImZEqWba91Ghp8T6NNSu
 p8ZJqN7Dsow6mOxaS5iYfFfXdf8K13cTmB371Q+0IOi3Z0cO2CgEmFZ8fj5yKCSK
 wjtYIFhwzFdWqzGb4e/Q
 =CWr5
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180309' into staging

target-arm queue:
 * i.MX: Add i.MX7 SOC implementation and i.MX7 Sabre board
 * Report the correct core count in A53 L2CTLR on the ZynqMP board
 * linux-user: preliminary SVE support work (signal handling)
 * hw/arm/boot: fix memory leak in case of error loading ELF file
 * hw/arm/boot: avoid reading off end of buffer if passed very
   small image file
 * hw/arm: Use more CONFIG switches for the object files
 * target/arm: Add "-cpu max" support
 * hw/arm/virt: Support -machine gic-version=max
 * hw/sd: improve debug tracing
 * hw/sd: sdcard: Add the Tuning Command (CMD 19)
 * MAINTAINERS: add Philippe as odd-fixes maintainer for SD

# gpg: Signature made Fri 09 Mar 2018 17:24:23 GMT
# gpg:                using RSA key 3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20180309: (25 commits)
  MAINTAINERS: Add entries for SD (SDHCI, SDBus, SDCard)
  sdhci: Fix a typo in comment
  sdcard: Add the Tuning Command (CMD19)
  sdcard: Display which protocol is used when tracing (SD or SPI)
  sdcard: Display command name when tracing CMD/ACMD
  sdcard: Do not trace CMD55, except when we already expect an ACMD
  hw/arm/virt: Support -machine gic-version=max
  hw/arm/virt: Add "max" to the list of CPU types "virt" supports
  target/arm: Make 'any' CPU just an alias for 'max'
  target/arm: Add "-cpu max" support
  target/arm: Move definition of 'host' cpu type into cpu.c
  target/arm: Query host CPU features on-demand at instance init
  arm: avoid heap-buffer-overflow in load_aarch64_image
  arm: fix load ELF error leak
  hw/arm: Use more CONFIG switches for the object files
  aarch64-linux-user: Add support for SVE signal frame records
  aarch64-linux-user: Add support for EXTRA signal frame records
  aarch64-linux-user: Remove struct target_aux_context
  aarch64-linux-user: Split out helpers for guest signal handling
  linux-user: Implement aarch64 PR_SVE_SET/GET_VL
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12 11:47:52 +00:00
Daniel P. Berrangé 73ff061032 trace: only permit standard C types and fixed size integer types
Some trace backends will compile code based on the declared trace
events. It should not be assumed that the backends can resolve any QEMU
specific typedefs. So trace events should restrict their argument
types to the standard C types and fixed size integer types. Any complex
pointer types can be declared as "void *" for purposes of trace events,
since nothing will be dereferencing these pointer arguments.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180308155524.5082-3-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-12 11:10:20 +00:00
Daniel P. Berrangé 8858444850 trace: remove use of QEMU specific types from trace probes
Any compound structs / unions / etc, should always be declared as
'void *' pointers, since it cannot be assumed that trace backends
are able to resolve QEMU typedefs.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180308155524.5082-2-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-12 11:10:20 +00:00
Daniel P. Berrangé 86b5aacfb9 trace: include filename when printing parser error messages
Improves error messages from:

  ValueError: Error on line 72: need more than 1 value to unpack

To

  ValueError: Error at /home/berrange/src/virt/qemu/trace-events:72:
    need more than 1 value to unpack

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180306154650.24075-1-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-12 11:10:20 +00:00
Stefan Hajnoczi e42860ae83 simpletrace: fix timestamp argument type
The timestamp argument to a trace event method is documented as follows:

  The method can also take a timestamp argument before the trace event
  arguments:

    def runstate_set(self, timestamp, new_state):
        ...

  Timestamps have the uint64_t type and are in nanoseconds.

In reality methods with a timestamp argument actually receive a tuple
like (123456789,) as the timestamp argument.  This is due to a bug in
simpletrace.py.

This patch unpacks the tuple so that methods receive the correct
timestamp argument type.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180222163901.14095-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-12 11:10:20 +00:00
Peter Maydell be0aa7ac89 log-for-trace.h: Split out parts of log.h used by trace.h
A persistent build problem we see is where a source file
accidentally omits the #include of log.h. This slips through
local developer testing because if you configure with the
default (log) trace backend trace.h will pull in log.h for you.
Compilation fails only if some other backend is selected.

To make this error cause a compile failure regardless of
the configured trace backend, split out the parts of log.h
that trace.h requires into a new log-for-trace.h header.
Since almost all manual uses of the log.h functions will
use constants or functions which aren't in log-for-trace.h,
this will let us catch missing #include "qemu/log.h" more
consistently.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180213140029.8308-1-peter.maydell@linaro.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-12 11:10:20 +00:00
Stefan Hajnoczi 7376eda7c2 block: make BDRV_POLL_WHILE() re-entrancy safe
Nested BDRV_POLL_WHILE() calls can occur.  Currently
assert(!wait_->wakeup) fails in AIO_WAIT_WHILE() when this happens.

This patch converts the bool wait_->need_kick flag to an unsigned
wait_->num_waiters counter.

Nesting works correctly because outer AIO_WAIT_WHILE() callers evaluate
the condition again after the inner caller completes (invoking the inner
caller counts as aio_poll() progress).

Reported-by: "fuweiwei (C)" <fuweiwei2@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180307124619.6218-1-stefanha@redhat.com
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-12 11:07:37 +00:00
Gerd Hoffmann 7cdc61becd vga: fix region calculation
Typically the scanline length and the line offset are identical.  But
in case they are not our calculation for region_end is incorrect.  Using
line_offset is fine for all scanlines, except the last one where we have
to use the actual scanline length.

Fixes: CVE-2018-7550
Reported-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
Tested-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Message-id: 20180309143704.13420-1-kraxel@redhat.com
2018-03-12 11:45:21 +01:00
zhenwei.pi c7ac1ab020 usbredir: reorder fields in USBRedirDevice to reduce padding
Changing the current ordering saves 8 bytes per entry in x86_64.

Signed-off-by: zhenwei.pi <zhenwei.pi@youruncloud.com>
Message-id: 1520318781-22644-1-git-send-email-zhenwei.pi@youruncloud.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-03-12 11:43:49 +01:00
Gerd Hoffmann 051c7d5c1e audio/sdl: build as module
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306074053.22856-8-kraxel@redhat.com
2018-03-12 11:18:27 +01:00
Gerd Hoffmann d2f623dad5 audio/pulseaudio: build as module
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306074053.22856-7-kraxel@redhat.com
2018-03-12 11:18:27 +01:00
Gerd Hoffmann 22d8154391 audio/oss: build as module
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306074053.22856-6-kraxel@redhat.com
2018-03-12 11:18:27 +01:00
Gerd Hoffmann ce3dc033df audio/alsa: build as module
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306074053.22856-5-kraxel@redhat.com
2018-03-12 11:18:27 +01:00
Gerd Hoffmann 08a05b379a build: enable audio modules
Add audio/ to common-obj-m variable.

Also run both audio and ui variables through unnest-vars.
This avoids sdl.mo (exists in both audio/ and ui/) name clashes.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306074053.22856-4-kraxel@redhat.com
2018-03-12 11:18:27 +01:00
Gerd Hoffmann 65ba869661 audio: add module loading support
Make audio_driver_lookup() try load the module in case it doesn't find
the driver in the registry.  Also load all modules for -audio-help, so
the help output includes the help text for modular audio drivers.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180306074053.22856-3-kraxel@redhat.com
2018-03-12 11:18:26 +01:00
Gerd Hoffmann d3893a39eb audio: add driver registry
Add registry for audio drivers, using the existing audio_driver struct.
Make all drivers register themself.  The old list of audio_driver struct
pointers is now a list of audio driver names, specifying the priority
(aka probe order) in case no driver is explicitly asked for.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180306074053.22856-2-kraxel@redhat.com
2018-03-12 11:18:26 +01:00
Peter Maydell 12c06d6f96 Block layer patches
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJaoqOgAAoJEH8JsnLIjy/W2MMP/1gj7CJgtSG9wIzyBHjSWQMy
 ofXEgRJO9t/smfUMlH2NdrW8P2LvYcmqOsEBkLJzCtl48fPexwtI/cunzVjutXcf
 VlpqKz/8uN4C9D6m8FN/5kKf65l+tnVqnCoJgwafY5uT7jmoC8LF1xO2jo8a+lJd
 0Dv6RxJUQq/tDR6OvO6aW4EzbOUcD4wkLvi/uz8+ZjV1BLSLlpdudejr6W9TnJY/
 EGFedbxqjPV7fIvMbodbFp0Ie8Aw0WEL8ttERboeR4jbA/o+PZVGpPtHsr/4V6QO
 Pgh6vH2rGavxFzwuCWEGhlLKGx66CGqqdTknm6lNJchepCvcfoYxjOPZv9FCaMUs
 enC/x43xSkCmkwBwKKxpXqu1vS5nGdMebAwRjstSIplypjv2YOwS1AiU5snaDwuk
 t9Gjkw0Wka5nySuYi43H2RPXmlWbh4T8DfQ6pOyJGvXGjm8t+f5BTaMtSWn6Iq2W
 F6r1UezQJBDnUbpFgsRg4AP+htPGDHgsOg7KzCCd/lBHwbjX7dkQlAYbBZZ2OBF+
 wQN5olDR6jsKIy2IlARNgNweZHW5UQa1cc+7HlVNNE5tqtkjo7aWPk/LhEzBCIHg
 sWG3VH2y3lQlaMzYh1v+jnGrFoq1ZJU4sbjaxvQX8czjmaQvPtbzKuZAovQ4pGwa
 g0SrWP6p9yLo0LXLuXBP
 =WDF4
 -----END PGP SIGNATURE-----

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

Block layer patches

# gpg: Signature made Fri 09 Mar 2018 15:09:20 GMT
# gpg:                using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream: (56 commits)
  qemu-iotests: fix 203 migration completion race
  iotests: Tweak 030 in order to trigger a race condition with parallel jobs
  iotests: Skip test for ENOMEM error
  iotests: Mark all tests executable
  iotests: Test creating overlay when guest running
  qemu-iotests: Test ssh image creation over QMP
  qemu-iotests: Test qcow2 over file image creation with QMP
  block: Fail bdrv_truncate() with negative size
  file-posix: Fix no-op bdrv_truncate() with falloc preallocation
  ssh: Support .bdrv_co_create
  ssh: Pass BlockdevOptionsSsh to connect_to_ssh()
  ssh: QAPIfy host-key-check option
  ssh: Use QAPI BlockdevOptionsSsh object
  sheepdog: Support .bdrv_co_create
  sheepdog: QAPIfy "redundancy" create option
  nfs: Support .bdrv_co_create
  nfs: Use QAPI options in nfs_client_open()
  rbd: Use qemu_rbd_connect() in qemu_rbd_do_create()
  rbd: Assign s->snap/image_name in qemu_rbd_open()
  rbd: Support .bdrv_co_create
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-12 10:08:09 +00:00
Gerd Hoffmann a88afc649e modules: use gmodule-export
As we want qemu symbols be exported to modules we should use the
gmodule-export-2.0 pkg-config instead of gmodule-2.0.

Cc: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180308085301.8875-2-kraxel@redhat.com
2018-03-12 10:15:07 +01:00
Thomas Huth f771c5440e qapi: Add device ID and head parameters to screendump
QEMU's screendump command can only take dumps from the primary display.
When using multiple VGA cards, there is no way to get a dump from a
secondary card or other display heads yet. So let's add a 'device' and
a 'head' parameter to the HMP and QMP commands to be able to specify
alternative devices and heads with the screendump command, too.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1520267868-31778-1-git-send-email-thuth@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-03-12 09:03:15 +01:00
Gerd Hoffmann b153f9019b spice: add cursor_dmabuf support
Add support for cursor dmabufs.  qemu has to render the cursor for
that, so in case a cursor is present qemu allocates a new dmabuf, blits
the scanout, blends in the pointer and passes on the new dmabuf to
spice-server.  Without cursor qemu continues to simply pass on the
scanout dmabuf as-is.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180308090618.30147-4-kraxel@redhat.com
2018-03-12 09:01:56 +01:00
Gerd Hoffmann cd2452b279 spice: add scanout_dmabuf support
Add support for scanout dmabufs.  Just
pass them through to spice-server.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180308090618.30147-3-kraxel@redhat.com
2018-03-12 09:01:53 +01:00
Gerd Hoffmann e181f8bbd0 spice: drop dprint() debug logging
Some calls are deleted, some are converted into tracepoints.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180308090618.30147-2-kraxel@redhat.com
2018-03-12 09:01:48 +01:00
Gerd Hoffmann 2e5567c903 vnc: deal with surface NULL pointers
Secondary displays in multihead setups are allowed to have a NULL
DisplaySurface.  Typically user interfaces handle this by hiding the
window which shows the display in question.

This isn't an option for vnc though because it simply hasn't a concept
of windows or outputs.  So handle the situation by showing a placeholder
DisplaySurface instead.  Also check in console_select whenever a surface
is preset in the first place before requesting an update.

This fixes a segfault which can be triggered by switching to an unused
display (via vtrl-alt-<nr>) in a multihead setup, for example using
-device virtio-vga,max_outputs=2.

Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-id: 20180308161803.6152-1-kraxel@redhat.com
2018-03-12 09:00:59 +01:00
Gerd Hoffmann f1bd313264 ui/gtk-egl: add cursor_dmabuf support
Add support for cursor dmabufs to gtk-egl.  Just blend in the cursor
(if we have one) when rendering the dmabuf.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306090951.22932-7-kraxel@redhat.com
2018-03-12 09:00:34 +01:00
Gerd Hoffmann 70763fea4f ui/gtk-egl: add scanout_dmabuf support
Add support for dmabuf scanouts to gtk-egl.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306090951.22932-6-kraxel@redhat.com
2018-03-12 09:00:34 +01:00
Gerd Hoffmann 4c70280592 ui/gtk: use GtkGlArea on wayland only
For dma-buf support we need a egl context.  The gtk x11 backend uses glx
contexts though.  We can't use the GtkGlArea widget on x11 because of
that, so use our own gtk-egl code instead.  wayland continues to use
the GtkGlArea widget.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306090951.22932-5-kraxel@redhat.com
2018-03-12 09:00:34 +01:00
Gerd Hoffmann 2f92f37c9e ui/opengl: Makefile cleanup
With gtk.mo bits moved away we don't need the ifeq any more.
Also add missing opengl libs for some objects.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306090951.22932-4-kraxel@redhat.com
2018-03-12 09:00:34 +01:00
Gerd Hoffmann c923cbedb2 ui/gtk: group gtk.mo declarations in Makefile
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306090951.22932-3-kraxel@redhat.com
2018-03-12 09:00:34 +01:00
Gerd Hoffmann 11c82b584a ui/gtk: make GtkGlArea usage a runtime option
Compile in both gtk-egl and gtk-gl-area, then allow to choose at runtime
instead of compile time which opengl variant we want use.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180306090951.22932-2-kraxel@redhat.com
2018-03-12 09:00:34 +01:00
Gerd Hoffmann 2ca5c43091 sdl: workaround bug in sdl 2.0.8 headers
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892087

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180307154258.9313-1-kraxel@redhat.com
2018-03-12 09:00:34 +01:00
Bruce Rogers 722cd74964 make: switch language file build to be gtk module aware
Now that gtk support builds as a module, CONFIG_GTK changed from
y to m. Adjust Makefile correspondingly.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Message-id: 20180307155517.32570-1-brogers@suse.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-03-12 09:00:34 +01:00
Gerd Hoffmann 0e39c4aa7e build: try improve handling of clang warnings
This patch disables the pragma diagnostic -Wunused-but-set-variable for
clang in util/coroutine-ucontext.c.

This in turn allows us to remove it from the configure check, so the
CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE will succeed for clang.

With that in place clang builds (linux) will use -Werror by default,
which breaks the build due to warning about unaligned struct members.

Just turning off this warning isn't a good idea as it indicates
portability problems.  So make it a warning again, using
-Wno-error=address-of-packed-member.  That way it doesn't break the
build but still shows up in the logs.

Now clang builds qemu without errors.  Well, almost.  There are some
left in the rdma code.  Leaving that to the rdma people.  All others can
use --disable-rdma to workarounds this.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20180309135945.20436-1-kraxel@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-03-12 08:59:03 +01:00