]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
4 years agoMerge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210317' into staging
Peter Maydell [Thu, 18 Mar 2021 17:11:17 +0000 (17:11 +0000)] 
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210317' into staging

TCI argument extraction helpers and disassembler
TCG build fix for gcc 11

# gpg: Signature made Wed 17 Mar 2021 15:29:47 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-gitlab/tags/pull-tcg-20210317: (38 commits)
  tcg: Fix prototypes for tcg_out_vec_op and tcg_out_op
  tcg/tci: Split out tcg_out_op_r[iI]
  tcg/tci: Split out tcg_out_op_v
  tcg/tci: Split out tcg_out_op_{rrm,rrrm,rrrrm}
  tcg/tci: Split out tcg_out_op_rrrrcl
  tcg/tci: Split out tcg_out_op_rrrr
  tcg/tci: Split out tcg_out_op_rrrrrr
  tcg/tci: Split out tcg_out_op_rrcl
  tcg/tci: Split out tcg_out_op_rrrbb
  tcg/tci: Split out tcg_out_op_rrrrrc
  tcg/tci: Split out tcg_out_op_rrrc
  tcg/tci: Split out tcg_out_op_rrr
  tcg/tci: Split out tcg_out_op_rr
  tcg/tci: Split out tcg_out_op_p
  tcg/tci: Split out tcg_out_op_l
  tcg/tci: Split out tcg_out_op_rrs
  tcg/tci: Push opcode emit into each case
  tcg/tci: Implement the disassembler properly
  tcg/tci: Remove tci_disas
  tcg/tci: Hoist op_size checking into tci_args_*
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/stsquad/tags/pull-misc-6.0-updates-170321-2...
Peter Maydell [Thu, 18 Mar 2021 14:57:55 +0000 (14:57 +0000)] 
Merge remote-tracking branch 'remotes/stsquad/tags/pull-misc-6.0-updates-170321-2' into staging

Final fixes for 6.0

  - plugins physical address changes
  - syscall tracking plugin
  - plugin kernel-doc comments (without integration)
  - libfdt build fix for guest-loader

# gpg: Signature made Wed 17 Mar 2021 07:19:23 GMT
# 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-misc-6.0-updates-170321-2:
  hw/core: Only build guest-loader if libfdt is available
  plugins: Fixes typo in qemu-plugin.h
  plugins: getting qemu_plugin_get_hwaddr only expose one function prototype
  plugins: expand kernel-doc for memory query and instrumentation
  plugins: expand kernel-doc for instruction query and instrumentation
  plugins: expand inline exec kernel-doc documentation.
  plugins: add qemu_plugin_id_t to kernel-doc
  plugins: add qemu_plugin_cb_flags to kernel-doc
  plugins: expand the typedef kernel-docs for translation
  plugins: expand the callback typedef kernel-docs
  plugins: cleanup kernel-doc for qemu_plugin_install
  plugins: expand kernel-doc for qemu_info_t
  plugins: Expose physical addresses instead of device offsets
  plugins: new syscalls plugin
  utils: Use fixed-point arithmetic in qemu_strtosz

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/cleber-gitlab/tags/python-next-pull-request...
Peter Maydell [Thu, 18 Mar 2021 14:07:31 +0000 (14:07 +0000)] 
Merge remote-tracking branch 'remotes/cleber-gitlab/tags/python-next-pull-request' into staging

Acceptance and Python Test Improvements

Small collection of Acceptance and Python tests/improvements.

# gpg: Signature made Wed 17 Mar 2021 03:22:47 GMT
# gpg:                using RSA key 7ABB96EB8B46B94D5E0FE9BB657E8D33A5F209F3
# gpg: Good signature from "Cleber Rosa <crosa@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3

* remotes/cleber-gitlab/tags/python-next-pull-request:
  tests/acceptance: linux-related tests fix
  tests: Add functional test for out-of-process device emulation
  avocado_qemu: add exec_command function
  tests/migration: fix unix socket batch migration
  tests/acceptance: Print expected message on wait_for_console_pattern

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2021-03-16-tag' into staging
Peter Maydell [Thu, 18 Mar 2021 11:27:11 +0000 (11:27 +0000)] 
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2021-03-16-tag' into staging

qemu-ga patch queue for soft-freeze

* fix guest-get-vcpus reporting after vcpu unplug
* coding style fix-ups
* report a reason for disabled commands

# gpg: Signature made Wed 17 Mar 2021 03:12:41 GMT
# gpg:                using RSA key CEACC9E15534EBABB82D3FA03353C9CEF108B584
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>" [full]
# gpg:                 aka "Michael Roth <mdroth@utexas.edu>" [full]
# gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>" [full]
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2021-03-16-tag:
  qga: return a more explicit error on why a command is disabled
  qga: Switch and case should be at the same indent
  qga: Open brace '{' following struct go on the same
  qga: Delete redundant spaces
  qga: Add spaces around operator
  qga: Correct loop count in qmp_guest_get_vcpus()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/vivier/tags/q800-for-6.0-pull-request' into...
Peter Maydell [Thu, 18 Mar 2021 10:05:37 +0000 (10:05 +0000)] 
Merge remote-tracking branch 'remotes/vivier/tags/q800-for-6.0-pull-request' into staging

q800 pull request 20210316

Several fixes for mac_via needed for future support of MacOS ROM

# gpg: Signature made Tue 16 Mar 2021 21:14:42 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier/tags/q800-for-6.0-pull-request:
  mac_via: remove VIA1 timer optimisations
  mac_via: fix 60Hz VIA1 timer interval
  mac_via: rename VBL timer to 60Hz timer
  mac_via: don't re-inject ADB response when switching to IDLE state
  mac_via: allow long accesses to VIA registers
  mac_via: fix up adb_via_receive() trace events
  mac_via: switch rtc pram trace-events to use hex rather than decimal for addresses

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
Peter Maydell [Wed, 17 Mar 2021 22:18:54 +0000 (22:18 +0000)] 
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging

* add --enable/--disable-libgio to configure (Denis)
* small fixes (Pavel, myself)
* fuzzing update (Alexander)

