Commit Graph

77237 Commits

Author SHA1 Message Date
Robert Foley 6ee982c9ab tests/vm: allow wait_ssh() to specify command
This allows for waiting for completion of arbitrary commands.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Peter Puhov <peter.puhov@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200529203458.1038-7-robert.foley@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
Robert Foley e56c45047b tests/vm: Add ability to select QEMU from current build
Added a new special variable QEMU_LOCAL=1, which
will indicate to take the QEMU binary from the current
build.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Peter Puhov <peter.puhov@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200529203458.1038-6-robert.foley@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
Robert Foley d5326a2437 tests/vm: Pass --debug through for vm-boot-ssh
This helps debug issues that occur during the boot sequence.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Peter Puhov <peter.puhov@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200529203458.1038-5-robert.foley@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
John Snow c95dddce49 python/qemu/qtest: Check before accessing _qtest
It can be None; so add assertions or exceptions where appropriate to
guard the access accordingly.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-30-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
John Snow de210ec53c python/qemu/qmp: assert sockfile is not None
In truth, if you don't do this, you'll just get a TypeError
exception. Now, you'll get an AssertionError.

Is this tangibly better? No.
Does mypy complain less? Yes.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-21-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
John Snow 7af67d694e python/qemu/qmp: use True/False for non/blocking modes
The type system doesn't want integers.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-15-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
John Snow 1dda0404d8 python/qemu: Adjust traceback typing
mypy considers it incorrect to use `bool` to statically return false,
because it will assume that it could conceivably return True, and gives
different analysis in that case. Use a None return to achieve the same
effect, but make mypy happy.

Note: Pylint considers function signatures as code that might trip the
duplicate-code checker. I'd rather not disable this as it does not
trigger often in practice, so I'm disabling it as a one-off and filed a
change request; see https://github.com/PyCQA/pylint/issues/3619

Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-14-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
John Snow 0add048fbd python/qemu: fix socket.makefile() typing
Note:

