Commit Graph

74853 Commits

Author SHA1 Message Date
Markus Armbruster 903458c8ab configure: Pick sphinx-build-3 when available
The next commit will require a sphinx-build that uses Python 3.  On
some systems, sphinx-build is fine, on others you need to use
sphinx-build-3.  To keep things working out of the box on both kinds
of systems, try sphinx-build-3, then sphinx-build.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <87a75lqe8e.fsf@dusky.pond.sub.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-15 11:41:37 +01:00
Peter Maydell 2eb054c237 configure: Allow user to specify sphinx-build binary
Currently we insist on using 'sphinx-build' from the $PATH;
allow the user to specify the binary to use. This will be
more useful as we become pickier about the capabilities
we require (eg needing a Python 3 sphinx-build).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20200213175647.17628-2-peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-14 16:31:21 +01:00
Andrea Bolognani 2a7d957596 qapi: Expand documentation for LostTickPolicy
The current documentation is fairly terse and not easy to decode
for someone who's not intimately familiar with the inner workings
of timer devices. Expand on it by providing a somewhat verbose
description of what behavior each policy will result in, as seen
from both the guest OS and host point of view.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Message-Id: <20200211183744.210298-1-abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-14 16:31:19 +01:00
Peter Maydell 517c84cef7 qxl: introduce hardware revision 5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJeRRGGAAoJEEy22O7T6HE4y2wQANiIL9XyVIRz9fCF3fdRpxmZ
 3dLQuwOa8Ms9oO+s9wncwlVkrMWKeSpS07yFN8kgGCs7sLlcuYKCLQQNQJzDfYTj
 vgSFafPNIXzLAKDp159Sn0NHkH0dwzEYHv59q3BVDw2bA6ah8BNTaqqnMEZsaLvm
 PLrwsahr4RAYiZoramyL+y1qbwbmlr/zvVys/6xtPJ+x8rs8jRrBHOg9a0R6NPe5
 H5wVr7GJrNZPdy0b2R1usJ45MrhbHIULZjQjKgwXp9lfL9cgXHRG3dpIlXGLbB7u
 pgGSc/iIN5M1cwyYEiqxTKM3BO101PhaXTOHOT/aG5W5dRz8bbstwWTZ3Vms6SW3
 qXzdqIfTcyvPbat1Q0kwrJt7sMroHlpe5tAbifW4Id26h9RqlOGxjr0eVv4ME0Pe
 epIoFB0cB7o6LwFKlY5aG0u9paw2tm5yV88lJLygT7JZ+AX06sLMK/gKZEUAcBFV
 vM7xSOV3l87K1VgZiARDMmhk7ePDeQ02+PvMf/UQzZX91P3wwVAGgsRGNFoamoVM
 rPipqqWvCVBz2zNfayeqL1mX/6IcDuJRuod5Bg3RoYO1pdux7A4LIH3sdMPuf8eI
 v0nC3J0FyUt24Kq4YVmQqhTV35Zyoe8ChgJFEP/+bDjPjj/ml4rMmURC555/dTXL
 PqX7kedp664nR/+xjtiG
 =HPYM
 -----END PGP SIGNATURE-----

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

qxl: introduce hardware revision 5

# gpg: Signature made Thu 13 Feb 2020 09:06:14 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/vga-20200213-pull-request:
  qxl: introduce hardware revision 5

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13 18:55:57 +00:00
Peter Maydell 5d6542bea7 Fix breakpoint invalidation.
Add support for tcg helpers with 7 arguments.
 Add support for gvec helpers with 5 arguments.
 -----BEGIN PGP SIGNATURE-----
 
 iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAl5Elo4dHHJpY2hhcmQu
 aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+QHQgAiUHK3gZZZc6t4M7C
 YRGYNHSN4A3LV1NrsYXWkcZgjiWJPclmf7oSQmsLGRKlolQvbRiEPK6VZ4LppwUo
 XDK66T1NrfFexu0sS93PQZd22wOHZm/6m+mYEluHEmfVpFit1+yQh6kZLrg1zKF4
 9nap7rcp1xzSaqnCccyGBndIUCozJ3mMuaGStkKD3Q69JSq1u4LzVR5Wuyepcz0T
 zWPiR4p0Qv2V+zB4ATzLXVDmTEFOPkSgENjstVtFKgMiOerD6DHkpL8WMzIOLfwL
 TIZB/N3zQzOXjAK3w1LECTA69gYB9/c3lxlK7iyAyjGpDMjAdqV4A+XhLwe8/ZPK
 NmnLZg==
 =HzfK
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200212' into staging

Fix breakpoint invalidation.
Add support for tcg helpers with 7 arguments.
Add support for gvec helpers with 5 arguments.