# gpg: Signature made Tue 16 Mar 2021 18:30:38 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# 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-gitlab/tags/for-upstream:
  qemu-timer: allow freeing a NULL timer
  hw/i8254: fix vmstate load
  scsi: fix sense code for EREMOTEIO
  Revert "accel: kvm: Add aligment assert for kvm_log_clear_one_slot"
  configure: add option to explicitly enable/disable libgio
  fuzz: move some DMA hooks
  fuzz: configure a sparse-mem device, by default
  memory: add a sparse memory device for fuzzing
  fuzz: add a am53c974 generic-fuzzer config
  fuzz: add instructions for building reproducers
  fuzz: add a script to build reproducers
  fuzz: don't leave orphan llvm-symbolizers around
  fuzz: fix the pro100 generic-fuzzer config
  MAINTAINERS: Cover fuzzer reproducer tests within 'Device Fuzzing'
  tests/qtest: Only run fuzz-virtio-scsi when virtio-scsi is available
  tests/qtest: Only run fuzz-megasas-test if megasas device is available

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' into...
Peter Maydell [Wed, 17 Mar 2021 21:02:37 +0000 (21:02 +0000)] 
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' into staging

qemu-openbios queue

# gpg: Signature made Tue 16 Mar 2021 20:36:15 GMT
# gpg:                using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F
# gpg:                issuer "mark.cave-ayland@ilande.co.uk"
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" [full]
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* remotes/mcayland/tags/qemu-openbios-20210316:
  Update OpenBIOS images to 4a004110 built from submodule.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20210316.0' into...
Peter Maydell [Wed, 17 Mar 2021 19:30:13 +0000 (19:30 +0000)] 
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20210316.0' into staging

VFIO update 2021-03-16

 * Fix "listerner" typo (Zenghui Yu)

 * Inclusive language and MAINTAINERS update (Philippe Mathieu-Daudé)

 * vIOMMU unmap notifier fixes (Eric Auger)

 * Migration fixes and optimizations (Shenming Lu)

 * Use host page size for dirty bitmap (Kunkun Jiang)

 * Use log_global_start/stop to switch dirty tracking (Keqian Zhu)

# gpg: Signature made Tue 16 Mar 2021 16:59:10 GMT
# gpg:                using RSA key 239B9B6E3BB08B22
# gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full]
# gpg:                 aka "Alex Williamson <alex@shazbot.org>" [full]
# gpg:                 aka "Alex Williamson <alwillia@redhat.com>" [full]
# gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>" [full]
# Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22

* remotes/awilliam/tags/vfio-update-20210316.0:
  vfio/migrate: Move switch of dirty tracking into vfio_memory_listener
  vfio: Support host translation granule size
  vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration
  vfio: Set the priority of the VFIO VM state change handler explicitly
  vfio: Move the saving of the config space to the right place in VFIO migration
  spapr_iommu: Fix vhost integration regression
  vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier
  MAINTAINERS: Cover docs/igd-assign.txt in VFIO section
  hw/vfio/pci-quirks: Replace the word 'blacklist'
  vfio: Fix vfio_listener_log_sync function name typo

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20210316' into staging
Peter Maydell [Wed, 17 Mar 2021 18:28:03 +0000 (18:28 +0000)] 
Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20210316' into staging

9pfs: code cleanup

* Use lock-guard design pattern instead of manual lock/unlock.

# gpg: Signature made Tue 16 Mar 2021 10:49:09 GMT
# gpg:                using RSA key 96D8D110CF7AF8084F88590134C2B58765A47395
# gpg:                issuer "qemu_oss@crudebyte.com"
# gpg: Good signature from "Christian Schoenebeck <qemu_oss@crudebyte.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: ECAB 1A45 4014 1413 BA38  4926 30DB 47C3 A012 D5F4
#      Subkey fingerprint: 96D8 D110 CF7A F808 4F88  5901 34C2 B587 65A4 7395

* remotes/cschoenebeck/tags/pull-9p-20210316:
  hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/kraxel/tags/audio-20210316-pull-request' into...
Peter Maydell [Wed, 17 Mar 2021 17:14:45 +0000 (17:14 +0000)] 
Merge remote-tracking branch 'remotes/kraxel/tags/audio-20210316-pull-request' into staging

coreaudio fixes and cleanups.

# gpg: Signature made Tue 16 Mar 2021 10:47:36 GMT
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# 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/audio-20210316-pull-request:
  coreaudio: Handle output device change
  coreaudio: Extract device operations
  coreaudio: Drop support for macOS older than 10.6

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agotcg: Fix prototypes for tcg_out_vec_op and tcg_out_op
Miroslav Rezanina [Fri, 12 Mar 2021 12:14:18 +0000 (13:14 +0100)] 
tcg: Fix prototypes for tcg_out_vec_op and tcg_out_op

There are two different versions of prototype for tcg_out_op and
tcg_out_vec_op functions:

1) using const TCGArg *args and const int *const_args arguments
2) using const TCGArg args[TCG_MAX_OP_ARGS] and const int
   const_args[TCG_MAX_OP_ARGS] aguments.