A bug in typeshed (https://github.com/python/typeshed/issues/3977)
misinterprets the type of makefile(). Work around this by explicitly
stating that we are opening a text-mode file.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-13-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
John Snow 3797dbcbb7 python/qemu: remove Python2 style super() calls
Use the Python3 style instead.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-12-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:31 +02:00
John Snow 8dfac2edb2 python/qemu: delint; add flake8 config
Mostly, ignore the "no bare except" rule, because flake8 is not
contextual and cannot determine if we re-raise. Pylint can, though, so
always prefer pylint for that.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200528222129.23826-5-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:30 +02:00
John Snow 9b8ccd6d5b python/qemu: delint and add pylintrc
Bring our these files up to speed with pylint 2.5.0.
Add a pylintrc file to formalize which pylint subset
we are targeting.

The similarity ignore is there to suppress similarity
reports across imports, which for typing constants,
are going to trigger this report erroneously.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200528222129.23826-4-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:30 +02:00
John Snow 053774bdec python/qemu/machine: remove logging configuration
Python 3.5 and above do not print a warning when logging is not
configured. As a library, it's best practice to leave logging
configuration to the client executable.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-22-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:30 +02:00
Vladimir Sementsov-Ogievskiy e0e925a611 python/qemu/machine: add kill() method
Add method to hard-kill vm, without any quit commands.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Message-Id: <20200217150246.29180-19-vsementsov@virtuozzo.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:07 +02:00
John Snow 2d110c1149 python: remove more instances of sys.version_info
We guarantee 3.5+ everywhere; remove more dead checks. In general, try
to avoid using version checks and instead prefer to attempt behavior
when possible.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514035230.25756-1-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 18:25:07 +02:00
John Snow c7b942d7f8 scripts/qmp: Fix shebang and imports
There's more wrong with these scripts; They are in various stages of
disrepair. That's beyond the scope of this current patchset.

This just mechanically corrects the imports and the shebangs, as part of
ensuring that the python/qemu/lib refactoring didn't break anything
needlessly.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20200528222129.23826-2-jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 13:56:46 +02:00
Philippe Mathieu-Daudé 5aa628045d scripts/modules/module_block: Use Python 3 interpreter & add pseudo-main
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200512103238.7078-6-philmd@redhat.com>
2020-05-31 13:56:46 +02:00
Philippe Mathieu-Daudé e57a707a82 scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main()
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200512103238.7078-5-philmd@redhat.com>
2020-05-31 13:56:46 +02:00
Philippe Mathieu-Daudé 06d4c71f48 scripts/qmp: Use Python 3 interpreter
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200512103238.7078-4-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 13:56:46 +02:00
Philippe Mathieu-Daudé 806c200ef4 scripts/qemu-gdb: Use Python 3 interpreter
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200512103238.7078-3-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 13:56:46 +02:00
Philippe Mathieu-Daudé 6acc5c0469 scripts/qemugdb: Remove shebang header
These scripts are loaded as plugin by GDB (and they don't
have any __main__ entry point). Remove the shebang header.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200512103238.7078-2-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31 13:56:46 +02:00
Peter Maydell c86274bc2e Testing and one plugin fix:
- support alternates for genisoimage to test/vm
   - add clang++ to clang tests
   - fix record/replay smoke test
   - enable more softfloat tests
   - better detection of hung gdb
   - upgrade aarch64 tcg test x-compile to gcc-10
   - fix plugin cpu_index clash vs threads
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAl7OazAACgkQ+9DbCVqe
 KkRFQwf/VPIy5u556hyXsXLW4cZeJG8zx4fOUhkLTecDL1ch6A+9io1EIyWCmkyU
 GmyuR7Lg5J3f5gsOHydNTiOKu3/VKYkjFAGhGGjz2jDHFz7tA3UWgMO58Nce0g5R
 IxNGD0IrJwyM0m1H5tB8NEkd7AAOnpGslr0YoE5eX1MHpeXSiDmXxIvYUA/7nktY
 AFld8wNh9IG1Gg8Ww5Iyxn4fuxggEtzFFvvjrZVZq5rKdDgv+9D3M2cIjNvfmSGV
 zIBjZBOFwopGk9cNMTk91oo4mEqH3BBrCHsxAmOnyf4WzH4us8TdRCr9dHKzxiFt
 YN/3iOP2IUZqstGGV/PY50WI0RQEoQ==
 =2Krq
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-tcg-plugins-270520-1' into staging

Testing and one plugin fix:

  - support alternates for genisoimage to test/vm
  - add clang++ to clang tests
  - fix record/replay smoke test
  - enable more softfloat tests
  - better detection of hung gdb
  - upgrade aarch64 tcg test x-compile to gcc-10
  - fix plugin cpu_index clash vs threads

# gpg: Signature made Wed 27 May 2020 14:29:20 BST
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-testing-tcg-plugins-270520-1:
  tests/tcg: add new threadcount test
  linux-user: properly "unrealize" vCPU object
  cpus-common: ensure auto-assigned cpu_indexes don't clash
  tests/docker: use a gcc-10 based image for arm64 tests
  tests/docker: add debian11 base image
  tests/tcg: better detect confused gdb which can't connect
  tests/fp: split and audit the conversion tests
  tests/fp: enable extf80_le_quite tests
  tests/tcg: fix invocation of the memory record/replay tests
  travis.yml: Use clang++ in the Clang tests
  tests/vm: pass --genisoimage to basevm script
  configure: add alternate binary for genisoimage

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-29 17:41:45 +01:00
Peter Maydell b8bee16e94 hw/dispaly/sm501: bugfixes, add sanity checks.
hw/display: use tracepoints, misc cleanups.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCgAGBQJez7AUAAoJEEy22O7T6HE4JvgQAKtszLGyFKlkFv1RDuUc35NY
 hWsEbglGPesn2jFMxL1TI7hr+yb7qyaakbsv1WBhRpmI22BXJcNRjGv9XlWDzp7i
 LnE2Zm5WwJ6Z53G70inybzIp1sRLvZXl8c0218/bCiH1i37OR+dwXGmg8lMhU13P
 QcVmzPYSVqj8/qkS6zmZHMbkVk2jonOp7S0wqxI7GHgAclB5K4BZHy4i+s0V2zYK
 KesIvVdyFvgqzIWvR3CwJC7HKVDBz4whDwzASNdICUbEj+C99wq4euZY7idsonoM
 NEbxIXK23iAKwl75hLiN9KDaXWTzo7wBpQze/6PDtz+l4n6zj0Ig9SRGIXAQ3+NW
 HjRDUBn0gXA0TTrSzP9F7/3nHX7khHjD87NxguFjiYRJCuEWNCIgqMkVb1Rgrag0
 WOlH+Rn0BJM0dedBRgdGvGnwvZouDpEdqimvQ0JD93PEun/x1yFy4t/U4EWI+RM7
 V9QiZ2kIgH/EbF4fkt7R+9Y86w5ZNn4YNbyP42zx5b/x0gcWzcU/yP/JPhsAP7gM
 EgzbTKW6KDqUQQtKn/7taHgpje/XK5AVtcqt7HbM46tF6koIUqTncSrEqnV7tAHy
 yagAqn4pQjs7m4Yd2Vk6jhVXM5x5vGqrRZUHQjroeX++vmetTjclNyMd6P9DIP+j
 +kCoG85UpPraCLHiQcu9
 =WVh1
 -----END PGP SIGNATURE-----

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

hw/dispaly/sm501: bugfixes, add sanity checks.
hw/display: use tracepoints, misc cleanups.

# gpg: Signature made Thu 28 May 2020 13:35:32 BST
# 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-20200528-pull-request: (21 commits)
  sm501: Remove obsolete changelog and todo comment
  sm501: Optimize small overlapping blits
  sm501: Replace hand written implementation with pixman where possible
  sm501: Clean up local variables in sm501_2d_operation
  sm501: Use BIT(x) macro to shorten constant
  sm501: Shorten long variable names in sm501_2d_operation
  sm501: Convert printf + abort to qemu_log_mask
  hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask()
  hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP)
  hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR)
  hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegion
  hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR)
  hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report()
  hw/display/dpcd: Convert debug printf()s to trace events
  hw/display/dpcd: Fix memory region size
  hw/display/cirrus_vga: Convert debug printf() to trace event
  hw/display/cirrus_vga: Use qemu_log_mask(ERROR) instead of debug printf
  hw/display/cirrus_vga: Use qemu_log_mask(UNIMP) instead of debug printf
  hw/display/cirrus_vga: Convert debug printf() to trace event
  hw/display/cg3: Convert debug printf()s to trace events
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-28 18:13:20 +01:00
Peter Maydell a20ab81d22 Fixes and improvements for the gitlab-CI:
- Build with other images instead of the broken Debian containers
 - Fix building with the latest version of Clang (at least wrt. to
   the gitlab-CI pipeline)
 - Add Philippe, Alex and Wainer to the Gitlab-CI section in MAINTAINERS
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAl7PgV8RHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbXnww/+OSn3x62FYTSmqbwfF/fTFnOqVndfKjkQ
 UhG4s6ttlFN2H+hgS9sxHB7cwk9WsyN/V7V8DMM3Ytdbmz9wsP8bLx+Q5wXHmIAl
 r/yk9AMrrJtlzGZnt1FcZMJdnrzky9VrqZgM1e0oL8mdPYvTiBmlpJqKoFk0tmWS
 WR0qKYFjETRCWtJgalMJTiYuRtkGIlTjXVo7vLmUNYKp+xCKP5Pn7J9JA+Ds+aXX
 /PuOztd9IT/T0K+F8lbt9iHVSAu+tsVn1CsZy9cLKEDwgmWFWrF2faXA8e9lZdKe
 NctTdClb+DILgezxdd9obIGBJKLy11xPXBopH+8cy9u5vWl1nNUu0tppni83bslB
 Kk4AB/qWLRFxz8xJ4U8jI3w62cH7u+gUIxiDeFuJxociLIhYQRL2otskiJ4q1RRD
 VOdX8PhsOa8LfV+LqJ+vfJQeYrliYaz/1wU+d6tFL3r+k9E+zI0Z+XCDa9z0pL0B
 aBh/UpsUUAUpLyy8JlYm6RejsnHchRqtx/1c+Bdsg84o4BQkFTrrLh3BZFQBncXp
 NYNXuWQi0Teotm01tvOHqZjqwE+2apKcKtdj0E6t0YDrn5Inbvj3/l64KeDEzwQN
 W0ppgJCJm/k5UkfkfEiFvwgvIn8jj3CrszVjlLZurIkDtTSrEqoNBv68AJewGPHL
 YCbuqk8Q8XE=
 =TThW
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-05-28' into staging