# gpg: Signature made Thu 13 Feb 2020 00:21:34 GMT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-tcg-20200212:
  tcg: Add tcg_gen_gvec_5_ptr
  tcg: Add support for a helper with 7 arguments
  exec: flush CPU TB cache in breakpoint_invalidate

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13 18:00:38 +00:00
Peter Maydell 48f84ab310 usb: bugfixes
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJeRGbIAAoJEEy22O7T6HE4PZYP/1Drb35WnI+BVyr0sbnDhyLP
 whK0+KAHIy2a3jiwqNO+gpCWAdiERg8qpJCq2ve9tHR10oLBBFHt2TktkvLEUkZx
 ZbxM7jDHzcvvt/0GfWOoP60qF2WGkq/a8x2Qenkn+d/HyfmxNh1C5nwSgVatTcza
 bSQH+M75Ih3iknxfcSrBN1Ib5DHsoI9F1dHjImirG2VbfQKSaF4BMjcOnioDzRr/
 cRgmwKLZSCvUJ/AR3NFhTvvizCmbwhASmIZkgU8/paQx1IFReLi3Ojv6ZBgVyDI/
 IX42qVAoh5Y6waeiiIGpO+80PfDEWQWB6TCX4GgEdJ/SxKnWg1lVP5X83BuNzA5m
 Sl+WSBVmHsN34XvRzENMsZ45Nl0xWio+ZgO0Z2VQq/UhnahcorDXOE1PUiU9wp/z
 SXWrRLU64cXUtPjhg1G+t3MSj2lUAebpS6QnXWUcq/iCXpZgEpmHwwVvTgjIPqez
 BDMz85D+o6l+xF1oYfIHk0r2ktbc94Uz3gYznUqF91rvjV21NwtoG1c0FwGIWRh7
 VbrAOg5FnUGPs7moupspDX+4OlMtdkMQO1+Sf7uIYVhTbQsVSbFTW14QPm7gNozL
 JOC4mznTYgyVztNCsyDpa5vWUUj+Dp05TGslkluxkN/3DtUiudJ42lvV7LHCfMmt
 9xw96bxJQZedd1i8VhnF
 =PlvL
 -----END PGP SIGNATURE-----

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

usb: bugfixes

# gpg: Signature made Wed 12 Feb 2020 20:57:44 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20200212-pull-request:
  uas: fix super speed bMaxPacketSize0
  usb-host: wait for cancel complete

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13 14:44:07 +00:00
Peter Maydell 81f49abaaa * various small fixes and cleanups
* fixes for the ucode revision patch from the previous pull request
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJeRBoQAAoJEL/70l94x66DYOUIAJKM5PDAhOkJpSqoSz2mMVJN
 IOq2YhmbQHSVojUDCUEFnKd2Zja858vsOoAslgce0nbgj+ZNn9WZEVIKeHqkW6cg
 gWybMy1deT5o0U05e6/EIL0id8N5FVMLdUZRdGCFk4qtILFa1kRYJmlwNOMxSVkB
 MSwOy60//+po6lW0WSKD2aTf9qVvZJOQjZozqFrGlIPG/SnqrPZCMRxR/XIrrJuF
 GZZyiAsRXFU1mabr7HafdUj+MYf0DWSvATmihz4wsI/LlXx712uVm9eZ48Rc6PyF
 wEKh17/2bVPoL1g9OeTKYnX9aKt/7C0D98n3W0foG3IpzZzPLX4NaNKPihb5n7I=
 =VlyM
 -----END PGP SIGNATURE-----

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

* various small fixes and cleanups
* fixes for the ucode revision patch from the previous pull request

# gpg: Signature made Wed 12 Feb 2020 15:30:24 GMT
# gpg:                using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# 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:
  target/i386: enable monitor and ucode revision with -cpu max
  target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR
  target/i386: fix TCG UCODE_REV access
  build: move TARGET_GPROF to config-host.mak
  exec: do not define use_icount for user-mode emulation
  minikconf: accept alnum identifiers
  Remove support for CLOCK_MONOTONIC not being defined
  seqlock: fix seqlock_write_unlock_impl function
  vl: Don't mismatch g_strsplit()/g_free()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13 13:40:59 +00:00
Peter Maydell 7ce9ce8993 gtk: refresh rate fix.
cocoa: drop pre-10.12 support.
 ui: rework show-cursor option.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJeRCVJAAoJEEy22O7T6HE4F+QP/1Uq69IJUuSAHf9LbrGp3S1J
 bbAP2bTT72Buqg8AByAZI370EiH5Iqbbb3YVagWqgsMcW0NREPRNvKIQUFrsuo9Z
 UX+f5Rik8OxA/ZtfNT8InuyVosgjjZchS3JF2SvF4QK8NDuYLjaCCipcVmBtpivE
 ZnybH84ubMUsLaDtU44hOcAqlNb/FvvcVLOnbf3SLAL+leWTRg1qvndmx/9C4VW1
 MZK9LmglRQsb955p/JrkCu3ied72H5F3i7ZNUQ1orn/QIkIb2f30IRal2WtUdnKF
 N7ICeq1AVjhC8LysuzDiQWLfQ4xjlOOluH88FV0eoJCOT3vjgjH5eKWwFRkZROkS
 qvymxxdd9KDuPGWD2qeZnJfHayLo4JSCxVCYQuhxxuBNBzVruiOEpUVXQy1Zibn8
 8FCyGL0hXM5ZuY1egrTosXIHVKYTSk2xoooDSzpNPCtW59PZlbe4za7rnZYxmE36
 uBW4YNPrkNepFVJ0QrMccSvjGgSKFESXEwOAfmcfqjd7xv6rGheE9IUuTGuXFKFG
 BfESBm1qs3uSDdM3B+ec37BkBqNrxvUn/OJ1BZd8RHYcaxlXp13tlS9yhlP2RtV1
 6zCztPwe6JZDieDJYr8QY8teKxGM4JybKzkVRXQgVM8LegphFMk5e37gcu3iUWSF
 1+Wvs0gYKJ5Dt3gWpGJW
 =7GVK
 -----END PGP SIGNATURE-----

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

gtk: refresh rate fix.
cocoa: drop pre-10.12 support.
ui: rework show-cursor option.

# gpg: Signature made Wed 12 Feb 2020 16:18:17 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20200212-pull-request:
  ui/cocoa: Drop workarounds for pre-10.12 OSX
  ui: deprecate legacy -show-cursor option
  ui: drop curor_hide global variable.
  ui/gtk: implement show-cursor option
  ui/cocoa: switch to new show-cursor option
  ui/sdl: switch to new show-cursor option
  ui: wire up legacy -show-cursor option
  ui: add show-cursor option
  ui/gtk: Fix gd_refresh_rate_millihz() when widget window is not realized
  ui/gtk: Update gd_refresh_rate_millihz() to handle VirtualConsole

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13 11:06:32 +00:00
Gerd Hoffmann ed71c09ffd qxl: introduce hardware revision 5
The only difference to hardware revision 4 is that the device doesn't
switch to VGA mode in case someone happens to touch a VGA register,
which should make things more robust in configurations with multiple
vga devices.

