Commit Graph

96641 Commits

Author SHA1 Message Date
Paolo Bonzini 12640f05eb meson: put cross compiler info in a separate section
While at it, remove a dead assignment and simply inline the value of the
"target" variable, which is used just once.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-15 11:12:32 +02:00
Zhenzhong Duan 766a981474 q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled
According to spec:
"TSEG Enable (T_EN): Enabling of SMRAM memory for Extended SMRAM space
only. When G_SMRAME = 1 and TSEG_EN = 1, the TSEG is enabled to appear
in the appropriate physical address space. Note that once D_LCK is set,
this bit becomes read only."

Changed to match the spec description.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20220615034501.2733802-1-zhenzhong.duan@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-15 11:11:37 +02:00
Alexander Bulekov aa4f3a3b88 build: fix check for -fsanitize-coverage-allowlist
The existing check has two problems:
1. Meson uses a private directory for the get_supported_arguments check.
./instrumentation-filter does not exist in that private directory (it is
copied into the root of the build-directory).

2. fsanitize-coverage-allowlist is unused when coverage instrumentation
is not configured. No instrumentation are passed for the
get_supported_arguments check

Thus the check always fails. To work around this, change the check to an
"if cc.compiles" check and provide /dev/null, instead of the real
filter.

Meson log:
Working directory:  build/meson-private/tmpl6wld2d9
Command line:  clang-13 -m64 -mcx16
build/meson-private/tmpl6wld2d9/output.obj -c -O3 -D_FILE_OFFSET_BITS=64
-O0 -Werror=implicit-function-declaration -Werror=unknown-warning-option
-Werror=unused-command-line-argument
-Werror=ignored-optimization-argument
-fsanitize-coverage-allowlist=instrumentation-filter

Error:
error: argument unused during compilation:
'-fsanitize-coverage-allowlist=instrumentation-filter'

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20220614155415.4023833-1-alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-15 11:11:37 +02:00
Paolo Bonzini 39735a914d tests/vm: allow running tests in an unconfigured source tree
tests/vm/Makefile.include used to assume that it could run in an unconfigured
source tree, and Cirrus CI relies on that.  It was however broken by commit
f4c66f1705 ("tests: use tests/venv to run basevm.py-based scripts", 2022-06-06),
which co-opted the virtual environment being used by avocado tests
to also run the basevm.py tests.

For now, reintroduce the usage of qemu.qmp from the source directory, but
without the sys.path() hacks.  The CI configuration can be changed to
install the package via pip when qemu.qmp is removed from the source tree.

Cc: John Snow <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-15 11:11:37 +02:00
Paolo Bonzini b9eae9efae configure: cleanup -fno-pie detection
Place it only inside the 'if test "$pie" = "no"' conditional.  Since
commit 43924d1e53 ("pc-bios/optionrom: detect -fno-pie", 2022-05-12),
the PIE options are detected independently by pc-bios/optionrom/Makefile,
and the CFLAGS_NOPIE/LDFLAGS_NOPIE variables are not used anymore.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-15 11:11:37 +02:00
Paolo Bonzini b5569e5b56 configure: update list of preserved environment variables
INSTALL and LIBTOOL are not used anymore, but OBJCFLAGS is new and
was not listed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini 26cfd67981 virtio-mmio: cleanup reset
Make virtio_mmio_soft_reset reset the virtio device, which is performed by
both the "soft" and the "hard" reset; and then call virtio_mmio_soft_reset
from virtio_mmio_reset to emphasize that the latter is a superset of the
former.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini 9e43a83041 virtio: stop ioeventfd on reset
All calls to virtio_bus_reset are preceded by virtio_bus_stop_ioeventfd,
move the call in virtio_bus_reset: that makes sense and clarifies
that the vdc->reset function is called with ioeventfd already stopped.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini a44bed2f54 virtio-mmio: stop ioeventfd on legacy reset
If the queue PFN is set to zero on a virtio-mmio device, the device is reset.
In that case however the virtio_bus_stop_ioeventfd function was not
called; add it so that the behavior is similar to when status is set to 0.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini 997340f3c5 s390x: simplify virtio_ccw_reset_virtio
Call virtio_bus_reset instead of virtio_reset, so that the function
need not receive the VirtIODevice.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini f55ba8018c block: add more commands to preconfig mode
Of the block device commands, those that are available outside system
emulators do not require a fully constructed machine by definition.
Allow running them before machine initialization has concluded.

Of the ones that are available inside system emulation, allow querying
the PR managers, and setting up accounting and throttling.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini 39cd0c7f12 hmp: add filtering of statistics by name
Allow the user to request only a specific subset of statistics.
This can be useful when working on a feature or optimization that is
known to affect that statistic.

Example:

   (qemu) info stats vcpu halt_poll_fail_ns
   provider: kvm
       halt_poll_fail_ns (cumulative, ns): 0

In case multiple providers have the same statistic, the provider can be
specified too:

   (qemu) info stats vcpu halt_poll_fail_ns kvm
   provider: kvm
       halt_poll_fail_ns (cumulative, ns): 0

Extracted from a patch by Mark Kanda.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini cf7405bc02 qmp: add filtering of statistics by name
Allow retrieving only a subset of statistics.  This can be useful
for example in order to plot a subset of the statistics many times
a second: KVM publishes ~40 statistics for each vCPU on x86; retrieving
and serializing all of them would be useless.