Fixes and improvements for the gitlab-CI:
- Build with other images instead of the broken Debian containers
- Fix building with the latest version of Clang (at least wrt. to
  the gitlab-CI pipeline)
- Add Philippe, Alex and Wainer to the Gitlab-CI section in MAINTAINERS

# gpg: Signature made Thu 28 May 2020 10:16:15 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-05-28:
  gitlab-ci: Determine the number of jobs dynamically
  gitlab-ci: Do not use the standard container images from gitlab
  gitlab-ci: Move edk2 and opensbi YAML files to .gitlab-ci.d folder
  GitLab CI: avoid calling before_scripts on unintended jobs
  gitlab-ci: Remove flex/bison packages
  MAINTAINERS: Add Philippe, Alex and Wainer to the Gitlab-CI section
  linux-user: limit check to HOST_LONG_BITS < TARGET_ABI_BITS

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-28 16:18:06 +01:00
Peter Maydell 87023dcc25 A single patch to avoid clashes with the regiser field macros.
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEE9sSsRtSTSGjTuM6PIeENKd+XcFQFAl7OsEcACgkQIeENKd+X
 cFSnDwgAmysoO9ERML98IWkxsGjakXhe3SCCij1FdwARYtQrJt/yjaUmg9tTWxa2
 qwrYDM70G7hNBMtqrJOGFG8nO8LWPkI6N88tNKrFO7ariO2uyb3mKdivt+EVjlhG
 o7vuhZ07xNmqote1zd1eeva+mu3a1pleL57dimlbkzINZp4Wc47n3TwT3WQNAO3J
 jKSbhqaFIXFpuLeXyFUNkd/liKFOcXXo0eV4XyKbYglcB2iX22m3NnGsH0PZMWoe
 hwKwOjk15fOeHbUcgkeah9vcZ2b5T17SmjU8ihHawU18CFaZ0zlAVWJdYWzdG6a/
 CFW2uQhLI6e7Y39PweEqvw7wyjxO3w==
 =X6Pz
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/alistair/tags/pull-register-api-20200527' into staging