Swtiching back to VGA mode happens on reset, either full machine
reset or qxl device reset (QXL_IO_RESET ioport command).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-id: 20200206074358.4274-1-kraxel@redhat.com
2020-02-13 08:31:40 +01:00
Richard Henderson 2445971604 tcg: Add tcg_gen_gvec_5_ptr
Extend the vector generator infrastructure to handle
5 vector arguments.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2020-02-12 14:58:36 -08:00
Gerd Hoffmann 8ddcc43592 uas: fix super speed bMaxPacketSize0
For usb2 bMaxPacketSize0 is "n", for usb3 it is "1 << n",
so it must be 9 not 64 ...

rom "Universal Serial Bus 3.1 Specification":

   If the device is operating at Gen X speed, the bMaxPacketSize0
   field shall be set to 09H indicating a 512-byte maximum packet.
   An Enhanced SuperSpeed device shall not support any other maximum
   packet sizes for the default control pipe (endpoint 0) control
   endpoint.

We now announce a 512-byte maximum packet.

Fixes: 89a453d4a5 ("uas-uas: usb3 streams")
Reported-by: Benjamin David Lunt <fys@fysnet.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200117073716.31335-1-kraxel@redhat.com
2020-02-12 17:20:41 +01:00
Gerd Hoffmann 76d0a9362c usb-host: wait for cancel complete
After canceling transfers call into libvirt so it can process the
request, and wait for it to complete.  Also cancel all pending
transfers before exiting qemu.

Buglink: https://bugzilla.redhat.com//show_bug.cgi?id=1749745
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200203114108.23952-1-kraxel@redhat.com
2020-02-12 17:20:31 +01:00
Paolo Bonzini be02cda3af target/i386: enable monitor and ucode revision with -cpu max
These two features were incorrectly tied to host_cpuid_required rather than
cpu->max_features.  As a result, -cpu max was not enabling either MONITOR
features or ucode revision.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:29:51 +01:00
Paolo Bonzini 6702514814 target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR
Even though MSR_IA32_UCODE_REV has been available long before Linux 5.6,
which added it to the emulated MSR list, a bug caused the microcode
version to revert to 0x100000000 on INIT.  As a result, processors other
than the bootstrap processor would not see the host microcode revision;
some Windows version complain loudly about this and crash with a
fairly explicit MICROCODE REVISION MISMATCH error.