This duality causes warnings on GCC 11 and prevents build using
--enable-werror.  As second version provides more information,
unify functions prototypes to this variant.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Message-Id: <20210312121418.139093-1-mrezanin@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_r[iI]
Richard Henderson [Mon, 1 Feb 2021 19:57:43 +0000 (09:57 -1000)] 
tcg/tci: Split out tcg_out_op_r[iI]

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_v
Richard Henderson [Mon, 1 Feb 2021 19:20:19 +0000 (09:20 -1000)] 
tcg/tci: Split out tcg_out_op_v

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_{rrm,rrrm,rrrrm}
Richard Henderson [Mon, 1 Feb 2021 19:16:33 +0000 (09:16 -1000)] 
tcg/tci: Split out tcg_out_op_{rrm,rrrm,rrrrm}

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrrrcl
Richard Henderson [Mon, 1 Feb 2021 19:10:15 +0000 (09:10 -1000)] 
tcg/tci: Split out tcg_out_op_rrrrcl

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrrr
Richard Henderson [Mon, 1 Feb 2021 19:07:31 +0000 (09:07 -1000)] 
tcg/tci: Split out tcg_out_op_rrrr

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrrrrr
Richard Henderson [Mon, 1 Feb 2021 19:06:06 +0000 (09:06 -1000)] 
tcg/tci: Split out tcg_out_op_rrrrrr

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrcl
Richard Henderson [Mon, 1 Feb 2021 19:04:21 +0000 (09:04 -1000)] 
tcg/tci: Split out tcg_out_op_rrcl

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrrbb
Richard Henderson [Mon, 1 Feb 2021 18:59:56 +0000 (08:59 -1000)] 
tcg/tci: Split out tcg_out_op_rrrbb

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrrrrc
Richard Henderson [Mon, 1 Feb 2021 18:54:54 +0000 (08:54 -1000)] 
tcg/tci: Split out tcg_out_op_rrrrrc

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrrc
Richard Henderson [Mon, 1 Feb 2021 18:52:20 +0000 (08:52 -1000)] 
tcg/tci: Split out tcg_out_op_rrrc

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrr
Richard Henderson [Mon, 1 Feb 2021 18:49:18 +0000 (08:49 -1000)] 
tcg/tci: Split out tcg_out_op_rrr

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rr
Richard Henderson [Mon, 1 Feb 2021 18:45:41 +0000 (08:45 -1000)] 
tcg/tci: Split out tcg_out_op_rr

At the same time, validate the type argument in tcg_out_mov.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_p
Richard Henderson [Mon, 1 Feb 2021 18:40:59 +0000 (08:40 -1000)] 
tcg/tci: Split out tcg_out_op_p

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_l
Richard Henderson [Mon, 1 Feb 2021 18:36:39 +0000 (08:36 -1000)] 
tcg/tci: Split out tcg_out_op_l

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tcg_out_op_rrs
Richard Henderson [Mon, 1 Feb 2021 17:58:02 +0000 (07:58 -1000)] 
tcg/tci: Split out tcg_out_op_rrs

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210316' into staging
Peter Maydell [Wed, 17 Mar 2021 15:01:09 +0000 (15:01 +0000)] 
Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210316' into staging

s390x updates:
- get rid of legacy_s390_alloc() and phys_mem_set_alloc()
- tcg: implement the MVPG condition-code-option bit
- fix g_autofree variable handing in the pci vfio code
- use official z15 names in the cpu model definitions

# gpg: Signature made Tue 16 Mar 2021 10:04:21 GMT
# gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
# gpg:                issuer "cohuck@redhat.com"
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown]
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [unknown]
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [unknown]
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck-gitlab/tags/s390x-20210316:
  s390x/pci: Add missing initialization for g_autofree variables
  target/s390x: Store r1/r2 for page-translation exceptions during MVPG
  target/s390x: Implement the MVPG condition-code-option bit
  s390x/cpu_model: use official name for 8562
  exec: Get rid of phys_mem_set_alloc()
  s390x/kvm: Get rid of legacy_s390_alloc()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/kraxel/tags/ui-20210316-pull-request' into...
Peter Maydell [Wed, 17 Mar 2021 13:38:15 +0000 (13:38 +0000)] 
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210316-pull-request' into staging

vnc+spice: password-secret option.
bugfixes for cocoa, vnc, opengl.

# gpg: Signature made Tue 16 Mar 2021 05:37:58 GMT
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# 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-20210316-pull-request:
  ui/cocoa: Comment about modifier key input quirks
  ui: fold qemu_alloc_display in only caller
  ui: honour the actual guest display dimensions without rounding
  ui: use client width/height in WMVi message
  ui: avoid sending framebuffer updates outside client desktop bounds
  ui: add more trace points for VNC client/server messages
  ui/cocoa: Do not exit immediately after shutdown
  opengl: Do not convert format with glTexImage2D on OpenGL ES
  ui: deprecate "password" option for SPICE server
  ui: introduce "password-secret" option for SPICE server
  ui: introduce "password-secret" option for VNC servers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agotcg/tci: Push opcode emit into each case
Richard Henderson [Mon, 1 Feb 2021 18:28:06 +0000 (08:28 -1000)] 
tcg/tci: Push opcode emit into each case

We're about to split out bytecode output into helpers, but
we can't do that one at a time if tcg_out_op_t is being done
outside of the switch.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Implement the disassembler properly
Richard Henderson [Sun, 31 Jan 2021 01:48:19 +0000 (17:48 -0800)] 
tcg/tci: Implement the disassembler properly

Actually print arguments as opposed to simply the opcodes
and, uselessly, the argument counts.  Reuse all of the helpers
developed as part of the interpreter.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Remove tci_disas
Richard Henderson [Sat, 30 Jan 2021 23:46:17 +0000 (15:46 -0800)] 
tcg/tci: Remove tci_disas

This function is unused.  It's not even the disassembler,
which is print_insn_tci, located in disas/tci.c.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Hoist op_size checking into tci_args_*
Richard Henderson [Sat, 30 Jan 2021 21:23:02 +0000 (13:23 -0800)] 
tcg/tci: Hoist op_size checking into tci_args_*

This performs the size check while reading the arguments,
which means that we don't have to arrange for it to be
done after the operation.  Which tidies all of the branches.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_{rrm,rrrm,rrrrm}
Richard Henderson [Sat, 30 Jan 2021 08:52:12 +0000 (22:52 -1000)] 
tcg/tci: Split out tci_args_{rrm,rrrm,rrrrm}

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Reduce qemu_ld/st TCGMemOpIdx operand to 32-bits
Richard Henderson [Sun, 31 Jan 2021 19:16:45 +0000 (09:16 -1000)] 
tcg/tci: Reduce qemu_ld/st TCGMemOpIdx operand to 32-bits

We are currently using the "natural" size routine, which
uses 64-bits on a 64-bit host.  The TCGMemOpIdx operand
has 11 bits, so we can safely reduce to 32-bits.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Clean up deposit operations
Richard Henderson [Sat, 30 Jan 2021 08:36:40 +0000 (22:36 -1000)] 
tcg/tci: Clean up deposit operations

Use the correct set of asserts during code generation.
We do not require the first input to overlap the output;
the existing interpreter already supported that.