A single patch to avoid clashes with the regiser field macros.

# gpg: Signature made Wed 27 May 2020 19:24:07 BST
# gpg:                using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
# gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [full]
# Primary key fingerprint: F6C4 AC46 D493 4868 D3B8  CE8F 21E1 0D29 DF97 7054

* remotes/alistair/tags/pull-register-api-20200527:
  hw/registerfields: Prefix local variables with underscore in macros

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-28 14:54:47 +01:00
Peter Maydell aacc7c8be2 Error reporting patches for 2020-05-27
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAl7N/xISHGFybWJydUBy
 ZWRoYXQuY29tAAoJEDhwtADrkYZTdJYP/j0mnss0or9ZuchxNpFLTV1lBd0wuKqL
 79279BWsJ8AObmYPs0oXe1cfcq76NA7d6tVYrmz0pZ7BkYmXY0VgbBKeYXozcX5z
 6MJ+7+7wOJ1hO4oSTz9Jo1ZSpr8g0Be4m4DweHSyC9Uz6jCNAw3yJlPNsZ295jvk
 w2QD4ApwaofhF8SkNw5s4DE1piLpr8+IbGhY7YTKASQv3dIqTfjGSoz9MCKI4ZCA
 KHLLLkgV3NvCgxRKP2JclWUSsX6Er8joN2zUGlU1xBm6yTZqjWPLMxSysVkl+vcA
 1qx4GggDZ/zMcfyGBdXW8EAtT1QMfHU6zh9ED9toYbBohWFewTVCqkSaA2yVQZWx
 D69L6Q1KT/RIbrH6zEQaIEYcMmzvZWLy6EumKD9pgOAwDQlHv5QPT5hp6gonF/kI
 D8ZdT0jQ6JQqo42zi4J4hW4eH0r0Kf+79XsVz7wxe26YK762ZVnJLK/q7Fu1vb/u
 bBMJBYh/xdRO1GDE9JsomVq3mdXlz4ywQM+SFUiCj+peiO0C9JdDxE+PII1RaDqV
 wlJ7HW1eoKs4OG0gBjrJM2tn4q3BNpyr2BLSQONBSJEfWi6Z4OnimN45K5cEEJHj
 et2OCQetRt1zXmdrFdvX3Zn87PMZKfPmdaZrxzRvxk/VIP1f4vRgJ3D2FGP+E82H
 S/GWWRkw8pZy
 =b99a
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-05-27' into staging