[If running 5.6 prereleases, the kernel fix "KVM: x86: do not reset
 microcode version on INIT or RESET" should also be applied.]

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Message-id: <20200211175516.10716-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:29:40 +01:00
Paolo Bonzini 9028c75c9d target/i386: fix TCG UCODE_REV access
This was a very interesting semantic conflict that caused git to move
the MSR_IA32_UCODE_REV read to helper_wrmsr.  Not a big deal, but
still should be fixed...

Fixes: 4e45aff398 ("target/i386: add a ucode-rev property", 2020-01-24)
Message-id: <20200206171022.9289-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:29:30 +01:00
Paolo Bonzini 4cc600d229 build: move TARGET_GPROF to config-host.mak
TARGET_GPROF is the same for all targets, write it to
config-host.mak instead.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: <20200204161104.21077-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:29:27 +01:00
Paolo Bonzini fe3dada317 exec: do not define use_icount for user-mode emulation
use_icount is also defined by stubs/cpu-get-icount.c, we do not need
to have a useless definition in exec.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: <20200204161036.20889-1-pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2020-02-12 16:28:01 +01:00
Marc-André Lureau 1b29af2f41 minikconf: accept alnum identifiers
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:23:02 +01:00
Peter Maydell a284f798f3 Remove support for CLOCK_MONOTONIC not being defined
Some older parts of QEMU's codebase assume that CLOCK_MONOTONIC
might not be defined by the host OS, and have workarounds to
deal with this. However, more recently (notably in commit
50290c002c for qemu-img in mid-2019, but also much
earlier in 2011 in commit 22795174a3 for ui/spice-display.c)
we've written code that assumes CLOCK_MONOTONIC is always
defined. The only host OS anybody's ever noticed this on
is OSX 10.11 and earlier, which we don't support.

So we can assume that all our host OSes have the #define,
and we can remove some now-unnecessary ifdefs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200201172252.6605-1-peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:23:01 +01:00
Luc Michel e261b36810 seqlock: fix seqlock_write_unlock_impl function
The seqlock write unlock function was incorrectly calling
seqlock_write_begin() instead of seqlock_write_end(), and was releasing
the lock before incrementing the sequence. This could lead to a race
condition and a corrupted sequence number becoming odd even though the
lock is not held.

Signed-off-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200129144948.2161551-1-luc.michel@greensocs.com>
Fixes: 988fcafc73 ("seqlock: add QemuLockable support", 2018-08-23)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:23:01 +01:00
Pan Nengyuan 4903602eae vl: Don't mismatch g_strsplit()/g_free()
It's a mismatch between g_strsplit and g_free, it will cause a memory leak as follow:

[root@localhost]# ./aarch64-softmmu/qemu-system-aarch64 -accel help
Accelerators supported in QEMU binary:
tcg
kvm
=================================================================
==1207900==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 8 byte(s) in 2 object(s) allocated from:
    #0 0xfffd700231cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb)
    #1 0xfffd6ec57163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163)
    #2 0xfffd6ec724d7 in g_strndup (/lib64/libglib-2.0.so.0+0x724d7)
    #3 0xfffd6ec73d3f in g_strsplit (/lib64/libglib-2.0.so.0+0x73d3f)
    #4 0xaaab66be5077 in main /mnt/sdc/qemu-master/qemu-4.2.0-rc0/vl.c:3517
    #5 0xfffd6e140b9f in __libc_start_main (/lib64/libc.so.6+0x20b9f)
    #6 0xaaab66bf0f53  (./build/aarch64-softmmu/qemu-system-aarch64+0x8a0f53)

Direct leak of 2 byte(s) in 2 object(s) allocated from:
    #0 0xfffd700231cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb)
    #1 0xfffd6ec57163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163)
    #2 0xfffd6ec7243b in g_strdup (/lib64/libglib-2.0.so.0+0x7243b)
    #3 0xfffd6ec73e6f in g_strsplit (/lib64/libglib-2.0.so.0+0x73e6f)
    #4 0xaaab66be5077 in main /mnt/sdc/qemu-master/qemu-4.2.0-rc0/vl.c:3517
    #5 0xfffd6e140b9f in __libc_start_main (/lib64/libc.so.6+0x20b9f)
    #6 0xaaab66bf0f53  (./build/aarch64-softmmu/qemu-system-aarch64+0x8a0f53)

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-Id: <20200110091710.53424-2-pannengyuan@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 16:23:01 +01:00
Peter Maydell 483644c25b ui/cocoa: Drop workarounds for pre-10.12 OSX
Our official OSX support policy covers the last two released versions.
Currently that is 10.14 and 10.15.  We also may work on older versions, but
don't guarantee it.

In commit 50290c002c in mid-2019 we introduced some uses of
CLOCK_MONOTONIC which incidentally broke compilation for pre-10.12 OSX
versions (see LP:1861551). We don't intend to fix that, so we might
as well drop the code in ui/cocoa.m which caters for pre-10.12
versions as well. (For reference, 10.11 fell out of Apple extended
security support in September 2018.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200201170534.22123-1-peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-12 13:27:08 +01:00
Gerd Hoffmann 2811ce368e ui: deprecate legacy -show-cursor option
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-02-12 13:25:17 +01:00
Gerd Hoffmann 9b6701290a ui: drop curor_hide global variable.
No users left.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-02-12 13:25:17 +01:00
Gerd Hoffmann 9cfca0b937 ui/gtk: implement show-cursor option
When specified just set null_cursor to NULL so we get the default
pointer instead of a blank pointer.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-02-12 13:25:17 +01:00
Gerd Hoffmann 3487da6aeb ui/cocoa: switch to new show-cursor option
Use DisplayOpts settings to set the new file-global cursor_hide
variable, stop using the qemu-global cursor_hide variable.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-02-12 13:25:17 +01:00
Gerd Hoffmann 86a088e624 ui/sdl: switch to new show-cursor option
Use DisplayOpts settings instead of cursor_hide global variable.
Also make "-display sdl,show-cursor=on" work.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-02-12 13:25:17 +01:00
Gerd Hoffmann 09aa82ee7a ui: wire up legacy -show-cursor option
Set new show-cursor display option when legacy -show-cursor
is specified on the command line.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-02-12 13:25:17 +01:00
Gerd Hoffmann 7027bdd77f ui: add show-cursor option
When enabled, this forces showing the mouse cursor,
i.e. do not hide the pointer on mouse grabs.
Defaults to off.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-02-12 13:25:17 +01:00
Philippe Mathieu-Daudé 7f4d96f960 ui/gtk: Fix gd_refresh_rate_millihz() when widget window is not realized
gtk_widget_get_window() returns NULL if the widget's window is not
realized, and QEMU crashes. Example under gtk 3.22.30 (mate 1.20.1):

  qemu-system-x86_64: Gdk: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
  (gdb) bt
  #0  0x00007ffff496cf70 in gdk_window_get_origin () from /usr/lib64/libgdk-3.so.0
  #1  0x00007ffff49582a0 in gdk_display_get_monitor_at_window () from /usr/lib64/libgdk-3.so.0
  #2  0x0000555555bb73e2 in gd_refresh_rate_millihz (window=0x5555579d6280) at ui/gtk.c:1973
  #3  gd_vc_gfx_init (view_menu=0x5555579f0590, group=0x0, idx=0, con=<optimized out>, vc=0x5555579d4a90, s=0x5555579d49f0) at ui/gtk.c:2048
  #4  gd_create_menu_view (s=0x5555579d49f0) at ui/gtk.c:2149
  #5  gd_create_menus (s=0x5555579d49f0) at ui/gtk.c:2188
  #6  gtk_display_init (ds=<optimized out>, opts=0x55555661ed80 <dpy>) at ui/gtk.c:2256
  #7  0x000055555583d5a0 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4358

Fixes: c4c00922cc and 28b58f19d2 (display/gtk: get proper refreshrate)
Reported-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Jan Kiszka <jan.kiszka@web.de>
Message-id: 20200208161048.11311-3-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-12 13:15:25 +01:00
Philippe Mathieu-Daudé 31ab416d7d ui/gtk: Update gd_refresh_rate_millihz() to handle VirtualConsole
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Jan Kiszka <jan.kiszka@web.de>
Message-id: 20200208161048.11311-2-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-02-12 13:15:25 +01:00
Taylor Simpson e6cadf49c3 tcg: Add support for a helper with 7 arguments
Currently, helpers can only take up to 6 arguments.  This patch adds the
capability for up to 7 arguments.  I have tested it with the Hexagon port
that I am preparing for submission.

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <1580942510-2820-1-git-send-email-tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2020-02-11 16:29:16 -08:00
Max Filippov b55f54bc96 exec: flush CPU TB cache in breakpoint_invalidate
When a breakpoint is inserted at location for which there's currently no
virtual to physical translation no action is taken on CPU TB cache. If a
TB for that virtual address already exists but is not visible ATM the
breakpoint won't be hit next time an instruction at that address will be
executed.

Flush entire CPU TB cache in breakpoint_invalidate to force
re-translation of all TBs for the breakpoint address.

This change fixes the following scenario:
- linux user application is running
- a breakpoint is inserted from QEMU gdbstub for a user address that is
  not currently present in the target CPU TLB
- an instruction at that address is executed, but the external debugger
  doesn't get control.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Message-Id: <20191127220602.10827-2-jcmvbkbc@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2020-02-11 15:47:49 -08:00
Peter Maydell e18e5501d8 virtiofsd pull 2020-02-10
Coverity fixes and a reworked man page.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAl5BkkUACgkQBRYzHrxb
 /efmyg/+KMO0Tf+nU/an25qML+SSsNxWnbPdkEzbco6yZOyWukDU2JvlQCmr/S3F
 btHhhpLVbjtG/WpptcVJeOTBxFLy/MadfWfIzh5MsfcwLi57NZ2LqTZTx2ThWi3e
 suh59GgjNSPpXWclCmtJty6eYM/VazS2dfsAVlgH6QO18uMaUpSE7jpgtn5/+TP4
 Stt2ieO8DYicSAk4vuUOCRx6QzPTtDKfjinvRsH3uWppxwGvIXa/GoCcdhuYfCMG
 2hkt9YSWvAKRe+0DkPSr12iHcWRzrgV9DBWgtm3KVvNnu4LFmF1kbiFd0xo6pvU2
 FG2wi3AUX86NyKnABr7ZPU+m+LmnQBbTfDe7Ppsokfa5FOIUx/BTVnjSFpirnKo9
 Digwg7xASKG/Qw8JmyWR2e8pqWUJ4MPIhbTnSt3ERd8rS0kIHHNttu2zdEWJvlyc
 e+lBS3K00wwypOcLd0+jIIROPQ5g4lgWKkKXMbXsQmPp+ERPn/2gblHSsKx8Jjbs
 1Heq1Kdam9NB1rynnvs+ZxVjanrKB802UWlTIKXaeyI+0+pBbAIEfDI3scEarrVY
 n0dtTIey4mYSRyKVPXhQa/FvbsXjYFSUgR8JGVoOp29Y8e9JC/YUjjy+dYXOxUWs
 VxNHgzdSQHPX0z4duVW2yDW6QckeZiqyXrpbjdAIxn3TfUt02So=
 =cEQ6
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20200210' into staging

virtiofsd pull 2020-02-10

Coverity fixes and a reworked man page.

# gpg: Signature made Mon 10 Feb 2020 17:26:29 GMT
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full]
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert-gitlab/tags/pull-virtiofs-20200210:
  docs: add virtiofsd(1) man page
  virtiofsd: do_read missing NULL check
  virtiofsd: load_capng missing unlock
  virtiofsd: fv_create_listen_socket error path socket leak
  virtiofsd: Remove fuse_req_getgroups

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-10 18:09:14 +00:00
Stefan Hajnoczi 6a7e2bbee5 docs: add virtiofsd(1) man page
Document the virtiofsd(1) program and its command-line options.  This
man page is a rST conversion of the original texi documentation that I
wrote.

Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-02-10 17:25:52 +00:00
Dr. David Alan Gilbert 99ce9a7e60 virtiofsd: do_read missing NULL check
Missing a NULL check if the argument fetch fails.

Fixes: Coverity CID 1413119
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-02-10 17:24:43 +00:00
Dr. David Alan Gilbert 686391112f virtiofsd: load_capng missing unlock
Missing unlock in error path.

Fixes: Covertiy CID 1413123
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-02-10 17:24:43 +00:00
Dr. David Alan Gilbert 6fa249027f virtiofsd: fv_create_listen_socket error path socket leak
If we fail when bringing up the socket we can leak the listen_fd;
in practice the daemon will exit so it's not really a problem.

Fixes: Coverity CID 1413121
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-02-10 17:24:43 +00:00
Dr. David Alan Gilbert 988717b46b virtiofsd: Remove fuse_req_getgroups
Remove fuse_req_getgroups that's unused in virtiofsd; it came in
from libfuse but we don't actually use it.  It was called from
fuse_getgroups which we previously removed (but had left it's header
in).

Coverity had complained about null termination in it, but removing
it is the easiest answer.

Fixes: Coverity CID: 1413117 (String not null terminated)
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-02-10 17:24:43 +00:00
Peter Maydell 81a23caf47 Pull request
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl5BIR4ACgkQnKSrs4Gr
 c8gC9ggAk4npQQyMIgrV8FM3oJfs7sv6hAuyhcnMw4xqNDGw1zTelwSY4Vif9IRu
 0dU3xNZKR1LvWqmu5ciShTp8VQ9wtTtGJzI3T90+pweYwa3C3i1go7DXyxAd4EUm
 B0HqD3pb9b7X/wwEC1bi8MlGsJCpWqeLHBWXB4C2Gt1Erjo8I3UHKZBWDQTSfwgz
 aWBvuxp+H2eIqr6aUyHziF2htGminrmQm8m9oIzx6NXghvfLzo4CPr8m0vOZiWdn
 096Y08ZLbCT3IQBfvQDKHRHqPdKGB0MzCdUyN8q+WtApq+dA/HBFGyI2X845iGPf
 XY6qMf/TTRHenV7oBwgU8uMzEI4eMw==
 =8xC9
 -----END PGP SIGNATURE-----

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

Pull request

# gpg: Signature made Mon 10 Feb 2020 09:23:42 GMT
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  hw/core: Allow setting 'virtio-blk-device.scsi' property on OSX host
  block: fix crash on zero-length unaligned write and read

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-10 17:08:51 +00:00
Peter Maydell 2b8a51cdb3 9p patches:
- some more protocol sanity checks
 - qtest for readdir
 - Christian Schoenebeck now official reviewer
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEtIKLr5QxQM7yo0kQcdTV5YIvc9YFAl4+c3IACgkQcdTV5YIv
 c9Z0eA/8Dpl4KpT2GosgsCj9iqGnT25B0UYiVdLL3aYsJfCgoD7MV0b/v6cK30SI
 XyJS2sAMMdGUfOhy+dRUVzSwwKtQOUR9s8zudD5zZ95CtDBGd0c8KdX6TktXRv7U
 pnxej9zL29b9+OK6zTv7jzPmpiTkJ1AXa4Rs59DccBaGn3AItgN9VRkOWylMiNir
 m4EJh/v5BBTvO9754nExKwgsQHt9eX6jmp+uiRwC2bFirIIbt9bQdwUlX8km03Ml
 Qm8gdpJaBgBubFwH1LvN/DPX0JnShGbGonO1zq8SS9NUkZJuSPtI3LY+X1oC9Wgi
 ZWLnGc9yTAeaABeg5Hk2jGapxtSL3qEEZUKitRJFrnmSe+R0PcAdjuN9DZEl56rP
 zOj0+YUtUggoRd0iwzlZkpga8mKnGM63jovT6cOOTXuLWoh4VlsvBnZSguxKjT2x
 rwuEjNA/ctsT5sl6Q++iM8AlrQmrajKphFpT19MtalUN9pNlk2C8PPBQ3xPVTlwT
 V3YO4x49hkKbJIUoWqNRwwTQUVsFr3vkhf4IJwq7MBC++wPBoq9W1kQsjcxiZfDP
 m1drND5AM9d7E8PAgGsvNO2C41rH7funoZo+NVrrz+Sb01JJI+pE1A2mKrIsTvmh
 uxAEv+U6dqS/EjCTY1lyAiM5nLN0qZ8IQiPO1+yxJmkbDJIuJgM=
 =oMrh
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2020-02-08' into staging

9p patches:
- some more protocol sanity checks
- qtest for readdir
- Christian Schoenebeck now official reviewer

# gpg: Signature made Sat 08 Feb 2020 08:38:10 GMT
# gpg:                using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6
# gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full]
# gpg:                 aka "Gregory Kurz <gregory.kurz@free.fr>" [full]
# gpg:                 aka "[jpeg image of size 3330]" [full]
# Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6

* remotes/gkurz/tags/9p-next-2020-02-08:
  MAINTAINERS: 9pfs: Add myself as reviewer
  tests/virtio-9p: added readdir test
  hw/9pfs/9p-synth: added directory for readdir test
  9pfs: validate count sent by client with T_readdir
  9pfs: require msize >= 4096
  tests/virtio-9p: add terminating null in v9fs_string_read()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-10 16:07:29 +00:00
Peter Maydell 73d336510c - Python 3 cleanups:
. Remove text about Python 2 in qemu-deprecated (Thomas)
   . Remove shebang header (Paolo, Philippe)
   . scripts/checkpatch.pl now allows Python 3 interpreter (Philippe)
   . Explicit usage of Python 3 interpreter in scripts (Philippe)
   . Fix Python scripts permissions (Paolo, Philippe)
   . Drop 'from __future__ import print_function' (Paolo)
   . Specify minimum python requirements in ReadTheDocs configuration (Alex)
 - Test UNIX/EXEC transports with migration (Oksana)
 - Added extract_from_rpm helper, improved extract_from_deb (Liam)
 - Allow to use other serial consoles than default one (Philippe)
 - Various improvements in QEMUMonitorProtocol (Wainer)
 - Fix kvm_available() on ppc64le (Wainer)
 -----BEGIN PGP SIGNATURE-----
 
 iQIyBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAl49e+QACgkQ4+MsLN6t
 wN7E6A/3dzCLP0QDoT/C2rC1uu2yXBpXsSUSGeRCA+NLGEOpkyWiEK/vCQp/WxGO
 YU3ToO5NIGMxjVGhy14D1U4NrmiUhxmkGlJQJ60WKAO/oJBElHz8aR2keGlbkBp3
 mh/Amyw+ubM3aBYcAmBbgn0y7yr+lV62mD1JmffQebwIMsT+6aL4XhZ6Lf8PAEkY
 0pCK30O0j8Mwk8ppwKjoRT0WhhcKInmaLElbcOstoqVjQerGV7ho7VjlS9v2BPeg
 uQbDbv5lask7XVoJzortQ9nP2Tq3R+T7hNc0RPa0/tuqZ/6ucq6eYbFgbr/S7r3/
 Lem3ByA1EPlNzjq1HZoU3zx0/Ydq6qPyiudO9fLOCDIGVG6ZKXmKVq71lWHotcAw
 Oir+RPSVhPmOekhOPXAEi3mwAqRX3iSUGSsm+aLgq9I1DJfdE8dG2n5ZKVSWClmF
 xwb8Dhlz1T5SIlLderfVFryLzV2/LoHQOpr37phw6Ec5gox6UR0i4ozKEaY1zmZV
 THvweFraoBUGwIN7ULfP8jxs8hjQY9HIxhYjNvPxqAQekH6hO97qkjbs44ujvNrS
 D/yL4Gk4XgDjGP37aeBoY0zCUMM3cpWZdVfycDiXe6r949ifOoF0gZSny7ryRTGh
 s1RvQAM9VaYcGTERkLLCC+QMuz24nN/cEg9H3SFlfHBGVBxaBw==
 =8xBQ
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/philmd-gitlab/tags/python-next-20200207' into staging

- Python 3 cleanups:
  . Remove text about Python 2 in qemu-deprecated (Thomas)
  . Remove shebang header (Paolo, Philippe)
  . scripts/checkpatch.pl now allows Python 3 interpreter (Philippe)
  . Explicit usage of Python 3 interpreter in scripts (Philippe)
  . Fix Python scripts permissions (Paolo, Philippe)
  . Drop 'from __future__ import print_function' (Paolo)
  . Specify minimum python requirements in ReadTheDocs configuration (Alex)
- Test UNIX/EXEC transports with migration (Oksana)
- Added extract_from_rpm helper, improved extract_from_deb (Liam)
- Allow to use other serial consoles than default one (Philippe)
- Various improvements in QEMUMonitorProtocol (Wainer)
- Fix kvm_available() on ppc64le (Wainer)

# gpg: Signature made Fri 07 Feb 2020 15:01:56 GMT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/python-next-20200207: (46 commits)
  .readthedocs.yml: specify some minimum python requirements
  drop "from __future__ import print_function"
  make all Python scripts executable
  scripts/signrom: remove Python 2 support, add shebang
  tests/qemu-iotests/check: Only check for Python 3 interpreter
  scripts: Explicit usage of Python 3 (scripts without __main__)
  tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__)
  tests/vm: Remove shebang header
  tests/acceptance: Remove shebang header
  scripts/tracetool: Remove shebang header
  scripts/minikconf: Explicit usage of Python 3
  scripts: Explicit usage of Python 3 (scripts with __main__)
  tests: Explicit usage of Python 3
  tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__)
  tests/qemu-iotests/check: Allow use of python3 interpreter
  scripts/checkpatch.pl: Only allow Python 3 interpreter
  tests/acceptance/migration: Default to -nodefaults
  tests/acceptance/migration: Add the 'migration' tag
  tests/acceptance/migration: Test EXEC transport when migrating
  tests/acceptance/migration: Test UNIX transport when migrating
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-10 12:07:26 +00:00
Christian Schoenebeck 2822602cbe MAINTAINERS: 9pfs: Add myself as reviewer
Currently 9pfs is only taken care of by Greg. Since I am actively working
on 9pfs and already became quite used to the code base, it makes sense to
volunteer as reviewer for 9pfs related patches.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Cc: Greg Kurz <groug@kaod.org>
Message-Id: <E1j04TG-0001xn-JY@lizzy.crudebyte.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-08 09:29:04 +01:00
Christian Schoenebeck 4829469fd9 tests/virtio-9p: added readdir test
The first readdir test simply checks the amount of directory
entries returned by 9pfs server, according to the created amount
of virtual files on 9pfs synth driver side. Then the subsequent
readdir test also checks whether all directory entries have the
expected file names (as created on 9pfs synth driver side),
ignoring their precise order in result list though.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <e0b4402722a877178f8fb6a8ad7b64bb20150613.1579567020.git.qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-08 09:29:04 +01:00
Christian Schoenebeck af46a3b233 hw/9pfs/9p-synth: added directory for readdir test
This will provide the following virtual files by the 9pfs
synth driver:

  - /ReadDirDir/ReadDirFile99
  - /ReadDirDir/ReadDirFile98
  ...
  - /ReadDirDir/ReadDirFile1
  - /ReadDirDir/ReadDirFile0