Split out tci_args_rrrbb in the translator.
Use the deposit32/64 functions rather than inline expansion.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rrrr
Richard Henderson [Sat, 30 Jan 2021 08:18:37 +0000 (22:18 -1000)] 
tcg/tci: Split out tci_args_rrrr

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rrrrrr
Richard Henderson [Sat, 30 Jan 2021 08:16:05 +0000 (22:16 -1000)] 
tcg/tci: Split out tci_args_rrrrrr

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Reuse tci_args_l for goto_tb
Richard Henderson [Sat, 30 Jan 2021 08:11:43 +0000 (22:11 -1000)] 
tcg/tci: Reuse tci_args_l for goto_tb

Convert to indirect jumps, as it's less complicated.
Then we just have a pointer to the tb address at which
the chain is stored, from which we read.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Reuse tci_args_l for exit_tb
Richard Henderson [Sat, 30 Jan 2021 08:01:11 +0000 (22:01 -1000)] 
tcg/tci: Reuse tci_args_l for exit_tb

Do not emit a uint64_t, but a tcg_target_ulong, aka uintptr_t.
This reduces the size of the constant on 32-bit hosts.
The assert for label != NULL has to be removed because that
is a valid value for exit_tb.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Reuse tci_args_l for calls.
Richard Henderson [Sat, 30 Jan 2021 07:58:20 +0000 (21:58 -1000)] 
tcg/tci: Reuse tci_args_l for calls.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_ri and tci_args_rI
Richard Henderson [Sat, 30 Jan 2021 07:49:24 +0000 (21:49 -1000)] 
tcg/tci: Split out tci_args_ri and tci_args_rI

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rrcl and tci_args_rrrrcl
Richard Henderson [Sat, 30 Jan 2021 07:41:13 +0000 (21:41 -1000)] 
tcg/tci: Split out tci_args_rrcl and tci_args_rrrrcl

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rrrrrc
Richard Henderson [Sat, 30 Jan 2021 07:30:04 +0000 (21:30 -1000)] 
tcg/tci: Split out tci_args_rrrrrc

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_l
Richard Henderson [Sat, 30 Jan 2021 07:18:45 +0000 (21:18 -1000)] 
tcg/tci: Split out tci_args_l

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rrrc
Richard Henderson [Fri, 29 Jan 2021 23:14:11 +0000 (13:14 -1000)] 
tcg/tci: Split out tci_args_rrrc

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rrr
Richard Henderson [Fri, 29 Jan 2021 23:10:28 +0000 (13:10 -1000)] 
tcg/tci: Split out tci_args_rrr

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rr
Richard Henderson [Fri, 29 Jan 2021 23:05:01 +0000 (13:05 -1000)] 
tcg/tci: Split out tci_args_rr

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Split out tci_args_rrs
Richard Henderson [Fri, 29 Jan 2021 22:55:41 +0000 (12:55 -1000)] 
tcg/tci: Split out tci_args_rrs

Begin splitting out functions that do pure argument decode,
without actually loading values from the register set.

This means that decoding need not concern itself between
input and output registers.  We can assert that the register
number is in range during decode, so that it is safe to
simply dereference from regs[] later.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Rename tci_read_r to tci_read_rval
Richard Henderson [Sun, 31 Jan 2021 23:25:23 +0000 (13:25 -1000)] 
tcg/tci: Rename tci_read_r to tci_read_rval

In the next patches, we want to use tci_read_r to return
the raw register number.  So rename the existing function,
which returns the register value, to tci_read_rval.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agotcg/tci: Remove ifdefs for TCG_TARGET_HAS_ext32[us]_i64
Richard Henderson [Fri, 29 Jan 2021 22:23:03 +0000 (12:23 -1000)] 
tcg/tci: Remove ifdefs for TCG_TARGET_HAS_ext32[us]_i64

These operations are always available under different names:
INDEX_op_ext_i32_i64 and INDEX_op_extu_i32_i64, so we remove
no code with the ifdef.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/vivier/tags/m68k-for-6.0-pull-request' into...
Peter Maydell [Wed, 17 Mar 2021 10:38:27 +0000 (10:38 +0000)] 
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-6.0-pull-request' into staging

m68k pull request 20210315

Add m68k virt machine

# gpg: Signature made Mon 15 Mar 2021 20:41:51 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier/tags/m68k-for-6.0-pull-request:
  m68k: add Virtual M68k Machine
  m68k: add a system controller
  m68k: add an interrupt controller
  hw/intc: add goldfish-pic
  hw/char: add goldfish-tty

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agoMerge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20210315...
Peter Maydell [Wed, 17 Mar 2021 09:07:28 +0000 (09:07 +0000)] 
Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20210315' into staging

virtiofs and migration pull 2021-03-15

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
# gpg: Signature made Mon 15 Mar 2021 20:03:03 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-20210315:
  migration: Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD
  monitor: Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD
  migration/tls: add error handling in multifd_tls_handshake_thread
  migration/tls: fix inverted semantics in multifd_channel_connect
  virtiofsd: Convert some functions to return bool
  virtiofsd: Don't allow empty paths in lookup_name()
  virtiofsd: Don't allow empty filenames
  virtiofsd: Add qemu version and copyright info
  virtiofsd: Release vu_dispatch_lock when stopping queue

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agohw/core: Only build guest-loader if libfdt is available
Philippe Mathieu-Daudé [Mon, 15 Mar 2021 17:04:39 +0000 (18:04 +0100)] 
hw/core: Only build guest-loader if libfdt is available

Add a Kconfig entry for guest-loader so we can optionally deselect
it (default is built in), and add a Meson dependency on libfdt.

This fixes when building with --disable-fdt:

  /usr/bin/ld: libcommon.fa.p/hw_core_guest-loader.c.o: in function `loader_insert_platform_data':
  hw/core/guest-loader.c:56: undefined reference to `qemu_fdt_add_subnode'
  /usr/bin/ld: hw/core/guest-loader.c:57: undefined reference to `qemu_fdt_setprop'
  /usr/bin/ld: hw/core/guest-loader.c:61: undefined reference to `qemu_fdt_setprop_string_array'
  /usr/bin/ld: hw/core/guest-loader.c:68: undefined reference to `qemu_fdt_setprop_string'
  /usr/bin/ld: hw/core/guest-loader.c:74: undefined reference to `qemu_fdt_setprop_string_array'
  collect2: error: ld returned 1 exit status