Error reporting patches for 2020-05-27

# gpg: Signature made Wed 27 May 2020 06:48:02 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-error-2020-05-27:
  i386: Fix x86_cpu_load_model() error API violation
  arm/sabrelite: Consistently use &error_fatal in sabrelite_init()
  mips/boston: Plug memory leak in boston_mach_init()
  mips/boston: Fix boston_mach_init() error handling
  mips/malta: Fix create_cps() error handling
  error: Use error_reportf_err() where appropriate
  tests/migration: Tighten error checking
  s390x/cpumodel: Fix harmless misuse of visit_check_struct()
  xen: Fix and improve handling of device_add usb-host errors
  nvdimm: Plug memory leak in uuid property setter

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-05-28 11:21:30 +01:00
BALATON Zoltan fa0013a1bc sm501: Remove obsolete changelog and todo comment
Also update copyright year for latest changes

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 1392cad2ad1315a5a50409970e0af061821462e6.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
BALATON Zoltan fa70c2871f sm501: Optimize small overlapping blits
AmigaOS tends to do a lot of small blits (even 1 pixel). Avoid malloc
overhead by keeping around a buffer for this and only alloc when
blitting larger areas.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 7946852258d528497e85f465327fc90b5c3b59fb.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
BALATON Zoltan b15a22bbcb sm501: Replace hand written implementation with pixman where possible
Besides being faster this should also prevent malicious guests to
abuse 2D engine to overwrite data or cause a crash.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
BALATON Zoltan 3d0b096298 sm501: Clean up local variables in sm501_2d_operation
Make variables local to the block they are used in to make it clearer
which operation they are needed for.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: ae59f8138afe7f6a5a4a82539d0f61496a906b06.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
BALATON Zoltan 2824809b7f sm501: Use BIT(x) macro to shorten constant
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 124bf5de8d7cf503b32b377d0445029a76bfbd49.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
BALATON Zoltan 6f8183b5dc sm501: Shorten long variable names in sm501_2d_operation
This increases readability and cleans up some confusing naming.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: b9b67b94c46e945252a73c77dfd117132c63c4fb.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
BALATON Zoltan e29da77e5f sm501: Convert printf + abort to qemu_log_mask
Some places already use qemu_log_mask() to log unimplemented features
or errors but some others have printf() then abort(). Convert these to
qemu_log_mask() and avoid aborting to prevent guests to easily cause
denial of service.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 305af87f59d81e92f2aaff09eb8a3603b8baa322.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé b3a7e2416f hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask()
Replace printf() calls by qemu_log_mask(UNIMP), which is
disabled by default. This avoid flooding the terminal when
fuzzing the device.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-15-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé 00a946a3cb hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP)
Replace fprintf() call by qemu_log_mask(LOG_UNIMP), which is
disabled by default. This avoid flooding the terminal when
fuzzing the device.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-14-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé b3caeaf2c8 hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR)
Replace DPRINT_ERROR() by qemu_log_mask(GUEST_ERROR).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-13-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé becce5e90a hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegion
To avoid the orphan I/O memory region being added in the /unattached
QOM container, register the PCI device as its owner.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200526062252.19852-12-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé aa0fd16d00 hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR)
Avoid flooding stdio by converting printf() calls to
qemu_log_mask(GUEST_ERROR), which are disabled by default.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-11-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé 7bbdf0f892 hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report()
DPRINTF() calls are disabled by default, so when unexpected
data is used, the whole process abort without information.