This virtual directory and its virtual 100 files will be
used by the upcoming 9pfs readdir tests.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <5408c28c8de25dd575b745cef63bf785305ccef2.1579567020.git.qemu_oss@crudebyte.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-08 09:29:04 +01:00
Christian Schoenebeck d36a5c2270 9pfs: validate count sent by client with T_readdir
A good 9p client sends T_readdir with "count" parameter that's sufficiently
smaller than client's initially negotiated msize (maximum message size).
We perform a check for that though to avoid the server to be interrupted
with a "Failed to encode VirtFS reply type 41" transport error message by
bad clients. This count value constraint uses msize - 11, because 11 is the
header size of R_readdir.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <3990d3891e8ae2074709b56449e96ab4b4b93b7d.1579567020.git.qemu_oss@crudebyte.com>
[groug: added comment ]
Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-08 09:28:54 +01:00
Christian Schoenebeck e16453a31a 9pfs: require msize >= 4096
A client establishes a session by sending a Tversion request along with a
'msize' parameter which client uses to suggest server a maximum message
size ever to be used for communication (for both requests and replies)
between client and server during that session. If client suggests a 'msize'
smaller than 4096 then deny session by server immediately with an error
response (Rlerror for "9P2000.L" clients or Rerror for "9P2000.u" clients)
instead of replying with Rversion.