Another use will be in HMP in the following patch; implementing the
filter in the backend is easy enough that it was deemed okay to make
this a public interface.

Example:

{ "execute": "query-stats",
  "arguments": {
    "target": "vcpu",
    "vcpus": [ "/machine/unattached/device[2]",
               "/machine/unattached/device[4]" ],
    "providers": [
      { "provider": "kvm",
        "names": [ "l1d_flush", "exits" ] } } }

{ "return": {
    "vcpus": [
      { "path": "/machine/unattached/device[2]"
        "providers": [
          { "provider": "kvm",
            "stats": [ { "name": "l1d_flush", "value": 41213 },
                       { "name": "exits", "value": 74291 } ] } ] },
      { "path": "/machine/unattached/device[4]"
        "providers": [
          { "provider": "kvm",
            "stats": [ { "name": "l1d_flush", "value": 16132 },
                       { "name": "exits", "value": 57922 } ] } ] } ] } }

Extracted from a patch by Mark Kanda.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini 7716417eac hmp: add filtering of statistics by provider
Allow the user to request statistics for a single provider of interest.
Extracted from a patch by Mark Kanda.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini 068cc51d42 qmp: add filtering of statistics by provider
Allow retrieving the statistics from a specific provider only.
This can be used in the future by HMP commands such as "info
sync-profile" or "info profile".  The next patch also adds
filter-by-provider capabilities to the HMP equivalent of
query-stats, "info stats".

Example:

{ "execute": "query-stats",
  "arguments": {
    "target": "vm",
    "providers": [
      { "provider": "kvm" } ] } }

The QAPI is a bit more verbose than just a list of StatsProvider,
so that it can be subsequently extended with filtering of statistics
by name.

If a provider is specified more than once in the filter, each request
will be included separately in the output.

Extracted from a patch by Mark Kanda.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Mark Kanda 433815f5bd hmp: add basic "info stats" implementation
Add an HMP command to retrieve statistics collected at run-time.
The command will retrieve and print either all VM-level statistics,
or all vCPU-level statistics for the currently selected CPU.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini cfb3448922 cutils: add functions for IEC and SI prefixes
Extract the knowledge of IEC and SI prefixes out of size_to_str and
freq_to_str, so that it can be reused when printing statistics.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Paolo Bonzini 467ef823d8 qmp: add filtering of statistics by target vCPU
Introduce a simple filtering of statistics, that allows to retrieve
statistics for a subset of the guest vCPUs.  This will be used for
example by the HMP monitor, in order to retrieve the statistics
for the currently selected CPU.

Example:
{ "execute": "query-stats",
  "arguments": {
    "target": "vcpu",
    "vcpus": [ "/machine/unattached/device[2]",
               "/machine/unattached/device[4]" ] } }

Extracted from a patch by Mark Kanda.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Mark Kanda cc01a3f4ca kvm: Support for querying fd-based stats
Add support for querying fd-based KVM stats - as introduced by Linux kernel
commit:

cb082bfab59a ("KVM: stats: Add fd-based API to read binary stats data")

This allows the user to analyze the behavior of the VM without access
to debugfs.

Signed-off-by: Mark Kanda <mark.kanda@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
Mark Kanda b9f88dc071 qmp: Support for querying stats
Gathering statistics is important for development, for monitoring and
for performance measurement.  There are tools such as kvm_stat that do
this and they rely on the _user_ knowing the interesting data points
rather than the tool (which can treat them as opaque).

The commands introduced in this commit introduce QMP support for
querying stats; the goal is to take the capabilities of these tools
and making them available throughout the whole virtualization stack,
so that one can observe, monitor and measure virtual machines without
having shell access + root on the host that runs them.

query-stats returns a list of all stats per target type (only VM
and vCPU to start); future commits add extra options for specifying
stat names, vCPU qom paths, and providers.  All these are used by the
HMP command "info stats".  Because of the development usecases around
statistics, a good HMP interface is important.

query-stats-schemas returns a list of stats included in each target
type, with an option for specifying the provider.  The concepts in the
schema are based on the KVM binary stats' own introspection data, just
translated to QAPI.

There are two reasons to have a separate schema that is not tied to
the QAPI schema.  The first is the contents of the schemas: the new
introspection data provides different information than the QAPI data,
namely unit of measurement, how the numbers are gathered and change
(peak/instant/cumulative/histogram), and histogram bucket sizes.
There's really no reason to have this kind of metadata in the QAPI
introspection schema (except possibly for the unit of measure, but
there's a very weak justification).

Another reason is the dynamicity of the schema.  The QAPI introspection
data is very much static; and while QOM is somewhat more dynamic,
generally we consider that to be a bug rather than a feature these days.
On the other hand, the statistics that are exposed by QEMU might be
passed through from another source, such as KVM, and the disadvantages of
manually updating the QAPI schema for outweight the benefits from vetting
the statistics and filtering out anything that seems "too unstable".
Running old QEMU with new kernel is a supported usecase; if old QEMU
cannot expose statistics from a new kernel, or if a kernel developer
needs to change QEMU before gathering new info from the new kernel,
then that is a poor user interface.

The framework provides a method to register callbacks for these QMP
commands.  Most of the work in fact is done by the callbacks, and a
large majority of this patch is new QAPI structs and commands.

Examples (with KVM stats):

- Query all VM stats:

{ "execute": "query-stats", "arguments" : { "target": "vm" } }

{ "return": [
     { "provider": "kvm",
       "stats": [
          { "name": "max_mmu_page_hash_collisions", "value": 0 },
          { "name": "max_mmu_rmap_size", "value": 0 },
          { "name": "nx_lpage_splits", "value": 148 },
          ... ] },
     { "provider": "xyz",
       "stats": [ ... ] }
] }

- Query all vCPU stats:

{ "execute": "query-stats", "arguments" : { "target": "vcpu" } }

{ "return": [
     { "provider": "kvm",
       "qom_path": "/machine/unattached/device[0]"
       "stats": [
          { "name": "guest_mode", "value": 0 },
          { "name": "directed_yield_successful", "value": 0 },
          { "name": "directed_yield_attempted", "value": 106 },
          ... ] },
     { "provider": "kvm",
       "qom_path": "/machine/unattached/device[1]"
       "stats": [
          { "name": "guest_mode", "value": 0 },
          { "name": "directed_yield_successful", "value": 0 },
          { "name": "directed_yield_attempted", "value": 106 },
          ... ] },
] }

- Retrieve the schemas:

{ "execute": "query-stats-schemas" }

{ "return": [
    { "provider": "kvm",
      "target": "vcpu",
      "stats": [
         { "name": "guest_mode",
           "unit": "none",
           "base": 10,
           "exponent": 0,
           "type": "instant" },
        { "name": "directed_yield_successful",
           "unit": "none",
           "base": 10,
           "exponent": 0,
           "type": "cumulative" },
        ... ]
    },
    { "provider": "kvm",
      "target": "vm",
      "stats": [
        { "name": "max_mmu_page_hash_collisions",
           "unit": "none",
           "base": 10,
           "exponent": 0,
           "type": "peak" },
        ... ]
    },
    { "provider": "xyz",
      "target": "vm",
      "stats": [ ... ]
    }
] }

Signed-off-by: Mark Kanda <mark.kanda@oracle.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:29 +02:00
Richard Henderson debd075366 Various testing fixes:
- fix compiler abi for test-armv6m-undef
   - fix isns suffixes for i386 tcg tests
   - fix gitlab cfi jobs
   - fix makefile docker invocation
   - don't enable xtensa-linux-user builds with system compiler
   - fix CIRRUS_nn var checking
   - don't spam the aarch64/32 runners with too many jobs at once
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmKnxfUACgkQ+9DbCVqe
 KkSksAf/eXGL/k0zUU4RmxmQGWatCPPfbdxWj/pRDJrZl4cvegYK4cqXcfblDkiJ
 f5kdB4FsSHgJUKic7K7sBSke2xgoi2bvBMeqNIknLo89b+xXZLJSzTE7XCi0W+hm
 ll3GtHNJMEPjrIhSIAsqiSMFloL5xi7uz+ylBAB49skGF6F3rkCMv4fl7TDFKqaH
 y5fRzLZMJg+FhlHNwGO0H8O32ZU7FlyqLGQT3JWZywR0n241kQ+gXLykQjQ7//nd
 9EbtppXiSOuusbggGCbmUQrEprW93TAEkgxUcuUuQYiAwDp89s66Q0gcwo1qMtcx
 mORfc+018/WJpBwFF904hBPPjgO08w==
 =PfzM
 -----END PGP SIGNATURE-----

Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging

Various testing fixes:

  - fix compiler abi for test-armv6m-undef
  - fix isns suffixes for i386 tcg tests
  - fix gitlab cfi jobs
  - fix makefile docker invocation
  - don't enable xtensa-linux-user builds with system compiler
  - fix CIRRUS_nn var checking
  - don't spam the aarch64/32 runners with too many jobs at once

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmKnxfUACgkQ+9DbCVqe
# KkSksAf/eXGL/k0zUU4RmxmQGWatCPPfbdxWj/pRDJrZl4cvegYK4cqXcfblDkiJ
# f5kdB4FsSHgJUKic7K7sBSke2xgoi2bvBMeqNIknLo89b+xXZLJSzTE7XCi0W+hm
# ll3GtHNJMEPjrIhSIAsqiSMFloL5xi7uz+ylBAB49skGF6F3rkCMv4fl7TDFKqaH
# y5fRzLZMJg+FhlHNwGO0H8O32ZU7FlyqLGQT3JWZywR0n241kQ+gXLykQjQ7//nd
# 9EbtppXiSOuusbggGCbmUQrEprW93TAEkgxUcuUuQYiAwDp89s66Q0gcwo1qMtcx
# mORfc+018/WJpBwFF904hBPPjgO08w==
# =PfzM
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 13 Jun 2022 04:19:17 PM PDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [undefined]
# 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: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu:
  .gitlab: use less aggressive nproc on our aarch64/32 runners
  gitlab: compare CIRRUS_nn vars against 'null' not ""
  tests/tcg: disable xtensa-linux-user again
  tests/docker: fix the IMAGE for build invocation
  gitlab-ci: Fix the build-cfi-aarch64 and build-cfi-ppc64-s390x jobs
  tests/tcg/i386: Use explicit suffix on fist insns
  test/tcg/arm: Use -mfloat-abi=soft for test-armv6m-undef

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-06-13 21:10:57 -07:00
Alex Bennée b56d1ee951 .gitlab: use less aggressive nproc on our aarch64/32 runners
Running on all 80 cores of our aarch64 runner does occasionally
trigger a race condition which fails the build. However the CI system
is not the time and place to play with much heisenbugs so turn down
the nproc to "only" use 40 cores in the build.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220613171258.1905715-8-alex.bennee@linaro.org>
2022-06-14 00:15:06 +01:00
Daniel P. Berrangé 34776d80f3 gitlab: compare CIRRUS_nn vars against 'null' not ""
The GitLab variable comparisons don't have shell like semantics where
an unset variable compares equal to empty string. We need to explicitly
test against 'null' to detect an unset variable.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220608160651.248781-1-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220613171258.1905715-7-alex.bennee@linaro.org>
2022-06-14 00:15:06 +01:00
Paolo Bonzini c48a5c4741 tests/tcg: disable xtensa-linux-user again
The move from tests/tcg/configure.sh started enabling the container image
for xtensa-linux-user, which fails because the compiler does not have
the full set of headers.  The cause is the "xtensa*-softmmu)" case
in tests/tcg/configure.sh which became just "xtensa*)" in the new
probe_target_compiler shell function.  Look out for xtensa*-linux-user
and do not configure it.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220608135727.1341946-1-pbonzini@redhat.com>
Fixes: cd362defbb ("tests/tcg: merge configure.sh back into main configure script")
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220613171258.1905715-6-alex.bennee@linaro.org>
2022-06-14 00:15:06 +01:00
Alex Bennée ab698a4d8b tests/docker: fix the IMAGE for build invocation
We inadvertently broke the ability to run local builds when the code
was re-factored. The result was the run stanza failing to find the
docker image with it's qemu/ prefix.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: d39eaa2266 ("tests/docker: simplify docker-TEST@IMAGE targets")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220613171258.1905715-5-alex.bennee@linaro.org>
2022-06-14 00:15:06 +01:00
Thomas Huth 72ec89bfc5 gitlab-ci: Fix the build-cfi-aarch64 and build-cfi-ppc64-s390x jobs
The job definitions recently got a second "variables:" section by
accident and thus are failing now if one tries to run them. Merge
the two sections into one again to fix the issue.

And while we're at it, bump the timeout here (70 minutes are currently
not enough for the aarch64 job). The jobs are marked as manual anyway,
so if the user starts them, they want to see their result for sure and
then it's annoying if the job timeouts too early.

Fixes: e312d1fdbb ("gitlab: convert build/container jobs to .base_job_template")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220603124809.70794-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220613171258.1905715-4-alex.bennee@linaro.org>
2022-06-14 00:15:06 +01:00
Richard Henderson 6012d96379 tests/tcg/i386: Use explicit suffix on fist insns
Fixes a number of assembler warnings of the form:

test-i386.c: Assembler messages:
test-i386.c:869: Warning: no instruction mnemonic suffix given
  and no register operands; using default for `fist'

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220527171143.168276-1-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220613171258.1905715-3-alex.bennee@linaro.org>
2022-06-14 00:15:04 +01:00
Richard Henderson b2df786170 test/tcg/arm: Use -mfloat-abi=soft for test-armv6m-undef
GCC11 from crossbuild-essential-armhf from ubuntu 22.04 errors:
cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220604032713.174976-1-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220613171258.1905715-2-alex.bennee@linaro.org>
2022-06-14 00:14:59 +01:00
Richard Henderson dcb40541eb MIPS patches queue
- Various TCG fixes (Marcin Nowakowski, Ni Hui, Stefan Pejic, Stefan Pejic)
 - Sysbus floppy controller fix (Peter Maydell)
 - QOM'ification of PIIX southbridge (Mark Cave-Ayland, Bernhard Beschow)
 - Various fixes on ISA devices commonly used by x86/mips machines (Bernhard)
 - Few cleanups in accel/tcg & documentation (Bernhard)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmKlDmUACgkQ4+MsLN6t
 wN67txAA0Am97ts6KcVjVdqbb7OjgMNiFWOHp35rLtw+ySOQ76XfqzQHykMMSKw3
 PYEm/uYhLRV1vHCb83v7isYI8nSijnYbj5boBJX2u0Zep/1yFGq9s2MZlx0o059s
 IQOD1uGH4U+yzBsu9fFMOdruahKkGuAxUy+GsZUs54dALDleDL+SyO92ITJGJWK+
 pFIxnFhmsoYw+5jBnXuRyb7n1IsLWdjLQrBjcj/PyVSRPPWDuqalMxnkHkdKbu0g
 j/Aeyn64X1g+xtIgVX4zcaRh7crdp35jR7clTEya3BKSYi0CUaF7cFaykLAxxY6p
 xLQiMWWKOrWhUEDrKDhnV1Cg7ASiTf3mL93Ryn1tF+9NfsPOAyvgTGn9nGhb89Kc
 tuLXwdvxVZiSgtp4Hr5RkgIC+NTj8rFypiDbsjHlVt4mt4nnwIia/CrROHNnyo6b
 mzDg3vWXT63liWuPxoAqPrW4Fd9J93ndtUkrVAx+VqQV5KwT6WUBx5a4YTWU/OtL
 nfTUNpRJkjIScZ4xF1D0ob/6aIAnlDHEyhLuyGo4ZTHh7zXiF0vprd1C1S4F/GEk
 yfaXVkokkuoQgkiNcmggf9z/Z7ghaDUgLIPPLFerMaSjh94x0smEiiA33qTwMXNH
 NcayAMRSS3U3boUtVmkCeSJ037+woXgHYBP/6K8PyOoxCdQBPV8=
 =6Ccu
 -----END PGP SIGNATURE-----

Merge tag 'mips-20220611' of https://github.com/philmd/qemu into staging

MIPS patches queue

- Various TCG fixes (Marcin Nowakowski, Ni Hui, Stefan Pejic, Stefan Pejic)
- Sysbus floppy controller fix (Peter Maydell)
- QOM'ification of PIIX southbridge (Mark Cave-Ayland, Bernhard Beschow)
- Various fixes on ISA devices commonly used by x86/mips machines (Bernhard)
- Few cleanups in accel/tcg & documentation (Bernhard)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmKlDmUACgkQ4+MsLN6t
# wN67txAA0Am97ts6KcVjVdqbb7OjgMNiFWOHp35rLtw+ySOQ76XfqzQHykMMSKw3
# PYEm/uYhLRV1vHCb83v7isYI8nSijnYbj5boBJX2u0Zep/1yFGq9s2MZlx0o059s
# IQOD1uGH4U+yzBsu9fFMOdruahKkGuAxUy+GsZUs54dALDleDL+SyO92ITJGJWK+
# pFIxnFhmsoYw+5jBnXuRyb7n1IsLWdjLQrBjcj/PyVSRPPWDuqalMxnkHkdKbu0g
# j/Aeyn64X1g+xtIgVX4zcaRh7crdp35jR7clTEya3BKSYi0CUaF7cFaykLAxxY6p
# xLQiMWWKOrWhUEDrKDhnV1Cg7ASiTf3mL93Ryn1tF+9NfsPOAyvgTGn9nGhb89Kc
# tuLXwdvxVZiSgtp4Hr5RkgIC+NTj8rFypiDbsjHlVt4mt4nnwIia/CrROHNnyo6b
# mzDg3vWXT63liWuPxoAqPrW4Fd9J93ndtUkrVAx+VqQV5KwT6WUBx5a4YTWU/OtL
# nfTUNpRJkjIScZ4xF1D0ob/6aIAnlDHEyhLuyGo4ZTHh7zXiF0vprd1C1S4F/GEk
# yfaXVkokkuoQgkiNcmggf9z/Z7ghaDUgLIPPLFerMaSjh94x0smEiiA33qTwMXNH
# NcayAMRSS3U3boUtVmkCeSJ037+woXgHYBP/6K8PyOoxCdQBPV8=
# =6Ccu
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 11 Jun 2022 02:51:33 PM PDT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]

* tag 'mips-20220611' of https://github.com/philmd/qemu:
  docs/devel: Fix link to developer mailing lists
  accel/tcg: Inline dump_opcount_info() and remove it
  accel/tcg/cpu-exec: Unexport dump_drift_info()
  hw/mips/boston: Initialize g_autofree pointers

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-06-11 21:13:27 -07:00
Richard Henderson b871cc83d6 bsd-user upstreaming: read, write and exit
This series of patches continues the effort to get system calls working
 upstream. This series was cleaved off a prior series to give me time to rework
 based on the feedback from the first time I posted these. read, write and exit
 are implemented, along with a few helper functions and tracing.
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - https://gpgtools.org
 
 iQIzBAABCgAdFiEEIDX4lLAKo898zeG3bBzRKH2wEQAFAmKknqsACgkQbBzRKH2w
 EQDJFhAA3ARnphfxKUvKHzi6ARza8YRFNJs/X48l78xugW8Fx2+UFxn/oPzVYuM3
 TUIIRNIXQxYDWP5rNN4zNfYjn1F32qx4PrLzzHw4t/0pNvNDvbVKyw+OB1pNUVI9
 6hNH7jTLczi4OwZFPC4bJdFFHI55t4PCHxPaMQQO76lEsFzz3+9OcNNj3/j5aTBH
 kY3FsmOIKFEFuqDANjdn13lBlkNNWj5WMIsEQd+k1TPTfG3EWDlfHVJVezx9j5uH
 KMUjRRqBANLVJuqhog7sVAdkR6o/aKuq16nPVAgkLeJrsjwljoO1bGL3DTFWzhAo
 v3+S3a5gCReLXA/Z+dGCuJysmimsm+XdJWHyNIwDCV/UUg9tXc9/BI/eBSK7MLbz
 hvURY3cRSSVY+xiu5ts1OCp1bbqMaYbpIrv1mLZMA/32Y1KNv0LwSI0ClGag0MJ1
 rSVC3i/TGYn8Dk7TlfKkrKn751ZCCDsxZGROEcPlTV84Mc7080lpgYZKlgLCPJNT
 WWaVSBs9YhHhmoG3R3GurfsHnnRr8Y8iZkmndoCJdeSlmZh/1oD31PWKhnydsPa9
 jQCENkAM0dOM/r+hV+paFxOPkgklu7KLtjqGnVRxgB4j37jA9KDyw+UXLmjipP0K
 IwPlsNIfk1LujID3o5nJVgf/K+TJpXS7JDcUsuB9+FvlkeEMWm8=
 =nOc2
 -----END PGP SIGNATURE-----

Merge tag 'bsd-user-preen-2022q2-pull-request' of ssh://github.com/qemu-bsd-user/qemu-bsd-user into staging

bsd-user upstreaming: read, write and exit

This series of patches continues the effort to get system calls working
upstream. This series was cleaved off a prior series to give me time to rework
based on the feedback from the first time I posted these. read, write and exit
are implemented, along with a few helper functions and tracing.

# -----BEGIN PGP SIGNATURE-----
# Comment: GPGTools - https://gpgtools.org
#
# iQIzBAABCgAdFiEEIDX4lLAKo898zeG3bBzRKH2wEQAFAmKknqsACgkQbBzRKH2w
# EQDJFhAA3ARnphfxKUvKHzi6ARza8YRFNJs/X48l78xugW8Fx2+UFxn/oPzVYuM3
# TUIIRNIXQxYDWP5rNN4zNfYjn1F32qx4PrLzzHw4t/0pNvNDvbVKyw+OB1pNUVI9
# 6hNH7jTLczi4OwZFPC4bJdFFHI55t4PCHxPaMQQO76lEsFzz3+9OcNNj3/j5aTBH
# kY3FsmOIKFEFuqDANjdn13lBlkNNWj5WMIsEQd+k1TPTfG3EWDlfHVJVezx9j5uH
# KMUjRRqBANLVJuqhog7sVAdkR6o/aKuq16nPVAgkLeJrsjwljoO1bGL3DTFWzhAo
# v3+S3a5gCReLXA/Z+dGCuJysmimsm+XdJWHyNIwDCV/UUg9tXc9/BI/eBSK7MLbz
# hvURY3cRSSVY+xiu5ts1OCp1bbqMaYbpIrv1mLZMA/32Y1KNv0LwSI0ClGag0MJ1
# rSVC3i/TGYn8Dk7TlfKkrKn751ZCCDsxZGROEcPlTV84Mc7080lpgYZKlgLCPJNT
# WWaVSBs9YhHhmoG3R3GurfsHnnRr8Y8iZkmndoCJdeSlmZh/1oD31PWKhnydsPa9
# jQCENkAM0dOM/r+hV+paFxOPkgklu7KLtjqGnVRxgB4j37jA9KDyw+UXLmjipP0K
# IwPlsNIfk1LujID3o5nJVgf/K+TJpXS7JDcUsuB9+FvlkeEMWm8=
# =nOc2
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 11 Jun 2022 06:54:51 AM PDT
# gpg:                using RSA key 2035F894B00AA3CF7CCDE1B76C1CD1287DB01100
# gpg: Good signature from "Warner Losh <wlosh@netflix.com>" [unknown]
# gpg:                 aka "Warner Losh <imp@bsdimp.com>" [unknown]
# gpg:                 aka "Warner Losh <imp@freebsd.org>" [unknown]
# gpg:                 aka "Warner Losh <imp@village.org>" [unknown]
# gpg:                 aka "Warner Losh <wlosh@bsdimp.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: 2035 F894 B00A A3CF 7CCD  E1B7 6C1C D128 7DB0 1100

* tag 'bsd-user-preen-2022q2-pull-request' of ssh://github.com/qemu-bsd-user/qemu-bsd-user:
  bsd-user/freebsd/os-syscall.c: Implement exit
  bsd-user/bsd-file.h: Meat of the write system calls
  bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv
  bsd-user/freebsd/os-syscall.c: Tracing and error boilerplate
  bsd-user/freebsd/os-syscall.c: unlock_iovec
  bsd-user/freebsd/os-syscall.c: lock_iovec

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-06-11 20:51:18 -07:00
Bernhard Beschow 6e0c185988 docs/devel: Fix link to developer mailing lists
Ammends commit 9f73de8df0 'docs: rSTify
the "SubmitAPatch" wiki'.

Cc: qemu-stable@nongnu.org
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-11-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 23:50:35 +02:00
Bernhard Beschow ea7c452783 accel/tcg: Inline dump_opcount_info() and remove it
dump_opcount_info() is a one-line wrapper around tcg_dump_op_count()
which is also exported. So use the latter directly.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-10-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 23:50:35 +02:00
Bernhard Beschow c304d11f45 accel/tcg/cpu-exec: Unexport dump_drift_info()
Commit 3a841ab53f 'qapi: introduce
x-query-jit QMP command' basically moved the only function using
dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't
need to be exported any longer.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-9-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 23:50:35 +02:00
Bernhard Beschow b1f66fab45 hw/mips/boston: Initialize g_autofree pointers
Fixes compilation due to false positives with -Werror:

  In file included from /usr/include/glib-2.0/glib.h:114,
                   from qemu/src/include/glib-compat.h:32,
                   from qemu/src/include/qemu/osdep.h:144,
                   from ../src/hw/mips/boston.c:20:
  In function ‘g_autoptr_cleanup_generic_gfree’,
      inlined from ‘boston_mach_init’ at ../src/hw/mips/boston.c:790:52:
  /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘dtb_load_data’ may be used uninitialized [-Werror=maybe-uninitialized]
     28 |   g_free (*pp);
        |   ^~~~~~~~~~~~
  ../src/hw/mips/boston.c: In function ‘boston_mach_init’:
  ../src/hw/mips/boston.c:790:52: note: ‘dtb_load_data’ was declared here
    790 |             g_autofree const void *dtb_file_data, *dtb_load_data;
        |                                                    ^~~~~~~~~~~~~
  In function ‘g_autoptr_cleanup_generic_gfree’,
    inlined from ‘boston_mach_init’ at ../src/hw/mips/boston.c:790:36:
  /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘dtb_file_data’ may be used uninitialized [-Werror=maybe-uninitialized]
     28 |   g_free (*pp);
        |   ^~~~~~~~~~~~
  ../src/hw/mips/boston.c: In function ‘boston_mach_init’:
  ../src/hw/mips/boston.c:790:36: note: ‘dtb_file_data’ was declared here
    790 |             g_autofree const void *dtb_file_data, *dtb_load_data;
        |                                    ^~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220605151908.30566-1-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 23:50:35 +02:00
Richard Henderson 8b7f856e9d MIPS patches queue
- Various TCG fixes (Marcin Nowakowski, Ni Hui, Stefan Pejic, Stefan Pejic)
 - Sysbus floppy controller fix (Peter Maydell)
 - QOM'ification of PIIX southbridge (Mark Cave-Ayland, Bernhard Beschow)
 - Various fixes on ISA devices commonly used by x86/mips machines (Bernhard)
 - Few cleanups in accel/tcg & documentation (Bernhard)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmKkbtEACgkQ4+MsLN6t
 wN7uPg/+K4TawuNb5CFPa67gdP+7QqOQJF7ADJm4jDgJN0qRg8uDDE1/cSvtD1xn
 ttWfy/AHCtuCwLWTJ5T3QCIXJBrEmfqu/RkGoljnIDWZBKcnrzsTmBOBylDbO8zC
 ZuNiOr0CUzSoCJsQ297U8tYW+2hDMSLvJrwbT97vqoSETsoTbBX/fFqQ7zdOqU5d
 e0CDiJNIinjObtylCKWe0JP1pRyWRexWX4jEPeEYR2eCE49EoZi47JJmGFtQJB5j
 wtVO48bN1Wn97mqeML6JEGXfgNa672bgh82Gulfyrx+g9fBM1Al8nEy/mmbUkgd6
 Imrt0jxp2Cqtl6ENC6CB8mT5ZjMKPsG5rzvNvaQAoM1jhZbZQXx3l1V/pSU5cnf5
 miVbkjepl9NVvFZ4bJ4oHOCA9l7BaZoUmRa5W0XOZW9y8Ph2H4kUZDI+g4Rif136
 Wgf5EqbFi/tJlC11S3vLwDZJmw2a3LM1esldJom3/EgA0e8t5o2xY/9lGee8WDAe
 dn+t8etpK4WMQ/694WAR051BHiH2XP2DvsX6Ioi82aYOqL6NgGJYAI+/CP8Mhteg
 Rmqg+p+7jRGqtH1QH3i/77TYJB/J0QqXp8lBHwfdCAyCzt3BkA/e5nXF5Ez0Am3m
 i160SjSRejVaLc5bxTXiKLvZHUekea0PNtajWFjv42BxwlbgmEY=
 =KtFC
 -----END PGP SIGNATURE-----

Merge tag 'mips-20220611' of https://github.com/philmd/qemu into staging

MIPS patches queue

- Various TCG fixes (Marcin Nowakowski, Ni Hui, Stefan Pejic, Stefan Pejic)
- Sysbus floppy controller fix (Peter Maydell)
- QOM'ification of PIIX southbridge (Mark Cave-Ayland, Bernhard Beschow)
- Various fixes on ISA devices commonly used by x86/mips machines (Bernhard)
- Few cleanups in accel/tcg & documentation (Bernhard)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmKkbtEACgkQ4+MsLN6t
# wN7uPg/+K4TawuNb5CFPa67gdP+7QqOQJF7ADJm4jDgJN0qRg8uDDE1/cSvtD1xn
# ttWfy/AHCtuCwLWTJ5T3QCIXJBrEmfqu/RkGoljnIDWZBKcnrzsTmBOBylDbO8zC
# ZuNiOr0CUzSoCJsQ297U8tYW+2hDMSLvJrwbT97vqoSETsoTbBX/fFqQ7zdOqU5d
# e0CDiJNIinjObtylCKWe0JP1pRyWRexWX4jEPeEYR2eCE49EoZi47JJmGFtQJB5j
# wtVO48bN1Wn97mqeML6JEGXfgNa672bgh82Gulfyrx+g9fBM1Al8nEy/mmbUkgd6
# Imrt0jxp2Cqtl6ENC6CB8mT5ZjMKPsG5rzvNvaQAoM1jhZbZQXx3l1V/pSU5cnf5
# miVbkjepl9NVvFZ4bJ4oHOCA9l7BaZoUmRa5W0XOZW9y8Ph2H4kUZDI+g4Rif136
# Wgf5EqbFi/tJlC11S3vLwDZJmw2a3LM1esldJom3/EgA0e8t5o2xY/9lGee8WDAe
# dn+t8etpK4WMQ/694WAR051BHiH2XP2DvsX6Ioi82aYOqL6NgGJYAI+/CP8Mhteg
# Rmqg+p+7jRGqtH1QH3i/77TYJB/J0QqXp8lBHwfdCAyCzt3BkA/e5nXF5Ez0Am3m
# i160SjSRejVaLc5bxTXiKLvZHUekea0PNtajWFjv42BxwlbgmEY=
# =KtFC
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 11 Jun 2022 03:30:41 AM PDT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]

* tag 'mips-20220611' of https://github.com/philmd/qemu: (49 commits)
  docs/devel: Fix link to developer mailing lists
  accel/tcg: Inline dump_opcount_info() and remove it
  accel/tcg/cpu-exec: Unexport dump_drift_info()
  hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create()
  hw/i386/pc: Remove orphan declarations
  hw/i386/pc: Unexport functions used only internally
  hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro
  hw/audio/cs4231a: Const'ify global tables
  hw: Reuse TYPE_I8042 define
  hw/rtc/mc146818rtc: QOM'ify io_base offset
  hw/i386/microvm-dt: Determine mc146818rtc's IRQ number from QOM property
  hw/i386/microvm-dt: Force explicit failure if retrieving QOM property fails
  hw/isa/piix3: Inline and remove piix3_create()
  hw/isa/piix3: Factor out ISABus retrieval from piix3_create()
  hw/isa/piix3: QOM'ify PCI device creation and wiring
  hw/isa/piix3: Move pci_map_irq_fn near pci_set_irq_fn
  hw/isa/piix4: Inline and remove piix4_create()
  hw/isa/piix4: QOM'ify PIIX4 PM creation
  hw/isa/piix4: Factor out ISABus retrieval from piix4_create()
  hw/isa/piix4: QOM'ify PCI device creation and wiring
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-06-11 08:18:55 -07:00
Bernhard Beschow 3d9641509a hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create()
etsec_create() wraps qdev API which is outdated. It is also unused,
so remove it.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-8-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 37da3bcf01 docs/devel: Fix link to developer mailing lists
Ammends commit 9f73de8df0 'docs: rSTify
the "SubmitAPatch" wiki'.

Cc: qemu-stable@nongnu.org
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-11-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 68d58770d7 hw/i386/pc: Remove orphan declarations
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-6-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow b01841fa85 accel/tcg: Inline dump_opcount_info() and remove it
dump_opcount_info() is a one-line wrapper around tcg_dump_op_count()
which is also exported. So use the latter directly.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-10-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow cb76321ecc hw/i386/pc: Unexport functions used only internally
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-5-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 7112ffd93a accel/tcg/cpu-exec: Unexport dump_drift_info()
Commit 3a841ab53f 'qapi: introduce
x-query-jit QMP command' basically moved the only function using
dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't
need to be exported any longer.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-9-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow fc5f892368 hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro
The macro seems to be used only internally, so remove it.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-4-shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow bae17e7483 hw/audio/cs4231a: Const'ify global tables
The tables contain spcifically crafted constants for algorithms, so make
them immutable.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-3-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow aa2e535c82 hw: Reuse TYPE_I8042 define
TYPE_I8042 is exported, so reuse it for consistency.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220520180109.8224-2-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 5b21b331be hw/rtc/mc146818rtc: QOM'ify io_base offset
Exposing the io_base offset as a QOM property not only allows it to be
configurable but also to be displayed in HMP:

Before:

(qemu) info qtree
       ...
          dev: mc146818rtc, id ""
            gpio-out "" 1
            base_year = 0 (0x0)
            irq = 8 (0x8)
            lost_tick_policy = "discard"

After:

          dev: mc146818rtc, id ""
            gpio-out "" 1
            base_year = 0 (0x0)
            iobase = 112 (0x70)
            irq = 8 (0x8)
            lost_tick_policy = "discard"

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220529184006.10712-4-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 8f3428cc85 hw/i386/microvm-dt: Determine mc146818rtc's IRQ number from QOM property
Since commit 3b004a1654 'hw/rtc/
mc146818rtc: QOM'ify IRQ number' mc146818rtc's IRQ number is
configurable. Fix microvm-dt to respect its value.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220529184006.10712-3-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 94c720f39e hw/i386/microvm-dt: Force explicit failure if retrieving QOM property fails
New code will be added where this is best practice. So update existing code
as well.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220529184006.10712-2-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 988fb61321 hw/isa/piix3: Inline and remove piix3_create()
During the previous changesets piix3_create() became a trivial
wrapper around more generic functions. Modernize the code.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220603185045.143789-12-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow 6e8791fb61 hw/isa/piix3: Factor out ISABus retrieval from piix3_create()
Modernizes the code.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220603185045.143789-11-shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00
Bernhard Beschow fe3055d292 hw/isa/piix3: QOM'ify PCI device creation and wiring
PCI interrupt wiring was performed in create() functions which are
obsolete. Move these tasks into QOM functions to modernize the code.

In order to avoid duplicate checking for xen_enabled() the realize
methods are now split.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220603185045.143789-10-shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:44:50 +02:00