Fixes: a33ff6d2c6b ("hw/core: implement a guest-loader to support static hypervisor guests")
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20210315170439.2868903-1-philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
4 years agoplugins: Fixes typo in qemu-plugin.h
Yonggang Luo [Fri, 12 Mar 2021 17:28:21 +0000 (17:28 +0000)] 
plugins: Fixes typo in qemu-plugin.h

Getting the comment consistence with the function name

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201013002806.1447-3-luoyonggang@gmail.com>
Message-Id: <20210312172821.31647-15-alex.bennee@linaro.org>

4 years agoplugins: getting qemu_plugin_get_hwaddr only expose one function prototype
Yonggang Luo [Fri, 12 Mar 2021 17:28:20 +0000 (17:28 +0000)] 
plugins: getting qemu_plugin_get_hwaddr only expose one function prototype

This is used for counting how much function are export to qemu plugin.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20201013002806.1447-2-luoyonggang@gmail.com>
Message-Id: <20210312172821.31647-14-alex.bennee@linaro.org>

4 years agoplugins: expand kernel-doc for memory query and instrumentation
Alex Bennée [Fri, 12 Mar 2021 17:28:19 +0000 (17:28 +0000)] 
plugins: expand kernel-doc for memory query and instrumentation

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-13-alex.bennee@linaro.org>

4 years agoplugins: expand kernel-doc for instruction query and instrumentation
Alex Bennée [Fri, 12 Mar 2021 17:28:18 +0000 (17:28 +0000)] 
plugins: expand kernel-doc for instruction query and instrumentation

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-12-alex.bennee@linaro.org>

4 years agoplugins: expand inline exec kernel-doc documentation.
Alex Bennée [Fri, 12 Mar 2021 17:28:17 +0000 (17:28 +0000)] 
plugins: expand inline exec kernel-doc documentation.

Remove the extraneous @cb parameter and document the non-atomic nature
of the INLINE_ADD_U64 operation.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-11-alex.bennee@linaro.org>

4 years agoplugins: add qemu_plugin_id_t to kernel-doc
Alex Bennée [Fri, 12 Mar 2021 17:28:16 +0000 (17:28 +0000)] 
plugins: add qemu_plugin_id_t to kernel-doc

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-10-alex.bennee@linaro.org>

4 years agoplugins: add qemu_plugin_cb_flags to kernel-doc
Alex Bennée [Fri, 12 Mar 2021 17:28:15 +0000 (17:28 +0000)] 
plugins: add qemu_plugin_cb_flags to kernel-doc

Also add a note to explain currently they are unused.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-9-alex.bennee@linaro.org>

4 years agoplugins: expand the typedef kernel-docs for translation
Alex Bennée [Fri, 12 Mar 2021 17:28:14 +0000 (17:28 +0000)] 
plugins: expand the typedef kernel-docs for translation

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-8-alex.bennee@linaro.org>

4 years agoplugins: expand the callback typedef kernel-docs
Alex Bennée [Fri, 12 Mar 2021 17:28:13 +0000 (17:28 +0000)] 
plugins: expand the callback typedef kernel-docs

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-7-alex.bennee@linaro.org>

4 years agoplugins: cleanup kernel-doc for qemu_plugin_install
Alex Bennée [Fri, 12 Mar 2021 17:28:12 +0000 (17:28 +0000)] 
plugins: cleanup kernel-doc for qemu_plugin_install

kernel-doc doesn't like multiple Note sections. Also add an explicit
Return.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-6-alex.bennee@linaro.org>

4 years agoplugins: expand kernel-doc for qemu_info_t
Alex Bennée [Fri, 12 Mar 2021 17:28:11 +0000 (17:28 +0000)] 
plugins: expand kernel-doc for qemu_info_t

It seems kernel-doc struggles a bit with typedef structs but with
enough encouragement we can get something out of it.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210312172821.31647-5-alex.bennee@linaro.org>

4 years agoplugins: Expose physical addresses instead of device offsets
Aaron Lindsay [Fri, 12 Mar 2021 17:28:09 +0000 (17:28 +0000)] 
plugins: Expose physical addresses instead of device offsets

This allows plugins to query for full virtual-to-physical address
translation for a given `qemu_plugin_hwaddr` and stops exposing the
offset within the device itself. As this change breaks the API,
QEMU_PLUGIN_VERSION is incremented.

Signed-off-by: Aaron Lindsay <aaron@os.amperecomputing.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210309202802.211756-1-aaron@os.amperecomputing.com>
Message-Id: <20210312172821.31647-3-alex.bennee@linaro.org>

4 years agoplugins: new syscalls plugin
Matthias Weckbecker [Fri, 12 Mar 2021 17:28:08 +0000 (17:28 +0000)] 
plugins: new syscalls plugin

This commit adds a new syscalls plugin that displays the syscalls
as they are executed and returned. This plugin outputs the number
of the syscall as well as the syscall return value.

Works in *-user only.

Essentially, this commit restores:

  https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg00846.html

by using the new QEMU plugin API.

Signed-off-by: Matthias Weckbecker <matthias@weckbecker.name>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200812115816.4454-1-matthias@weckbecker.name>
Message-Id: <20210312172821.31647-2-alex.bennee@linaro.org>

4 years agoutils: Use fixed-point arithmetic in qemu_strtosz
Richard Henderson [Mon, 15 Mar 2021 18:51:17 +0000 (12:51 -0600)] 
utils: Use fixed-point arithmetic in qemu_strtosz

Once we've parsed the fractional value, extract it into an integral
64-bit fraction.  Perform the scaling with integer arithmetic, and
simplify the overflow detection.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210315185117.1986240-2-richard.henderson@linaro.org>

4 years agotests/acceptance: linux-related tests fix
Pavel Dovgalyuk [Fri, 19 Feb 2021 11:04:22 +0000 (14:04 +0300)] 
tests/acceptance: linux-related tests fix