So far any msize submitted by client with Tversion was simply accepted by
server without any check. Introduction of some minimum msize makes sense,
because e.g. a msize < 7 would not allow any subsequent 9p operation at
all, because 7 is the size of the header section common by all 9p message
types.

A substantial higher value of 4096 was chosen though to prevent potential
issues with some message types. E.g. Rreadlink may yield up to a size of
PATH_MAX which is usually 4096, and like almost all 9p message types,
Rreadlink is not allowed to be truncated by the 9p protocol. This chosen
size also prevents a similar issue with Rreaddir responses (provided client
always sends adequate 'count' parameter with Treaddir), because even though
directory entries retrieval may be split up over several T/Rreaddir
messages; a Rreaddir response must not truncate individual directory entries
though. So msize should be large enough to return at least one directory
entry with the longest possible file name supported by host. Most file
systems support a max. file name length of 255. Largest known file name
lenght limit would be currently ReiserFS with max. 4032 bytes, which is
also covered by this min. msize value because 4032 + 35 < 4096.

Furthermore 4096 is already the minimum msize of the Linux kernel's 9pfs
client.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <8ceecb7fb9fdbeabbe55c04339349a36929fb8e3.1579567019.git.qemu_oss@crudebyte.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-08 09:28:43 +01:00
Christian Schoenebeck 2e2293c238 tests/virtio-9p: add terminating null in v9fs_string_read()
The 9p protocol sends strings in general without null termination
over the wire. However for future use of this functions it is
beneficial for the delivered string to be null terminated though
for being able to use the string with standard C functions which
often rely on strings being null terminated.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <52c84e2ce3bcafc2a38eed13b8c8e23bc1a8ecb9.1579567019.git.qemu_oss@crudebyte.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-08 09:24:19 +01:00
Peter Maydell 93c86fff53 target-arm queue:
* monitor: fix query-cpu-model-expansion crash when using machine type none
  * Support emulation of the ARMv8.1-VHE architecture feature
  * bcm2835_dma: fix bugs in TD mode handling
  * docs/arm-cpu-features: Make kvm-no-adjvtime comment clearer
  * stellaris, stm32f2xx_timer, armv7m_systick: fix minor memory leaks
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAl49dPwZHHBldGVyLm1h
 eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3p9KD/wOFkUyngvYcQ3YZON8CvIU
 UQfrq+akWUwjZprwIEuXn9V0VnE/e4tqKN6C/i3wxtEjcu+Gbuo2LkMN+xH6NPTd
 v/T5fpxb3W4f7wFsh/LEF3UHBncSBMyCRziCFL2R9YQp/sg+kVOSzSdstIJP9Bzb
 jBCBPWN+ea3jhd2j0M4Le3DFOx68TOWfbIaNXnsL1e6mcey8a7ij/Qq9KMw5hHGZ
 pkRn6akjUVCZRd9oIAw3XNS8I6WO0b1I7nL1v4YpaKlXZYWXl2RhpHtlBzhjyhmB
 QhJgIoOVyma9afX9zRGw+hvMOBp+BH4M2X9K0dNUytD3WI2hvEl3Q+ow3bswywsn
 vGMB1o6uw24urSGTh3HzuIMCDBXNpvioU9T3UauL5hwtp+nsMTN+EquBdrpQmSl7
 QfbVpNQsADJ+p9z19ftgu8HUMX7ngWWzZHq45SCJgVgXq7eBv3Tu4X6EoN4JoiOj
 wv0q93GRYTAhKBEEuz0/dsgpBMwtCgumjjAsP3MdMOhfTlTggD8KfNYKesczDQVp
 ABzqZixFwAqXOfdCeHLX1NYdqEuV3EZDyxrVqw4JPkO7ovA+kgZvoBbET0kXZj1o
 TeJ9v3xU5j46K/9L29KkIa1rqp4i5Q7ddLUDC0BBI7N45FBeJoYY84JoCoRgRcl9
 lz/x5DmUqdapkG9UURIKOw==
 =gVP3
 -----END PGP SIGNATURE-----

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