Display a bit of information with error_report() before crashing.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-10-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé eeb1168032 hw/display/dpcd: Convert debug printf()s to trace events
Convert DPRINTF() to trace events and remove ifdef'ry.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-9-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé 91e7fd3ae5 hw/display/dpcd: Fix memory region size
The memory region size is 512K.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-8-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé 6152772174 hw/display/cirrus_vga: Convert debug printf() to trace event
Convert the final bit of DEBUG_BITBLT to a tracepoint.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-7-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé 2b55f4d350 hw/display/cirrus_vga: Use qemu_log_mask(ERROR) instead of debug printf
Replace some debug printf() calls by qemu_log_mask(LOG_GUEST_ERROR).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-6-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé bb6e9e9407 hw/display/cirrus_vga: Use qemu_log_mask(UNIMP) instead of debug printf
Replace some debug printf() calls by qemu_log_mask(LOG_UNIMP),
and add a new one in cirrus_linear_bitblt_read().

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-5-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé bee61ca2b9 hw/display/cirrus_vga: Convert debug printf() to trace event
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-4-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé 85664cf0a4 hw/display/cg3: Convert debug printf()s to trace events
Convert DPRINTF() to trace events and remove ifdef'ry.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-3-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Philippe Mathieu-Daudé edcbea008d hw/display/edid: Add missing 'qdev-properties.h' header
When trying to consume the DEFINE_EDID_PROPERTIES() macro
by including "hw/display/edid.h", we get this build failure:

  include/hw/display/edid.h:24:5: error: implicit declaration of
  function ‘DEFINE_PROP_UINT32’ [-Werror=implicit-function-declaration]
     24 |     DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0),    \
        |     ^~~~~~~~~~~~~~~~~~

Headers should be self-contained, and one shouldn't have to
dig to find the missing headers.
In this case "hw/qdev-properties.h" is missing. Add it.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200526062252.19852-2-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-28 11:38:57 +02:00
Thomas Huth 0016afa250 gitlab-ci: Determine the number of jobs dynamically
Some people might want to run the gitlab CI pipelines in an environment
where multiple CPUs are available to the runners, so let's rather get
the number for "-j" from the "nproc" program (increased by 1 to compensate
for jobs that wait for I/O) instead of hard-coding it.

Message-Id: <20200525131823.715-7-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-05-28 11:01:38 +02:00
Thomas Huth b5d621ff4a gitlab-ci: Do not use the standard container images from gitlab
Currently all pipelines of the gitlab CI are failing, except for the
"build-user" pipeline. There is an issue with the default container
image (likely Debian stable) where they imported something bad in one
of the system headers:

 /usr/include/linux/swab.h: In function '__swab':
 /builds/huth/qemu/include/qemu/bitops.h:20:34: error: "sizeof" is not
  defined, evaluates to 0 [-Werror=undef]
 #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)

We could maybe work-around this issue or wait for the default containers
to get fixed, but considering that we use Ubuntu (and thus Debian-style)
CI in Travis already to a very large extent, we should consider to use
some RPM-based distros in our gitlab CI instead. Thus let's change the
failing pipelines to use Fedora and CentOS (and also one Ubuntu 19.10,
since 20.04 is broken, too) now.

Message-Id: <20200525131823.715-6-thuth@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-05-28 11:00:39 +02:00
Thomas Huth 922febe2af gitlab-ci: Move edk2 and opensbi YAML files to .gitlab-ci.d folder
We have a dedicated folder for the gitlab-ci - so there is no need
to clutter the top directory with these .yml files.

Message-Id: <20200525131823.715-5-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-05-28 11:00:39 +02:00
Cleber Rosa 65ea4e65df GitLab CI: avoid calling before_scripts on unintended jobs
At this point it seems that all jobs depend on those steps, with
maybe the EDK2 jobs as exceptions.

The jobs that will be added later will not want those scripts to be
run, so let's move these steps to the appropriate jobs, while
still trying to avoid repetition.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20200525131823.715-4-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[thuth: Rebased to current master branch, use separate template]
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-05-28 11:00:39 +02:00