This patch allows cloudinit images download when ssh
key is not specified.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Message-Id: <161373266228.1608713.7614311331725780044.stgit@pasha-ThinkPad-X280>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
4 years agotests: Add functional test for out-of-process device emulation
Jagannathan Raman [Wed, 3 Mar 2021 20:53:20 +0000 (17:53 -0300)] 
tests: Add functional test for out-of-process device emulation

Runs the Avocado acceptance test to check if a
remote lsi53c895a device gets identified by the guest.

Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[WR: Refactored code]
Signed-off-by: Willian Rampazzo <willianr@redhat.com>
Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210303205320.146047-3-willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
4 years agoavocado_qemu: add exec_command function
Willian Rampazzo [Wed, 3 Mar 2021 20:53:19 +0000 (17:53 -0300)] 
avocado_qemu: add exec_command function

Sometimes a test needs to send a command to a console without waiting
for a pattern as a result, or the command issued do not produce any kind
of output, like, for example, a `mount` command.

This introduces the `exec_command` function to the avocado_qemu,
allowing the test to send a command to the console without the need to
match a pattern produced as a result.

Signed-off-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210303205320.146047-2-willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
4 years agoqga: return a more explicit error on why a command is disabled
Marc-André Lureau [Fri, 19 Feb 2021 08:28:14 +0000 (12:28 +0400)] 
qga: return a more explicit error on why a command is disabled

qmp_disable_command() now takes an optional error string to return a
more explicit error message.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1928806
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
*fix up 80+ char line
Signed-off-by: Michael Roth <michael.roth@amd.com>
4 years agoqga: Switch and case should be at the same indent
AlexChen [Mon, 26 Oct 2020 09:05:49 +0000 (17:05 +0800)] 
qga: Switch and case should be at the same indent

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
4 years agoqga: Open brace '{' following struct go on the same
AlexChen [Mon, 26 Oct 2020 09:05:46 +0000 (17:05 +0800)] 
qga: Open brace '{' following struct go on the same

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
4 years agoqga: Delete redundant spaces
AlexChen [Mon, 26 Oct 2020 09:05:41 +0000 (17:05 +0800)] 
qga: Delete redundant spaces

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
4 years agoqga: Add spaces around operator
AlexChen [Mon, 26 Oct 2020 09:05:38 +0000 (17:05 +0800)] 
qga: Add spaces around operator

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
*fix 80+ char violation while we're here
*fix w32 build breakage from changing INVALID_SET_FILE_POINTER
 definition from a cast to a subtraction
Signed-off-by: Michael Roth <michael.roth@amd.com>
4 years agotests/migration: fix unix socket batch migration
Hyman [Wed, 10 Mar 2021 17:29:55 +0000 (01:29 +0800)] 
tests/migration: fix unix socket batch migration

when execute the following test command:
"guestperf-batch.py --dst-host localhost --transport unix ..."
test aborts and error message as the following be throwed:
"launching VM Failed: [Errno 98] Address already in use".

The reason is that batch script use the same monitor socket
in all test cases and do not remove the socket file. The second
migration test will launch vm use the same socket file as
the first, so we get the error message. To fix it, just remove
the socket file each time we have done the migration test.

Signed-off-by: Hyman <huangy81@chinatelecom.cn>
Message-Id: <c3fc438993b87a6ab0bea3d07f6ca0260d29936e.1615397103.git.huangy81@chinatelecom.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
4 years agotests/acceptance: Print expected message on wait_for_console_pattern
Wainer dos Santos Moschetta [Tue, 9 Mar 2021 15:35:07 +0000 (12:35 -0300)] 
tests/acceptance: Print expected message on wait_for_console_pattern

For the sake of improve debuggability of tests which use the
wait_for_console_pattern(), this changed the _console_interaction() so that
the expected message is printed if the test fail.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20210309153507.1905682-1-wainersm@redhat.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
4 years agoqga: Correct loop count in qmp_guest_get_vcpus()
Lin Ma [Wed, 24 Feb 2021 05:14:28 +0000 (13:14 +0800)] 
qga: Correct loop count in qmp_guest_get_vcpus()

The guest-get-vcpus returns incorrect vcpu info in case we hotunplug vcpus(not
the last one).
e.g.:
A VM has 4 VCPUs: cpu0 + 3 hotunpluggable online vcpus(cpu1, cpu2 and cpu3).
Hotunplug cpu2,  Now only cpu0, cpu1 and cpu3 are present & online.

./qmp-shell /tmp/qmp-monitor.sock
(QEMU) query-hotpluggable-cpus
{"return": [
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 3}, "vcpus-count": 1,
 "qom-path": "/machine/peripheral/cpu3", "type": "host-x86_64-cpu"},
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 2}, "vcpus-count": 1,
 "qom-path": "/machine/peripheral/cpu2", "type": "host-x86_64-cpu"},
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 1}, "vcpus-count": 1,
 "qom-path": "/machine/peripheral/cpu1", "type": "host-x86_64-cpu"},
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "vcpus-count": 1,
 "qom-path": "/machine/unattached/device[0]", "type": "host-x86_64-cpu"}
]}

(QEMU) device_del id=cpu2
{"return": {}}

(QEMU) query-hotpluggable-cpus
{"return": [
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 3}, "vcpus-count": 1,
 "qom-path": "/machine/peripheral/cpu3", "type": "host-x86_64-cpu"},
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 2}, "vcpus-count": 1,
 "type": "host-x86_64-cpu"},
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 1}, "vcpus-count": 1,
 "qom-path": "/machine/peripheral/cpu1", "type": "host-x86_64-cpu"},
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "vcpus-count": 1,
 "qom-path": "/machine/unattached/device[0]", "type": "host-x86_64-cpu"}
]}

Before:
./qmp-shell -N /tmp/qmp-ga.sock
Welcome to the QMP low-level shell!
Connected
(QEMU) guest-get-vcpus
{"return": [
{"online": true, "can-offline": false, "logical-id": 0},
{"online": true, "can-offline": true, "logical-id": 1}]}