target-arm queue:
 * monitor: fix query-cpu-model-expansion crash when using machine type none
 * Support emulation of the ARMv8.1-VHE architecture feature
 * bcm2835_dma: fix bugs in TD mode handling
 * docs/arm-cpu-features: Make kvm-no-adjvtime comment clearer
 * stellaris, stm32f2xx_timer, armv7m_systick: fix minor memory leaks

# gpg: Signature made Fri 07 Feb 2020 14:32:28 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200207: (48 commits)
  stellaris: delay timer_new to avoid memleaks
  stm32f2xx_timer: delay timer_new to avoid memleaks
  armv7m_systick: delay timer_new to avoid memleaks
  docs/arm-cpu-features: Make kvm-no-adjvtime comment clearer
  bcm2835_dma: Re-initialize xlen in TD mode
  bcm2835_dma: Fix the ylen loop in TD mode
  target/arm: Raise only one interrupt in arm_cpu_exec_interrupt
  target/arm: Use bool for unmasked in arm_excp_unmasked
  target/arm: Pass more cpu state to arm_excp_unmasked
  target/arm: Move arm_excp_unmasked to cpu.c
  target/arm: Enable ARMv8.1-VHE in -cpu max
  target/arm: Update arm_cpu_do_interrupt_aarch64 for VHE
  target/arm: Update get_a64_user_mem_index for VHE
  target/arm: check TGE and E2H flags for EL0 pauth traps
  target/arm: Update {fp,sve}_exception_el for VHE
  target/arm: Update arm_phys_excp_target_el for TGE
  target/arm: Flush tlbs for E2&0 translation regime
  target/arm: Flush tlb for ASID changes in EL2&0 translation regime
  target/arm: Add VHE timer register redirection and aliasing
  target/arm: Add VHE system register redirection and aliasing
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-07 18:02:52 +00:00
Philippe Mathieu-Daudé 11a18c84db hw/core: Allow setting 'virtio-blk-device.scsi' property on OSX host
Commit ed65fd1a27 ("virtio-blk: switch off scsi-passthrough by
default") changed the default value of the 'scsi' property of
virtio-blk, which is only available on Linux hosts. It also added
an unconditional compat entry for 2.4 or earlier machines.

Trying to set this property on a pre-2.5 machine on OSX, we get:

   Unexpected error in object_property_find() at qom/object.c:1201:
   qemu-system-x86_64: -device virtio-blk-pci,id=scsi0,drive=drive0: can't apply global virtio-blk-device.scsi=true: Property '.scsi' not found

Fix this error by marking the property optional.

Fixes: ed65fd1a27 ("virtio-blk: switch off scsi-passthrough by default")
Suggested-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20200207001404.1739-1-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-02-07 16:49:39 +00:00