After:
./qmp-shell -N /tmp/qmp-ga.sock
Welcome to the QMP low-level shell!
Connected
(QEMU) guest-get-vcpus
{"return": [
{"online": true, "can-offline": false, "logical-id": 0},
{"online": true, "can-offline": true, "logical-id": 1},
{"online": true, "can-offline": true, "logical-id": 3}]}

Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
*fix build breakage by using PRId64 for sscanf
Signed-off-by: Michael Roth <michael.roth@amd.com>
4 years agoMerge remote-tracking branch 'remotes/rth-gitlab/tags/pull-misc-20210315' into staging
Peter Maydell [Tue, 16 Mar 2021 21:08:07 +0000 (21:08 +0000)] 
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-misc-20210315' into staging

Fix qemu_strtosz testsuite failures for i686.

# gpg: Signature made Mon 15 Mar 2021 18:49:12 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-gitlab/tags/pull-misc-20210315:
  utils: Use fixed-point arithmetic in qemu_strtosz

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 years agomac_via: remove VIA1 timer optimisations
Mark Cave-Ayland [Thu, 11 Mar 2021 10:05:05 +0000 (10:05 +0000)] 
mac_via: remove VIA1 timer optimisations

The original implementation of the Macintosh VIA devices in commit 6dca62a000
"hw/m68k: add VIA support" used timer optimisations to reduce high CPU usage on
the host when booting Linux. These optimisations worked by waiting until VIA1
port B was accessed before re-arming the timers.

The MacOS toolbox ROM constantly writes to VIA1 port B which calls
via1_one_second_update() and via1_sixty_hz_update() to calculate the new expiry
time, causing the timers to constantly reset and never fire. The effect of this
is that the Ticks (0x16a) global variable holding the number of 60Hz timer ticks
since reset is never incremented by the interrupt causing time to stand still.

Whilst the code was introduced as a performance optimisation, it is likely that
the high CPU usage was actually caused by the incorrect 60Hz timer interval
fixed in the previous patch. Remove the optimisation to keep everything simple
and enable the MacOS toolbox ROM to start keeping time.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210311100505.22596-8-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
4 years agomac_via: fix 60Hz VIA1 timer interval
Mark Cave-Ayland [Thu, 11 Mar 2021 10:05:04 +0000 (10:05 +0000)] 
mac_via: fix 60Hz VIA1 timer interval

The 60Hz timer is initialised using timer_new_ns() meaning that the timer
interval should be measured in ns, and therefore its period is a thousand
times too short.

Use a define for the 60Hz timer period taking the more precise value as
documented in the Guide To The Macintosh Family Hardware.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20210311100505.22596-7-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
4 years agomac_via: rename VBL timer to 60Hz timer
Mark Cave-Ayland [Thu, 11 Mar 2021 10:05:03 +0000 (10:05 +0000)] 
mac_via: rename VBL timer to 60Hz timer

According to the "Guide To The Macintosh Family Hardware", the 60Hz VIA1 timer
on newer Macs such as the Quadra only exists for compatibility with old software
and is no longer synced to the VBL interval.

Rename the VBL timer to 60Hz timer to emphasise this and to prevent confusion
when the real VBL interrupt (now handled as a NuBus slot interrupt) is added in
future.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20210311100505.22596-6-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
4 years agomac_via: don't re-inject ADB response when switching to IDLE state
Mark Cave-Ayland [Thu, 11 Mar 2021 10:05:02 +0000 (10:05 +0000)] 
mac_via: don't re-inject ADB response when switching to IDLE state

The current workaround for the Linux ADB state machine in kernels < 5.6 switching
the VIA back to IDLE state between send and receive modes is to re-inject the
first byte of the response in the IDLE state, and then force the state machine
into generating an autopoll reply.

In fact what is happening is much simpler: analysis of traces from a real Quadra
suggest that the existing data is returned as the first autopoll response rather
than generating an immediate response starting whilst still in IDLE state.

Update the ADB receive code to work in the same way, which allows the re-injection
code to be completely removed from adb_via_receive() and for adb_via_poll() to
be simplified accordingly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20210311100505.22596-5-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
4 years agomac_via: allow long accesses to VIA registers
Mark Cave-Ayland [Thu, 11 Mar 2021 10:05:01 +0000 (10:05 +0000)] 
mac_via: allow long accesses to VIA registers

The MacOS SCSI driver uses a long access to read the VIA registers rather than
just a single byte during the message out phase.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210311100505.22596-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
4 years agomac_via: fix up adb_via_receive() trace events
Mark Cave-Ayland [Thu, 11 Mar 2021 10:05:00 +0000 (10:05 +0000)] 
mac_via: fix up adb_via_receive() trace events

The use of the post-increment operator on adb_data_in_index meant that the
trace-event was accidentally displaying the next byte in the incoming ADB
data buffer rather than the current byte.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210311100505.22596-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
4 years agomac_via: switch rtc pram trace-events to use hex rather than decimal for addresses
Mark Cave-Ayland [Thu, 11 Mar 2021 10:04:59 +0000 (10:04 +0000)] 
mac_via: switch rtc pram trace-events to use hex rather than decimal for addresses

Since all the documentation uses the hex offsets, this makes it much easier
to see what is going on.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210311100505.22596-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
4 years agoUpdate OpenBIOS images to 4a004110 built from submodule.
Mark Cave-Ayland [Tue, 16 Mar 2021 08:20:56 +0000 (08:20 +0000)] 
Update OpenBIOS images to 4a004110 built from submodule.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
4 years agoqemu-timer: allow freeing a NULL timer
Paolo Bonzini [Wed, 10 Mar 2021 15:38:48 +0000 (10:38 -0500)] 
qemu-timer: allow freeing a NULL timer

Since 5f8e93c3e2 ("util/qemu-timer: Make timer_free() imply timer_del()", 2021-01-08)
it is not possible anymore to pass a NULL pointer to timer_free().  Previously
it would do nothing as it would simply pass NULL down to g_free().

Rectify this, which also fixes "-chardev braille" when there is no device.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agohw/i8254: fix vmstate load
Pavel Dovgalyuk [Wed, 10 Mar 2021 10:21:40 +0000 (13:21 +0300)] 
hw/i8254: fix vmstate load

QEMU timer of channel 0 in i8254 is used to raise irq
at the specified moment of time. This irq can be disabled
with irq_disabled flag. But when vmstate of the pit is
loaded, timer may be rearmed despite the disabled interrupts.
This patch adds irq_disabled flag check to fix that.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Message-Id: <161537170060.6654.9430112746749476215.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agoscsi: fix sense code for EREMOTEIO
Paolo Bonzini [Tue, 9 Mar 2021 13:56:42 +0000 (14:56 +0100)] 
scsi: fix sense code for EREMOTEIO

SENSE_CODE(LUN_COMM_FAILURE) has an ABORTED COMMAND sense key,
so it results in a retry in Linux.  To ensure that EREMOTEIO
is forwarded to the guest, use a HARDWARE ERROR sense key
instead.  Note that the code before commit d7a84021d was incorrect
because it used HARDWARE_ERROR as a SCSI status, not as a sense
key.

Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agoRevert "accel: kvm: Add aligment assert for kvm_log_clear_one_slot"
Paolo Bonzini [Tue, 9 Mar 2021 13:46:11 +0000 (14:46 +0100)] 
Revert "accel: kvm: Add aligment assert for kvm_log_clear_one_slot"

This reverts commit 3920552846e881bafa9f9aad0bb1a6eef874d7fb.
Thomas Huth reported a failure with CentOS 6 guests:

../../devel/qemu/accel/kvm/kvm-all.c:690: kvm_log_clear_one_slot: Assertion `QEMU_IS_ALIGNED(start | size, psize)' failed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agoconfigure: add option to explicitly enable/disable libgio
Denis Plotnikov [Fri, 12 Mar 2021 15:14:40 +0000 (18:14 +0300)] 
configure: add option to explicitly enable/disable libgio

Now, compilation of util/dbus is implicit and depends
on libgio presence on the building host.
The patch adds options to manage libgio dependencies explicitly.

Signed-off-by: Denis Plotnikov <den-plotnikov@yandex-team.ru>
Message-Id: <20210312151440.405776-1-den-plotnikov@yandex-team.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agofuzz: move some DMA hooks
Alexander Bulekov [Mon, 15 Mar 2021 14:05:12 +0000 (10:05 -0400)] 
fuzz: move some DMA hooks

For the sparse-mem device, we want the fuzzer to populate entire DMA
reads from sparse-mem, rather than hooking into the individual MMIO
memory_region_dispatch_read operations. Otherwise, the fuzzer will treat
each sequential read separately (and populate it with a separate
pattern). Work around this by rearranging some DMA hooks. Since the
fuzzer has it's own logic to skip accidentally writing to MMIO regions,
we can call the DMA cb, outside the flatview_translate loop.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agofuzz: configure a sparse-mem device, by default
Alexander Bulekov [Mon, 15 Mar 2021 14:05:11 +0000 (10:05 -0400)] 
fuzz: configure a sparse-mem device, by default

The generic-fuzzer often provides randomized DMA addresses to
virtual-devices. For a 64-bit address-space, the chance of these
randomized addresses coinciding with RAM regions, is fairly small. Even
though the fuzzer's instrumentation eventually finds valid addresses,
this can take some-time, and slows-down fuzzing progress (especially,
when multiple DMA buffers are involved). To work around this, create
"fake" sparse-memory that spans all of the 64-bit address-space. Adjust
the DMA call-back to populate this sparse memory, correspondingly

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agomemory: add a sparse memory device for fuzzing
Alexander Bulekov [Mon, 15 Mar 2021 14:05:10 +0000 (10:05 -0400)] 
memory: add a sparse memory device for fuzzing

For testing, it can be useful to simulate an enormous amount of memory
(e.g. 2^64 RAM). This adds an MMIO device that acts as sparse memory.
When something writes a nonzero value to a sparse-mem address, we
allocate a block of memory. For now, since the only user of this device
is the fuzzer, we do not track and free zeroed blocks. The device has a
very low priority (so it can be mapped beneath actual RAM, and virtual
device MMIO regions).

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agofuzz: add a am53c974 generic-fuzzer config
Alexander Bulekov [Sun, 14 Mar 2021 05:56:37 +0000 (00:56 -0500)] 
fuzz: add a am53c974 generic-fuzzer config

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agofuzz: add instructions for building reproducers
Alexander Bulekov [Sun, 14 Mar 2021 04:23:57 +0000 (23:23 -0500)] 
fuzz: add instructions for building reproducers

We have several scripts that help build reproducers, but no
documentation for how they should be used. Add some documentation

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agofuzz: add a script to build reproducers
Alexander Bulekov [Sun, 14 Mar 2021 04:23:56 +0000 (23:23 -0500)] 
fuzz: add a script to build reproducers

Currently, bash and C crash reproducers are be built manually. This is a
problem, as we want to integrate reproducers into the tree, for
regression testing. This patch adds a script that converts a sequence of
QTest commands into a pasteable Bash reproducer, or a libqtest-based C
program. This will try to wrap pasteable reproducers to 72 chars, but
the generated C code will not have nice formatting. Therefore, the C
output of this script should be piped through an auto-formatter, such as
clang-format

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agofuzz: don't leave orphan llvm-symbolizers around
Alexander Bulekov [Wed, 10 Mar 2021 06:12:36 +0000 (01:12 -0500)] 
fuzz: don't leave orphan llvm-symbolizers around

I noticed that with a sufficiently small timeout, the fuzzer fork-server
sometimes locks up. On closer inspection, the issue appeared to be
caused by entering our SIGALRM handler, while libfuzzer is in it's crash
handlers. Because libfuzzer relies on pipe communication with an
external child process to print out stack-traces, we shouldn't exit
early, and leave an orphan child. Check for children in the SIGALRM
handler to avoid this issue.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 years agofuzz: fix the pro100 generic-fuzzer config
Alexander Bulekov [Sun, 21 Feb 2021 00:47:17 +0000 (19:47 -0500)] 
fuzz: fix the pro100 generic-fuzzer config

The device-type names for the pro100 network cards, are i8255.. We were
matching "eepro", which catches the PCI PIO/MMIO regions for those
devices, however misses the actual PCI device, which we use to map the
BARs, before fuzzing. Fix that

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>