mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-02 06:32:54 -10:00
Compare commits
135
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9027aa6395 | ||
|
|
b1efa5c236 | ||
|
|
df9168b019 | ||
|
|
3cdd1f45aa | ||
|
|
7f5f3e5acd | ||
|
|
154ed561b3 | ||
|
|
3e7d8d2233 | ||
|
|
6726d4874b | ||
|
|
64e16e3886 | ||
|
|
73768dae4a | ||
|
|
d83b61f59c | ||
|
|
803a6864ef | ||
|
|
68a90134c0 | ||
|
|
9c3273c16e | ||
|
|
bcf9282f53 | ||
|
|
cda37a6bd7 | ||
|
|
bb50cc9e75 | ||
|
|
d08e538de8 | ||
|
|
a75e415ca5 | ||
|
|
cf8bd64d4f | ||
|
|
0c85c9746f | ||
|
|
490c737bc7 | ||
|
|
704eaf8219 | ||
|
|
6620335418 | ||
|
|
e8fd97fc1e | ||
|
|
e9f6c32339 | ||
|
|
f3da6934cd | ||
|
|
c96b8c0e39 | ||
|
|
aeade0a251 | ||
|
|
9e00d74a9a | ||
|
|
5cf3b48094 | ||
|
|
ec36d522ce | ||
|
|
f72e697f24 | ||
|
|
3c84a63e2c | ||
|
|
472a420761 | ||
|
|
ab37d6bd89 | ||
|
|
739dabb1ad | ||
|
|
69b4ed0259 | ||
|
|
b692aea803 | ||
|
|
033367d0af | ||
|
|
cefb009762 | ||
|
|
413f7ba6a8 | ||
|
|
80f66f3d22 | ||
|
|
007ea6d6ed | ||
|
|
56e190d73e | ||
|
|
426beec96a | ||
|
|
1408266d1c | ||
|
|
1fc0a58a98 | ||
|
|
39408f6f14 | ||
|
|
16549930bb | ||
|
|
576338eea1 | ||
|
|
44a7e0aaf7 | ||
|
|
7f667fc7fe | ||
|
|
dc203a5987 | ||
|
|
298340c152 | ||
|
|
9b878bd927 | ||
|
|
d1b8423fb8 | ||
|
|
84858471e6 | ||
|
|
ecaf555439 | ||
|
|
1e4ce3dd87 | ||
|
|
4f5adbe697 | ||
|
|
437999ae81 | ||
|
|
3ffbdc3e12 | ||
|
|
37600704dd | ||
|
|
7a9fa39856 | ||
|
|
68b115ddae | ||
|
|
a98c7cee17 | ||
|
|
41945c6bbb | ||
|
|
7988e7c6ba | ||
|
|
4a4426275b | ||
|
|
ea35a5082a | ||
|
|
d62f4b6d0d | ||
|
|
9a51650419 | ||
|
|
5afb837e3c | ||
|
|
dffec2ddd0 | ||
|
|
aead95c7fa | ||
|
|
4b1b34c1e7 | ||
|
|
616814cd00 | ||
|
|
d47f418ea1 | ||
|
|
fe21d932f2 | ||
|
|
18b0d72fdd | ||
|
|
34febb2831 | ||
|
|
37ff07ea12 | ||
|
|
d7b8b07197 | ||
|
|
237831f9ad | ||
|
|
cac3fb4414 | ||
|
|
4404720764 | ||
|
|
7dc66ede71 | ||
|
|
eec417351f | ||
|
|
066b9de4b3 | ||
|
|
7fd0224457 | ||
|
|
e82fbf01b6 | ||
|
|
c806bbe8c1 | ||
|
|
c597e6f26d | ||
|
|
dcb80cd908 | ||
|
|
2f5f6cb90a | ||
|
|
1032dccadb | ||
|
|
acc4e8b69b | ||
|
|
73ca3ba37d | ||
|
|
7170aa66aa | ||
|
|
b107128ea6 | ||
|
|
c8fb662a58 | ||
|
|
91b2cb9a78 | ||
|
|
4a3538e6f2 | ||
|
|
69e29c484f | ||
|
|
3b9b5cbe0a | ||
|
|
48876bfc47 | ||
|
|
bb6940dbad | ||
|
|
9a17a65066 | ||
|
|
fcd5a157e6 | ||
|
|
7fb9ce40e7 | ||
|
|
82565fb6b3 | ||
|
|
46f2af3e39 | ||
|
|
3ba6e1164a | ||
|
|
e7a9d93428 | ||
|
|
e3839b0c19 | ||
|
|
abb738ad33 | ||
|
|
ea3b821595 | ||
|
|
7e4480dde2 | ||
|
|
f5827eb0ac | ||
|
|
9bbaadbf9c | ||
|
|
64092b3464 | ||
|
|
ad09b3df7e | ||
|
|
15eedfd2ff | ||
|
|
9d913e012b | ||
|
|
19484ed99a | ||
|
|
2dc652961d | ||
|
|
42490ac980 | ||
|
|
ad06bb324d | ||
|
|
fa232044a5 | ||
|
|
83daae51ee | ||
|
|
05e984c200 | ||
|
|
242376e872 | ||
|
|
f838a7e365 | ||
|
|
361f29fe1b |
No files matched your search
-14
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Common b4 settings that can be used to send patches to QEMU upstream.
|
||||
# https://b4.docs.kernel.org/
|
||||
#
|
||||
|
||||
[b4]
|
||||
send-series-to = [email protected]
|
||||
send-auto-to-cmd = echo
|
||||
send-auto-cc-cmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback
|
||||
am-perpatch-check-cmd = scripts/checkpatch.pl -q --terse --no-summary --mailback -
|
||||
prep-perpatch-check-cmd = scripts/checkpatch.pl -q --terse --no-summary --mailback -
|
||||
searchmask = https://lore.kernel.org/qemu-devel/?x=m&t=1&q=%s
|
||||
linkmask = https://lore.kernel.org/qemu-devel/%s
|
||||
linktrailermask = Message-ID: <%s>
|
||||
@@ -47,16 +47,3 @@ emacs_mode = glsl
|
||||
[*.json]
|
||||
indent_style = space
|
||||
emacs_mode = python
|
||||
|
||||
# by default follow QEMU's style
|
||||
[*.pl]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
emacs_mode = perl
|
||||
|
||||
# but user kernel "style" for imported scripts
|
||||
[scripts/{kernel-doc,get_maintainer.pl,checkpatch.pl}]
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
emacs_mode = perl
|
||||
|
||||
@@ -69,6 +69,10 @@ variables:
|
||||
- if: '$QEMU_CI != "1" && $QEMU_CI != "2" && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
|
||||
when: never
|
||||
|
||||
# Avocado jobs don't run in forks unless $QEMU_CI_AVOCADO_TESTING is set
|
||||
- if: '$QEMU_JOB_AVOCADO && $QEMU_CI_AVOCADO_TESTING != "1" && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
|
||||
when: never
|
||||
|
||||
|
||||
#############################################################
|
||||
# Stage 2: fine tune execution of jobs in specific scenarios
|
||||
@@ -97,8 +101,8 @@ variables:
|
||||
when: manual
|
||||
allow_failure: true
|
||||
|
||||
# Functional jobs can be manually started in forks
|
||||
- if: '$QEMU_JOB_FUNCTIONAL && $QEMU_CI_FUNCTIONAL != "1" && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
|
||||
# Avocado jobs can be manually start in forks if $QEMU_CI_AVOCADO_TESTING is unset
|
||||
- if: '$QEMU_JOB_AVOCADO && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
|
||||
when: manual
|
||||
allow_failure: true
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
cache:
|
||||
key: "${CI_JOB_NAME}-cache"
|
||||
paths:
|
||||
- ${CI_PROJECT_DIR}/avocado-cache
|
||||
- ${CI_PROJECT_DIR}/functional-cache
|
||||
policy: pull-push
|
||||
artifacts:
|
||||
@@ -108,10 +109,20 @@
|
||||
reports:
|
||||
junit: build/tests/results/latest/results.xml
|
||||
before_script:
|
||||
- mkdir -p ~/.config/avocado
|
||||
- echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
|
||||
- echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
|
||||
>> ~/.config/avocado/avocado.conf
|
||||
- echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
|
||||
>> ~/.config/avocado/avocado.conf
|
||||
- if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
|
||||
du -chs ${CI_PROJECT_DIR}/*-cache ;
|
||||
fi
|
||||
- export AVOCADO_ALLOW_UNTRUSTED_CODE=1
|
||||
- export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1
|
||||
- export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache
|
||||
after_script:
|
||||
- cd build
|
||||
- du -chs ${CI_PROJECT_DIR}/*-cache
|
||||
variables:
|
||||
QEMU_JOB_FUNCTIONAL: 1
|
||||
QEMU_JOB_AVOCADO: 1
|
||||
+24
-21
@@ -29,7 +29,8 @@ functional-system-alpine:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: alpine
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
AVOCADO_TAGS: arch:avr arch:loongarch64 arch:mips64 arch:mipsel
|
||||
|
||||
build-system-ubuntu:
|
||||
extends:
|
||||
@@ -39,7 +40,7 @@ build-system-ubuntu:
|
||||
job: amd64-ubuntu2204-container
|
||||
variables:
|
||||
IMAGE: ubuntu2204
|
||||
CONFIGURE_ARGS: --enable-docs --enable-rust
|
||||
CONFIGURE_ARGS: --enable-docs
|
||||
TARGETS: alpha-softmmu microblazeel-softmmu mips64el-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
|
||||
@@ -59,7 +60,8 @@ functional-system-ubuntu:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: ubuntu2204
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
AVOCADO_TAGS: arch:alpha arch:microblazeel arch:mips64el
|
||||
|
||||
build-system-debian:
|
||||
extends:
|
||||
@@ -69,7 +71,7 @@ build-system-debian:
|
||||
job: amd64-debian-container
|
||||
variables:
|
||||
IMAGE: debian
|
||||
CONFIGURE_ARGS: --with-coroutine=sigaltstack --enable-rust
|
||||
CONFIGURE_ARGS: --with-coroutine=sigaltstack
|
||||
TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu
|
||||
sparc-softmmu xtensa-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
@@ -90,7 +92,8 @@ functional-system-debian:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: debian
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc arch:xtensa
|
||||
|
||||
crash-test-debian:
|
||||
extends: .native_test_job_template
|
||||
@@ -128,12 +131,6 @@ build-system-fedora-rust-nightly:
|
||||
CONFIGURE_ARGS: --disable-docs --enable-rust --enable-strict-rust-lints
|
||||
TARGETS: aarch64-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
after_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- section_start test "Running Rust doctests"
|
||||
- cd build
|
||||
- pyvenv/bin/meson devenv -w ../rust ${CARGO-cargo} test --doc -p qemu_api
|
||||
|
||||
allow_failure: true
|
||||
|
||||
check-system-fedora:
|
||||
@@ -152,7 +149,9 @@ functional-system-fedora:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: fedora
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
AVOCADO_TAGS: arch:microblaze arch:mips arch:xtensa arch:m68k
|
||||
arch:riscv32 arch:ppc arch:sparc64
|
||||
|
||||
crash-test-fedora:
|
||||
extends: .native_test_job_template
|
||||
@@ -273,7 +272,9 @@ functional-system-centos:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: centos9
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx
|
||||
arch:sh4
|
||||
|
||||
build-system-opensuse:
|
||||
extends:
|
||||
@@ -302,7 +303,8 @@ functional-system-opensuse:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: opensuse-leap
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64
|
||||
|
||||
#
|
||||
# Flaky tests. We don't run these by default and they are allow fail
|
||||
@@ -330,9 +332,10 @@ functional-system-flaky:
|
||||
allow_failure: true
|
||||
variables:
|
||||
IMAGE: debian
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
QEMU_JOB_OPTIONAL: 1
|
||||
QEMU_TEST_FLAKY_TESTS: 1
|
||||
AVOCADO_TAGS: flaky
|
||||
|
||||
# This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
|
||||
# the configure script. The container doesn't contain Xen headers so
|
||||
@@ -473,8 +476,8 @@ clang-user:
|
||||
# Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
|
||||
# CFI builds, and thus have to disable it here.
|
||||
#
|
||||
# Split in three sets of build/check/functional to limit the execution time
|
||||
# of each job
|
||||
# Split in three sets of build/check/avocado to limit the execution time of each
|
||||
# job
|
||||
build-cfi-aarch64:
|
||||
extends:
|
||||
- .native_build_job_template
|
||||
@@ -511,7 +514,7 @@ functional-cfi-aarch64:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: fedora
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
|
||||
build-cfi-ppc64-s390x:
|
||||
extends:
|
||||
@@ -549,7 +552,7 @@ functional-cfi-ppc64-s390x:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: fedora
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
|
||||
build-cfi-x86_64:
|
||||
extends:
|
||||
@@ -583,7 +586,7 @@ functional-cfi-x86_64:
|
||||
artifacts: true
|
||||
variables:
|
||||
IMAGE: fedora
|
||||
MAKE_CHECK_ARGS: check-functional
|
||||
MAKE_CHECK_ARGS: check-avocado check-functional
|
||||
|
||||
tsan-build:
|
||||
extends: .native_build_job_template
|
||||
@@ -742,7 +745,7 @@ pages:
|
||||
- make gtags
|
||||
# We unset variables to work around a bug in some htags versions
|
||||
# which causes it to fail when the environment is large
|
||||
- CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= CI_COMMIT_DESCRIPTION= htags
|
||||
- CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= htags
|
||||
-anT --tree-view=filetree -m qemu_init
|
||||
-t "Welcome to the QEMU sourcecode"
|
||||
- mv HTML public/src
|
||||
|
||||
@@ -21,7 +21,7 @@ repourl = "https://gitlab.com/%s/%s.git" % (namespace, reponame)
|
||||
|
||||
print(f"adding upstream git repo @ {repourl}")
|
||||
subprocess.check_call(["git", "remote", "add", "check-dco", repourl])
|
||||
subprocess.check_call(["git", "fetch", "--refetch", "check-dco", "master"])
|
||||
subprocess.check_call(["git", "fetch", "check-dco", "master"])
|
||||
|
||||
ancestor = subprocess.check_output(["git", "merge-base",
|
||||
"check-dco/master", "HEAD"],
|
||||
|
||||
@@ -24,7 +24,7 @@ print(f"adding upstream git repo @ {repourl}")
|
||||
# base for the user's branch. We thus need to figure out a common
|
||||
# ancestor between the user's branch and current git master.
|
||||
subprocess.check_call(["git", "remote", "add", "check-patch", repourl])
|
||||
subprocess.check_call(["git", "fetch", "--refetch", "check-patch", "master"])
|
||||
subprocess.check_call(["git", "fetch", "check-patch", "master"])
|
||||
|
||||
ancestor = subprocess.check_output(["git", "merge-base",
|
||||
"check-patch/master", "HEAD"],
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# check-units.py: check the number of compilation units and identify
|
||||
# those that are rebuilt multiple times
|
||||
#
|
||||
# Copyright (C) 2025 Linaro Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
from os import access, R_OK, path
|
||||
from sys import argv, exit
|
||||
import json
|
||||
from collections import Counter
|
||||
|
||||
|
||||
def extract_build_units(cc_path):
|
||||
"""
|
||||
Extract the build units and their counds from compile_commands.json file.
|
||||
|
||||
Returns:
|
||||
Hash table of ["unit"] = count
|
||||
"""
|
||||
|
||||
j = json.load(open(cc_path, 'r'))
|
||||
files = [f['file'] for f in j]
|
||||
build_units = Counter(files)
|
||||
|
||||
return build_units
|
||||
|
||||
|
||||
def analyse_units(build_units):
|
||||
"""
|
||||
Analyse the build units and report stats and the top 10 rebuilds
|
||||
"""
|
||||
|
||||
print(f"Total source files: {len(build_units.keys())}")
|
||||
print(f"Total build units: {sum(units.values())}")
|
||||
|
||||
# Create a sorted list by number of rebuilds
|
||||
sorted_build_units = sorted(build_units.items(),
|
||||
key=lambda item: item[1],
|
||||
reverse=True)
|
||||
|
||||
print("Most rebuilt units:")
|
||||
for unit, count in sorted_build_units[:20]:
|
||||
print(f" {unit} built {count} times")
|
||||
|
||||
print("Least rebuilt units:")
|
||||
for unit, count in sorted_build_units[-10:]:
|
||||
print(f" {unit} built {count} times")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(argv) != 2:
|
||||
script_name = path.basename(argv[0])
|
||||
print(f"Usage: {script_name} <path_to_compile_commands.json>")
|
||||
exit(1)
|
||||
|
||||
cc_path = argv[1]
|
||||
if path.isfile(cc_path) and access(cc_path, R_OK):
|
||||
units = extract_build_units(cc_path)
|
||||
analyse_units(units)
|
||||
exit(0)
|
||||
else:
|
||||
print(f"{cc_path} doesn't exist or isn't readable")
|
||||
exit(1)
|
||||
+21
-6
@@ -15,17 +15,32 @@
|
||||
stage: build
|
||||
image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:latest
|
||||
needs: []
|
||||
allow_failure:
|
||||
exit_codes: 3
|
||||
# 20 mins larger than "timeout_in" in cirrus/build.yml
|
||||
# as there's often a 5-10 minute delay before Cirrus CI
|
||||
# actually starts the task
|
||||
timeout: 80m
|
||||
script:
|
||||
- set -o allexport
|
||||
- source .gitlab-ci.d/cirrus/$NAME.vars
|
||||
- set +o allexport
|
||||
- cirrus-vars <.gitlab-ci.d/cirrus/build.yml >.gitlab-ci.d/cirrus/$NAME.yml
|
||||
- sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g"
|
||||
-e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g"
|
||||
-e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g"
|
||||
-e "s|[@]CIRRUS_VM_INSTANCE_TYPE@|$CIRRUS_VM_INSTANCE_TYPE|g"
|
||||
-e "s|[@]CIRRUS_VM_IMAGE_SELECTOR@|$CIRRUS_VM_IMAGE_SELECTOR|g"
|
||||
-e "s|[@]CIRRUS_VM_IMAGE_NAME@|$CIRRUS_VM_IMAGE_NAME|g"
|
||||
-e "s|[@]CIRRUS_VM_CPUS@|$CIRRUS_VM_CPUS|g"
|
||||
-e "s|[@]CIRRUS_VM_RAM@|$CIRRUS_VM_RAM|g"
|
||||
-e "s|[@]UPDATE_COMMAND@|$UPDATE_COMMAND|g"
|
||||
-e "s|[@]INSTALL_COMMAND@|$INSTALL_COMMAND|g"
|
||||
-e "s|[@]PATH@|$PATH_EXTRA${PATH_EXTRA:+:}\$PATH|g"
|
||||
-e "s|[@]PKG_CONFIG_PATH@|$PKG_CONFIG_PATH|g"
|
||||
-e "s|[@]PKGS@|$PKGS|g"
|
||||
-e "s|[@]MAKE@|$MAKE|g"
|
||||
-e "s|[@]PYTHON@|$PYTHON|g"
|
||||
-e "s|[@]PIP3@|$PIP3|g"
|
||||
-e "s|[@]PYPI_PKGS@|$PYPI_PKGS|g"
|
||||
-e "s|[@]CONFIGURE_ARGS@|$CONFIGURE_ARGS|g"
|
||||
-e "s|[@]TEST_TARGETS@|$TEST_TARGETS|g"
|
||||
<.gitlab-ci.d/cirrus/build.yml >.gitlab-ci.d/cirrus/$NAME.yml
|
||||
- cat .gitlab-ci.d/cirrus/$NAME.yml
|
||||
- cirrus-run -v --show-build-log always .gitlab-ci.d/cirrus/$NAME.yml
|
||||
variables:
|
||||
@@ -37,7 +52,7 @@ x64-freebsd-14-build:
|
||||
NAME: freebsd-14
|
||||
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
|
||||
CIRRUS_VM_IMAGE_SELECTOR: image_family
|
||||
CIRRUS_VM_IMAGE_NAME: freebsd-14-3
|
||||
CIRRUS_VM_IMAGE_NAME: freebsd-14-2
|
||||
CIRRUS_VM_CPUS: 8
|
||||
CIRRUS_VM_RAM: 8G
|
||||
UPDATE_COMMAND: pkg update; pkg upgrade -y
|
||||
|
||||
@@ -8,7 +8,7 @@ env:
|
||||
CI_REPOSITORY_URL: "@CI_REPOSITORY_URL@"
|
||||
CI_COMMIT_REF_NAME: "@CI_COMMIT_REF_NAME@"
|
||||
CI_COMMIT_SHA: "@CI_COMMIT_SHA@"
|
||||
PATH: "@PATH_EXTRA@:$PATH"
|
||||
PATH: "@PATH@"
|
||||
PKG_CONFIG_PATH: "@PKG_CONFIG_PATH@"
|
||||
PYTHON: "@PYTHON@"
|
||||
MAKE: "@MAKE@"
|
||||
|
||||
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
|
||||
NINJA='/usr/local/bin/ninja'
|
||||
PACKAGING_COMMAND='pkg'
|
||||
PIP3='/usr/local/bin/pip'
|
||||
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache4 cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk-vnc gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-pyyaml py311-sphinx py311-sphinx_rtd_theme py311-tomli python3 rpm2cpio rust rust-bindgen-cli sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 vulkan-tools xorriso zstd'
|
||||
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk-vnc gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-pyyaml py311-sphinx py311-sphinx_rtd_theme py311-tomli python3 rpm2cpio rust rust-bindgen-cli sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd'
|
||||
PYPI_PKGS=''
|
||||
PYTHON='/usr/local/bin/python3'
|
||||
@@ -11,6 +11,6 @@ MAKE='/opt/homebrew/bin/gmake'
|
||||
NINJA='/opt/homebrew/bin/ninja'
|
||||
PACKAGING_COMMAND='brew'
|
||||
PIP3='/opt/homebrew/bin/pip3'
|
||||
PKGS='bash bc bindgen bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 gtk-vnc jemalloc jpeg-turbo json-c libcbor libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python3 rpm2cpio rust sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 vulkan-tools xorriso zlib zstd'
|
||||
PKGS='bash bc bindgen bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 gtk-vnc jemalloc jpeg-turbo json-c libcbor libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python3 rpm2cpio rust sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 xorriso zlib zstd'
|
||||
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli'
|
||||
PYTHON='/opt/homebrew/bin/python3'
|
||||
@@ -67,8 +67,11 @@ ppc64el-debian-cross-container:
|
||||
riscv64-debian-cross-container:
|
||||
extends: .container_job_template
|
||||
stage: containers
|
||||
# as we are currently based on 'sid/unstable' we may break so...
|
||||
allow_failure: true
|
||||
variables:
|
||||
NAME: debian-riscv64-cross
|
||||
QEMU_JOB_OPTIONAL: 1
|
||||
|
||||
s390x-debian-cross-container:
|
||||
extends: .container_job_template
|
||||
|
||||
@@ -61,7 +61,7 @@ cross-i686-tci:
|
||||
variables:
|
||||
IMAGE: debian-i686-cross
|
||||
ACCEL: tcg-interpreter
|
||||
EXTRA_CONFIGURE_OPTS: --target-list=i386-softmmu,i386-linux-user,arm-softmmu,arm-linux-user,ppc-softmmu,ppc-linux-user --disable-plugins --disable-kvm
|
||||
EXTRA_CONFIGURE_OPTS: --target-list=i386-softmmu,i386-linux-user,aarch64-softmmu,aarch64-linux-user,ppc-softmmu,ppc-linux-user --disable-plugins --disable-kvm
|
||||
# Force tests to run with reduced parallelism, to see whether this
|
||||
# reduces the flakiness of this CI job. The CI
|
||||
# environment by default shows us 8 CPUs and so we
|
||||
@@ -118,8 +118,12 @@ cross-ppc64el-kvm-only:
|
||||
IMAGE: debian-ppc64el-cross
|
||||
EXTRA_CONFIGURE_OPTS: --disable-tcg --without-default-devices
|
||||
|
||||
# The riscv64 cross-builds currently use a 'sid' container to get
|
||||
# compilers and libraries. Until something more stable is found we
|
||||
# allow_failure so as not to block CI.
|
||||
cross-riscv64-system:
|
||||
extends: .cross_system_build_job
|
||||
allow_failure: true
|
||||
needs:
|
||||
job: riscv64-debian-cross-container
|
||||
variables:
|
||||
@@ -127,6 +131,7 @@ cross-riscv64-system:
|
||||
|
||||
cross-riscv64-user:
|
||||
extends: .cross_user_build_job
|
||||
allow_failure: true
|
||||
needs:
|
||||
job: riscv64-debian-cross-container
|
||||
variables:
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
junit: build/meson-logs/testlog.junit.xml
|
||||
|
||||
include:
|
||||
- local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml'
|
||||
- local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml'
|
||||
- local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml'
|
||||
- local: '/.gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml'
|
||||
- local: '/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml'
|
||||
- local: '/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml'
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
# All ubuntu-24.04 jobs should run successfully in an environment
|
||||
# All ubuntu-22.04 jobs should run successfully in an environment
|
||||
# setup by the scripts/ci/setup/ubuntu/build-environment.yml task
|
||||
# "Install basic packages to build QEMU on Ubuntu 24.04"
|
||||
# "Install basic packages to build QEMU on Ubuntu 22.04"
|
||||
|
||||
ubuntu-24.04-aarch32-all:
|
||||
ubuntu-22.04-aarch32-all:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch32
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
+16
-16
@@ -1,13 +1,13 @@
|
||||
# All ubuntu-24.04 jobs should run successfully in an environment
|
||||
# All ubuntu-22.04 jobs should run successfully in an environment
|
||||
# setup by the scripts/ci/setup/ubuntu/build-environment.yml task
|
||||
# "Install basic packages to build QEMU on Ubuntu 24.04"
|
||||
# "Install basic packages to build QEMU on Ubuntu 22.04"
|
||||
|
||||
ubuntu-24.04-aarch64-all-linux-static:
|
||||
ubuntu-22.04-aarch64-all-linux-static:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch64
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -23,12 +23,12 @@ ubuntu-24.04-aarch64-all-linux-static:
|
||||
- make check-tcg
|
||||
- make --output-sync -j`nproc --ignore=40` check
|
||||
|
||||
ubuntu-24.04-aarch64-all:
|
||||
ubuntu-22.04-aarch64-all:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch64
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -45,12 +45,12 @@ ubuntu-24.04-aarch64-all:
|
||||
- make --output-sync -j`nproc --ignore=40`
|
||||
- make --output-sync -j`nproc --ignore=40` check
|
||||
|
||||
ubuntu-24.04-aarch64-without-defaults:
|
||||
ubuntu-22.04-aarch64-without-defaults:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch64
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -67,12 +67,12 @@ ubuntu-24.04-aarch64-without-defaults:
|
||||
- make --output-sync -j`nproc --ignore=40`
|
||||
- make --output-sync -j`nproc --ignore=40` check
|
||||
|
||||
ubuntu-24.04-aarch64-alldbg:
|
||||
ubuntu-22.04-aarch64-alldbg:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch64
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -86,12 +86,12 @@ ubuntu-24.04-aarch64-alldbg:
|
||||
- make --output-sync -j`nproc --ignore=40`
|
||||
- make --output-sync -j`nproc --ignore=40` check
|
||||
|
||||
ubuntu-24.04-aarch64-clang:
|
||||
ubuntu-22.04-aarch64-clang:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch64
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -108,11 +108,11 @@ ubuntu-24.04-aarch64-clang:
|
||||
- make --output-sync -j`nproc --ignore=40`
|
||||
- make --output-sync -j`nproc --ignore=40` check
|
||||
|
||||
ubuntu-24.04-aarch64-tci:
|
||||
ubuntu-22.04-aarch64-tci:
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch64
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -128,12 +128,12 @@ ubuntu-24.04-aarch64-tci:
|
||||
|| { cat config.log meson-logs/meson-log.txt; exit 1; }
|
||||
- make --output-sync -j`nproc --ignore=40`
|
||||
|
||||
ubuntu-24.04-aarch64-notcg:
|
||||
ubuntu-22.04-aarch64-notcg:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- aarch64
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
+14
-14
@@ -1,13 +1,13 @@
|
||||
# All ubuntu-24.04 jobs should run successfully in an environment
|
||||
# All ubuntu-22.04 jobs should run successfully in an environment
|
||||
# setup by the scripts/ci/setup/ubuntu/build-environment.yml task
|
||||
# "Install basic packages to build QEMU on Ubuntu 24.04"
|
||||
# "Install basic packages to build QEMU on Ubuntu 22.04"
|
||||
|
||||
ubuntu-24.04-s390x-all-linux:
|
||||
ubuntu-22.04-s390x-all-linux:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- s390x
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -21,12 +21,12 @@ ubuntu-24.04-s390x-all-linux:
|
||||
- make --output-sync check-tcg
|
||||
- make --output-sync -j`nproc` check
|
||||
|
||||
ubuntu-24.04-s390x-all-system:
|
||||
ubuntu-22.04-s390x-all-system:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- s390x
|
||||
timeout: 75m
|
||||
rules:
|
||||
@@ -40,12 +40,12 @@ ubuntu-24.04-s390x-all-system:
|
||||
- make --output-sync -j`nproc`
|
||||
- make --output-sync -j`nproc` check
|
||||
|
||||
ubuntu-24.04-s390x-alldbg:
|
||||
ubuntu-22.04-s390x-alldbg:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- s390x
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -63,12 +63,12 @@ ubuntu-24.04-s390x-alldbg:
|
||||
- make --output-sync -j`nproc`
|
||||
- make --output-sync -j`nproc` check
|
||||
|
||||
ubuntu-24.04-s390x-clang:
|
||||
ubuntu-22.04-s390x-clang:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- s390x
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -85,11 +85,11 @@ ubuntu-24.04-s390x-clang:
|
||||
- make --output-sync -j`nproc`
|
||||
- make --output-sync -j`nproc` check
|
||||
|
||||
ubuntu-24.04-s390x-tci:
|
||||
ubuntu-22.04-s390x-tci:
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- s390x
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -105,12 +105,12 @@ ubuntu-24.04-s390x-tci:
|
||||
|| { cat config.log meson-logs/meson-log.txt; exit 1; }
|
||||
- make --output-sync -j`nproc`
|
||||
|
||||
ubuntu-24.04-s390x-notcg:
|
||||
ubuntu-22.04-s390x-notcg:
|
||||
extends: .custom_runner_template
|
||||
needs: []
|
||||
stage: build
|
||||
tags:
|
||||
- ubuntu_24.04
|
||||
- ubuntu_22.04
|
||||
- s390x
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
|
||||
@@ -46,49 +46,3 @@ check-python-tox:
|
||||
QEMU_JOB_OPTIONAL: 1
|
||||
needs:
|
||||
job: python-container
|
||||
|
||||
check-rust-tools-nightly:
|
||||
extends: .base_job_template
|
||||
stage: test
|
||||
image: $CI_REGISTRY_IMAGE/qemu/fedora-rust-nightly:$QEMU_CI_CONTAINER_TAG
|
||||
script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- section_start test "Running Rust code checks"
|
||||
- cd build
|
||||
- pyvenv/bin/meson devenv -w ../rust ${CARGO-cargo} fmt --check
|
||||
- make clippy
|
||||
- make rustdoc
|
||||
- section_end test
|
||||
variables:
|
||||
GIT_DEPTH: 1
|
||||
allow_failure: true
|
||||
needs:
|
||||
- job: build-system-fedora-rust-nightly
|
||||
artifacts: true
|
||||
artifacts:
|
||||
when: on_success
|
||||
expire_in: 2 days
|
||||
paths:
|
||||
- rust/target/doc
|
||||
|
||||
check-build-units:
|
||||
extends: .base_job_template
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
|
||||
needs:
|
||||
job: amd64-debian-container
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
- section_start setup "Install Tools"
|
||||
- apt install --assume-yes --no-install-recommends jq
|
||||
- section_end setup
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- section_start configure "Running configure"
|
||||
- ../configure
|
||||
- cd ..
|
||||
- section_end configure
|
||||
- section_start analyse "Analyse"
|
||||
- .gitlab-ci.d/check-units.py build/compile_commands.json
|
||||
- section_end analyse
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
url = https://gitlab.com/qemu-project/qemu-palcode.git
|
||||
[submodule "roms/u-boot"]
|
||||
path = roms/u-boot
|
||||
url = https://gitlab.com/qemu-project-mirrors/u-boot.git
|
||||
url = https://gitlab.com/qemu-project/u-boot.git
|
||||
[submodule "roms/skiboot"]
|
||||
path = roms/skiboot
|
||||
url = https://gitlab.com/qemu-project/skiboot.git
|
||||
@@ -27,7 +27,7 @@
|
||||
url = https://gitlab.com/qemu-project/seabios-hppa.git
|
||||
[submodule "roms/u-boot-sam460ex"]
|
||||
path = roms/u-boot-sam460ex
|
||||
url = https://gitlab.com/qemu-project-mirrors/u-boot-sam460ex.git
|
||||
url = https://gitlab.com/qemu-project/u-boot-sam460ex.git
|
||||
[submodule "roms/edk2"]
|
||||
path = roms/edk2
|
||||
url = https://gitlab.com/qemu-project/edk2.git
|
||||
|
||||
@@ -67,7 +67,6 @@ Andrey Drobyshev <[email protected]> Andrey Drobyshev via <qemu-blo
|
||||
BALATON Zoltan <[email protected]> BALATON Zoltan via <[email protected]>
|
||||
|
||||
# Next, replace old addresses by a more recent one.
|
||||
Akihiko Odaki <[email protected]> <[email protected]>
|
||||
Aleksandar Markovic <[email protected]> <[email protected]>
|
||||
Aleksandar Markovic <[email protected]> <[email protected]>
|
||||
Aleksandar Markovic <[email protected]> <[email protected]>
|
||||
@@ -88,9 +87,8 @@ Huacai Chen <[email protected]> <[email protected]>
|
||||
Huacai Chen <[email protected]> <[email protected]>
|
||||
James Hogan <[email protected]> <[email protected]>
|
||||
Juan Quintela <[email protected]> <[email protected]>
|
||||
Leif Lindholm <leif.lindhol[email protected].com> <quic_llindhol@quicinc.com>
|
||||
Leif Lindholm <leif.lindhol[email protected]> <[email protected]>
|
||||
Leif Lindholm <[email protected]> <[email protected]>
|
||||
Leif Lindholm <quic_llindhol@quicinc.com> <leif.lindhol[email protected]>
|
||||
Leif Lindholm <quic_llindhol@quicinc.com> <[email protected]>
|
||||
Luc Michel <[email protected]> <[email protected]>
|
||||
Luc Michel <[email protected]> <[email protected]>
|
||||
Luc Michel <[email protected]> <[email protected]>
|
||||
|
||||
@@ -61,6 +61,3 @@ config HV_BALLOON_POSSIBLE
|
||||
|
||||
config HAVE_RUST
|
||||
bool
|
||||
|
||||
config MAC_PVG
|
||||
bool
|
||||
+108
-194
@@ -72,14 +72,11 @@ R: Markus Armbruster <[email protected]>
|
||||
R: Philippe Mathieu-Daudé <[email protected]>
|
||||
W: https://www.qemu.org/docs/master/devel/index.html
|
||||
S: Odd Fixes
|
||||
F: docs/devel/build-environment.rst
|
||||
F: docs/devel/code-of-conduct.rst
|
||||
F: docs/devel/codebase.rst
|
||||
F: docs/devel/conflict-resolution.rst
|
||||
F: docs/devel/style.rst
|
||||
F: docs/devel/code-of-conduct.rst
|
||||
F: docs/devel/conflict-resolution.rst
|
||||
F: docs/devel/submitting-a-patch.rst
|
||||
F: docs/devel/submitting-a-pull-request.rst
|
||||
F: docs/glossary.rst
|
||||
|
||||
Responsible Disclosure, Reporting Security Issues
|
||||
-------------------------------------------------
|
||||
@@ -121,7 +118,7 @@ F: pc-bios/s390-ccw.img
|
||||
F: target/s390x/
|
||||
F: docs/system/target-s390x.rst
|
||||
F: docs/system/s390x/
|
||||
F: tests/qtest/migration/s390x/
|
||||
F: tests/migration/s390x/
|
||||
K: ^Subject:.*(?i)s390x?
|
||||
L: [email protected]
|
||||
|
||||
@@ -152,7 +149,10 @@ Overall TCG CPUs
|
||||
M: Richard Henderson <[email protected]>
|
||||
R: Paolo Bonzini <[email protected]>
|
||||
S: Maintained
|
||||
F: system/cpus.c
|
||||
F: system/watchpoint.c
|
||||
F: cpu-common.c
|
||||
F: cpu-target.c
|
||||
F: page-vary-target.c
|
||||
F: page-vary-common.c
|
||||
F: accel/tcg/
|
||||
@@ -162,13 +162,17 @@ F: util/cacheflush.c
|
||||
F: scripts/decodetree.py
|
||||
F: docs/devel/decodetree.rst
|
||||
F: docs/devel/tcg*
|
||||
F: include/exec/cpu*.h
|
||||
F: include/exec/exec-all.h
|
||||
F: include/exec/tb-flush.h
|
||||
F: include/exec/target_long.h
|
||||
F: include/exec/helper*.h
|
||||
F: include/exec/helper*.h.inc
|
||||
F: include/exec/helper-info.c.inc
|
||||
F: include/exec/page-protection.h
|
||||
F: include/system/tcg.h
|
||||
F: include/accel/tcg/cpu-ops.h
|
||||
F: include/sysemu/cpus.h
|
||||
F: include/sysemu/tcg.h
|
||||
F: include/hw/core/tcg-cpu-ops.h
|
||||
F: host/include/*/host/cpuinfo.h
|
||||
F: util/cpuinfo-*.c
|
||||
F: include/tcg/
|
||||
@@ -211,7 +215,7 @@ L: [email protected]
|
||||
S: Maintained
|
||||
F: hw/arm/smmu*
|
||||
F: include/hw/arm/smmu*
|
||||
F: tests/functional/test_aarch64_smmu.py
|
||||
F: tests/avocado/smmu.py
|
||||
|
||||
AVR TCG CPUs
|
||||
M: Michael Rolnik <[email protected]>
|
||||
@@ -222,7 +226,7 @@ F: target/avr/
|
||||
F: tests/functional/test_avr_mega2560.py
|
||||
|
||||
Hexagon TCG CPUs
|
||||
M: Brian Cain <brian.[email protected]>
|
||||
M: Brian Cain <[email protected]>
|
||||
S: Supported
|
||||
F: target/hexagon/
|
||||
X: target/hexagon/idef-parser/
|
||||
@@ -244,7 +248,6 @@ F: target/hexagon/gen_idef_parser_funcs.py
|
||||
|
||||
HPPA (PA-RISC) TCG CPUs
|
||||
M: Richard Henderson <[email protected]>
|
||||
M: Helge Deller <[email protected]>
|
||||
S: Maintained
|
||||
F: target/hppa/
|
||||
F: disas/hppa.c
|
||||
@@ -312,6 +315,7 @@ F: tests/functional/test_ppc_74xx.py
|
||||
RISC-V TCG CPUs
|
||||
M: Palmer Dabbelt <[email protected]>
|
||||
M: Alistair Francis <[email protected]>
|
||||
M: Bin Meng <[email protected]>
|
||||
R: Weiwei Li <[email protected]>
|
||||
R: Daniel Henrique Barboza <[email protected]>
|
||||
R: Liu Zhiwei <[email protected]>
|
||||
@@ -319,12 +323,9 @@ L: [email protected]
|
||||
S: Supported
|
||||
F: configs/targets/riscv*
|
||||
F: docs/system/target-riscv.rst
|
||||
F: docs/specs/riscv-iommu.rst
|
||||
F: target/riscv/
|
||||
F: hw/char/riscv_htif.c
|
||||
F: hw/riscv/
|
||||
F: hw/intc/riscv*
|
||||
F: include/hw/char/riscv_htif.h
|
||||
F: include/hw/riscv/
|
||||
F: linux-user/host/riscv32/
|
||||
F: linux-user/host/riscv64/
|
||||
@@ -433,7 +434,7 @@ F: */*/kvm*
|
||||
F: accel/kvm/
|
||||
F: accel/stubs/kvm-stub.c
|
||||
F: include/hw/kvm/
|
||||
F: include/system/kvm*.h
|
||||
F: include/sysemu/kvm*.h
|
||||
F: scripts/kvm/kvm_flightrecorder
|
||||
|
||||
ARM KVM CPUs
|
||||
@@ -446,7 +447,7 @@ MIPS KVM CPUs
|
||||
M: Huacai Chen <[email protected]>
|
||||
S: Odd Fixes
|
||||
F: target/mips/kvm*
|
||||
F: target/mips/system/
|
||||
F: target/mips/sysemu/
|
||||
|
||||
PPC KVM CPUs
|
||||
M: Nicholas Piggin <[email protected]>
|
||||
@@ -475,16 +476,15 @@ F: docs/system/i386/sgx.rst
|
||||
F: target/i386/kvm/
|
||||
F: target/i386/sev*
|
||||
F: scripts/kvm/vmxcap
|
||||
F: tests/functional/test_x86_64_hotplug_cpu.py
|
||||
|
||||
Xen emulation on X86 KVM CPUs
|
||||
M: David Woodhouse <[email protected]>
|
||||
M: Paul Durrant <[email protected]>
|
||||
S: Supported
|
||||
F: include/system/kvm_xen.h
|
||||
F: include/sysemu/kvm_xen.h
|
||||
F: target/i386/kvm/xen*
|
||||
F: hw/i386/kvm/xen*
|
||||
F: tests/functional/test_x86_64_kvm_xen.py
|
||||
F: tests/avocado/kvm_xen_guest.py
|
||||
|
||||
Guest CPU Cores (other accelerators)
|
||||
------------------------------------
|
||||
@@ -492,19 +492,12 @@ Overall
|
||||
M: Richard Henderson <[email protected]>
|
||||
R: Paolo Bonzini <[email protected]>
|
||||
S: Maintained
|
||||
F: include/exec/cpu*.h
|
||||
F: include/exec/exec-all.h
|
||||
F: include/exec/target_long.h
|
||||
F: include/qemu/accel.h
|
||||
F: include/system/accel-*.h
|
||||
F: include/system/cpus.h
|
||||
F: include/accel/accel-cpu-target.h
|
||||
F: include/sysemu/accel-*.h
|
||||
F: include/hw/core/accel-cpu.h
|
||||
F: accel/accel-*.c
|
||||
F: accel/Makefile.objs
|
||||
F: accel/stubs/Makefile.objs
|
||||
F: cpu-common.c
|
||||
F: cpu-target.c
|
||||
F: system/cpus.c
|
||||
|
||||
Apple Silicon HVF CPUs
|
||||
M: Alexander Graf <[email protected]>
|
||||
@@ -514,7 +507,6 @@ F: target/arm/hvf/
|
||||
X86 HVF CPUs
|
||||
M: Cameron Esfahani <[email protected]>
|
||||
M: Roman Bolshakov <[email protected]>
|
||||
R: Phil Dennis-Jordan <[email protected]>
|
||||
W: https://wiki.qemu.org/Features/HVF
|
||||
S: Maintained
|
||||
F: target/i386/hvf/
|
||||
@@ -522,18 +514,17 @@ F: target/i386/hvf/
|
||||
HVF
|
||||
M: Cameron Esfahani <[email protected]>
|
||||
M: Roman Bolshakov <[email protected]>
|
||||
R: Phil Dennis-Jordan <[email protected]>
|
||||
W: https://wiki.qemu.org/Features/HVF
|
||||
S: Maintained
|
||||
F: accel/hvf/
|
||||
F: include/system/hvf.h
|
||||
F: include/system/hvf_int.h
|
||||
F: include/sysemu/hvf.h
|
||||
F: include/sysemu/hvf_int.h
|
||||
|
||||
WHPX CPUs
|
||||
M: Sunil Muthuswamy <[email protected]>
|
||||
S: Supported
|
||||
F: target/i386/whpx/
|
||||
F: include/system/whpx.h
|
||||
F: include/sysemu/whpx.h
|
||||
|
||||
Guest CPU Cores (Xen)
|
||||
---------------------
|
||||
@@ -559,8 +550,8 @@ F: hw/i386/xen/
|
||||
F: hw/pci-host/xen_igd_pt.c
|
||||
F: include/hw/block/dataplane/xen*
|
||||
F: include/hw/xen/
|
||||
F: include/system/xen.h
|
||||
F: include/system/xen-mapcache.h
|
||||
F: include/sysemu/xen.h
|
||||
F: include/sysemu/xen-mapcache.h
|
||||
F: stubs/xen-hw-stub.c
|
||||
F: docs/system/arm/xenpvh.rst
|
||||
F: docs/system/i386/xenpvh.rst
|
||||
@@ -570,7 +561,7 @@ Guest CPU Cores (NVMM)
|
||||
NetBSD Virtual Machine Monitor (NVMM) CPU support
|
||||
M: Reinoud Zandijk <[email protected]>
|
||||
S: Maintained
|
||||
F: include/system/nvmm.h
|
||||
F: include/sysemu/nvmm.h
|
||||
F: target/i386/nvmm/
|
||||
|
||||
Hosts
|
||||
@@ -588,7 +579,7 @@ POSIX
|
||||
M: Paolo Bonzini <[email protected]>
|
||||
S: Maintained
|
||||
F: os-posix.c
|
||||
F: include/system/os-posix.h
|
||||
F: include/sysemu/os-posix.h
|
||||
F: util/*posix*.c
|
||||
F: include/qemu/*posix*.h
|
||||
|
||||
@@ -627,7 +618,6 @@ S: Maintained
|
||||
F: hw/alpha/
|
||||
F: hw/isa/smc37c669-superio.c
|
||||
F: tests/tcg/alpha/system/
|
||||
F: tests/functional/test_alpha_clipper.py
|
||||
|
||||
ARM Machines
|
||||
------------
|
||||
@@ -643,7 +633,6 @@ F: include/hw/*/allwinner*
|
||||
F: hw/arm/cubieboard.c
|
||||
F: docs/system/arm/cubieboard.rst
|
||||
F: hw/misc/axp209.c
|
||||
F: tests/functional/test_arm_cubieboard.py
|
||||
|
||||
Allwinner-h3
|
||||
M: Niek Linnenbank <[email protected]>
|
||||
@@ -731,7 +720,6 @@ S: Odd Fixes
|
||||
F: hw/*/exynos*
|
||||
F: include/hw/*/exynos*
|
||||
F: docs/system/arm/exynos.rst
|
||||
F: tests/functional/test_arm_smdkc210.py
|
||||
|
||||
Calxeda Highbank
|
||||
M: Rob Herring <[email protected]>
|
||||
@@ -789,7 +777,7 @@ F: docs/system/arm/kzm.rst
|
||||
Integrator CP
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
S: Odd Fixes
|
||||
S: Maintained
|
||||
F: hw/arm/integratorcp.c
|
||||
F: hw/misc/arm_integrator_debug.c
|
||||
F: include/hw/misc/arm_integrator_debug.h
|
||||
@@ -822,21 +810,6 @@ F: hw/pci-host/designware.c
|
||||
F: include/hw/pci-host/designware.h
|
||||
F: docs/system/arm/mcimx7d-sabre.rst
|
||||
|
||||
MCIMX8MP-EVK / i.MX8MP
|
||||
M: Bernhard Beschow <[email protected]>
|
||||
L: [email protected]
|
||||
S: Maintained
|
||||
F: hw/arm/imx8mp-evk.c
|
||||
F: hw/arm/fsl-imx8mp.c
|
||||
F: hw/misc/imx8mp_*.c
|
||||
F: hw/pci-host/fsl_imx8m_phy.c
|
||||
F: hw/rtc/rs5c372.c
|
||||
F: include/hw/arm/fsl-imx8mp.h
|
||||
F: include/hw/misc/imx8mp_*.h
|
||||
F: include/hw/pci-host/fsl_imx8m_phy.h
|
||||
F: docs/system/arm/imx8mp-evk.rst
|
||||
F: tests/qtest/rs5c372-test.c
|
||||
|
||||
MPS2 / MPS3
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
@@ -870,7 +843,7 @@ F: docs/system/arm/mps2.rst
|
||||
Musca
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
S: Odd Fixes
|
||||
S: Maintained
|
||||
F: hw/arm/musca.c
|
||||
F: docs/system/arm/musca.rst
|
||||
|
||||
@@ -895,10 +868,8 @@ F: include/hw/*/npcm*
|
||||
F: tests/qtest/npcm*
|
||||
F: tests/qtest/adm1266-test.c
|
||||
F: pc-bios/npcm7xx_bootrom.bin
|
||||
F: pc-bios/npcm8xx_bootrom.bin
|
||||
F: roms/vbootrom
|
||||
F: docs/system/arm/nuvoton.rst
|
||||
F: tests/functional/test_arm_quanta_gsj.py
|
||||
|
||||
Raspberry Pi
|
||||
M: Peter Maydell <[email protected]>
|
||||
@@ -918,7 +889,7 @@ F: tests/functional/test_aarch64_raspi4.py
|
||||
Real View
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
S: Odd Fixes
|
||||
S: Maintained
|
||||
F: hw/arm/realview*
|
||||
F: hw/cpu/realview_mpcore.c
|
||||
F: hw/intc/realview_gic.c
|
||||
@@ -944,7 +915,8 @@ F: include/hw/ssi/imx_spi.h
|
||||
SBSA-REF
|
||||
M: Radoslaw Biernacki <[email protected]>
|
||||
M: Peter Maydell <[email protected]>
|
||||
R: Leif Lindholm <leif.lindhol[email protected].com>
|
||||
R: Leif Lindholm <quic_llindhol@quicinc.com>
|
||||
R: Marcin Juszkiewicz <[email protected]>
|
||||
L: [email protected]
|
||||
S: Maintained
|
||||
F: hw/arm/sbsa-ref.c
|
||||
@@ -952,7 +924,7 @@ F: hw/misc/sbsa_ec.c
|
||||
F: hw/watchdog/sbsa_gwdt.c
|
||||
F: include/hw/watchdog/sbsa_gwdt.h
|
||||
F: docs/system/arm/sbsa.rst
|
||||
F: tests/functional/test_aarch64_*sbsaref*.py
|
||||
F: tests/functional/test_aarch64_sbsaref*.py
|
||||
|
||||
Sharp SL-5500 (Collie) PDA
|
||||
M: Peter Maydell <[email protected]>
|
||||
@@ -968,7 +940,7 @@ F: tests/functional/test_arm_collie.py
|
||||
Stellaris
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
S: Odd Fixes
|
||||
S: Maintained
|
||||
F: hw/*/stellaris*
|
||||
F: hw/display/ssd03*
|
||||
F: include/hw/input/gamepad.h
|
||||
@@ -998,7 +970,7 @@ F: docs/system/arm/stm32.rst
|
||||
Versatile Express
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
S: Odd Fixes
|
||||
S: Maintained
|
||||
F: hw/arm/vexpress.c
|
||||
F: hw/display/sii9022.c
|
||||
F: docs/system/arm/vexpress.rst
|
||||
@@ -1007,7 +979,7 @@ F: tests/functional/test_arm_vexpress.py
|
||||
Versatile PB
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
S: Odd Fixes
|
||||
S: Maintained
|
||||
F: hw/*/versatile*
|
||||
F: hw/i2c/arm_sbcon_i2c.c
|
||||
F: include/hw/i2c/arm_sbcon_i2c.h
|
||||
@@ -1021,10 +993,9 @@ S: Maintained
|
||||
F: hw/arm/virt*
|
||||
F: include/hw/arm/virt.h
|
||||
F: docs/system/arm/virt.rst
|
||||
F: tests/functional/test_aarch64_*virt*.py
|
||||
F: tests/functional/test_aarch64_virt.py
|
||||
F: tests/functional/test_aarch64_tuxrun.py
|
||||
F: tests/functional/test_arm_tuxrun.py
|
||||
F: tests/functional/test_arm_virt.py
|
||||
|
||||
Xilinx Zynq
|
||||
M: Edgar E. Iglesias <[email protected]>
|
||||
@@ -1054,7 +1025,6 @@ F: hw/display/dpcd.c
|
||||
F: include/hw/display/dpcd.h
|
||||
F: docs/system/arm/xlnx-versal-virt.rst
|
||||
F: docs/system/arm/xlnx-zcu102.rst
|
||||
F: tests/functional/test_aarch64_xlnx_versal.py
|
||||
|
||||
Xilinx Versal OSPI
|
||||
M: Francisco Iglesias <[email protected]>
|
||||
@@ -1145,7 +1115,6 @@ L: [email protected]
|
||||
S: Maintained
|
||||
F: hw/arm/msf2-som.c
|
||||
F: docs/system/arm/emcraft-sf2.rst
|
||||
F: tests/functional/test_arm_emcraft_sf2.py
|
||||
|
||||
ASPEED BMCs
|
||||
M: Cédric Le Goater <[email protected]>
|
||||
@@ -1177,7 +1146,6 @@ F: hw/*/microbit*.c
|
||||
F: include/hw/*/nrf51*.h
|
||||
F: include/hw/*/microbit*.h
|
||||
F: tests/qtest/microbit-test.c
|
||||
F: tests/functional/test_arm_microbit.py
|
||||
F: docs/system/arm/nrf.rst
|
||||
|
||||
ARM PL011 Rust device
|
||||
@@ -1209,10 +1177,9 @@ HP-PARISC Machines
|
||||
------------------
|
||||
HP B160L, HP C3700
|
||||
M: Richard Henderson <[email protected]>
|
||||
M: Helge Deller <[email protected]>
|
||||
S: Maintained
|
||||
R: Helge Deller <[email protected]>
|
||||
S: Odd Fixes
|
||||
F: configs/devices/hppa-softmmu/default.mak
|
||||
F: hw/char/diva-gsp.c
|
||||
F: hw/display/artist.c
|
||||
F: hw/hppa/
|
||||
F: hw/input/lasips2.c
|
||||
@@ -1227,7 +1194,6 @@ F: include/hw/pci-host/astro.h
|
||||
F: include/hw/pci-host/dino.h
|
||||
F: pc-bios/hppa-firmware.img
|
||||
F: roms/seabios-hppa/
|
||||
F: tests/functional/test_hppa_seabios.py
|
||||
|
||||
LoongArch Machines
|
||||
------------------
|
||||
@@ -1265,7 +1231,6 @@ F: hw/m68k/mcf_intc.c
|
||||
F: hw/char/mcf_uart.c
|
||||
F: hw/net/mcf_fec.c
|
||||
F: include/hw/m68k/mcf*.h
|
||||
F: tests/functional/test_m68k_mcf5208evb.py
|
||||
|
||||
NeXTcube
|
||||
M: Thomas Huth <[email protected]>
|
||||
@@ -1314,7 +1279,6 @@ F: include/hw/intc/goldfish_pic.h
|
||||
F: include/hw/intc/m68k_irqc.h
|
||||
F: include/hw/misc/virt_ctrl.h
|
||||
F: docs/specs/virt-ctlr.rst
|
||||
F: tests/functional/test_m68k_tuxrun.py
|
||||
|
||||
MicroBlaze Machines
|
||||
-------------------
|
||||
@@ -1359,6 +1323,7 @@ F: hw/acpi/piix4.c
|
||||
F: hw/mips/malta.c
|
||||
F: hw/pci-host/gt64120.c
|
||||
F: include/hw/southbridge/piix.h
|
||||
F: tests/avocado/linux_ssh_mips_malta.py
|
||||
F: tests/functional/test_mips*_malta.py
|
||||
F: tests/functional/test_mips*_tuxrun.py
|
||||
|
||||
@@ -1410,10 +1375,15 @@ S: Maintained
|
||||
F: docs/system/openrisc/or1k-sim.rst
|
||||
F: hw/intc/ompic.c
|
||||
F: hw/openrisc/openrisc_sim.c
|
||||
F: tests/functional/test_or1k_sim.py
|
||||
|
||||
PowerPC Machines
|
||||
----------------
|
||||
405 (ref405ep)
|
||||
L: [email protected]
|
||||
S: Orphan
|
||||
F: hw/ppc/ppc405*
|
||||
F: tests/functional/test_ppc_405.py
|
||||
|
||||
Bamboo
|
||||
L: [email protected]
|
||||
S: Orphan
|
||||
@@ -1469,7 +1439,6 @@ F: include/hw/pci-host/uninorth.h
|
||||
F: include/hw/input/adb*
|
||||
F: pc-bios/qemu_vga.ndrv
|
||||
F: tests/functional/test_ppc_mac.py
|
||||
F: tests/functional/test_ppc64_mac99.py
|
||||
|
||||
Old World (g3beige)
|
||||
M: Mark Cave-Ayland <[email protected]>
|
||||
@@ -1544,7 +1513,6 @@ F: include/hw/ppc/pnv*
|
||||
F: include/hw/pci-host/pnv*
|
||||
F: include/hw/ssi/pnv_spi*
|
||||
F: pc-bios/skiboot.lid
|
||||
F: pc-bios/pnv-pnor.bin
|
||||
F: tests/qtest/pnv*
|
||||
F: tests/functional/test_ppc64_powernv.py
|
||||
|
||||
@@ -1577,7 +1545,6 @@ F: pc-bios/canyonlands.dt[sb]
|
||||
F: pc-bios/u-boot-sam460ex-20100605.bin
|
||||
F: roms/u-boot-sam460ex
|
||||
F: docs/system/ppc/amigang.rst
|
||||
F: tests/functional/test_ppc_sam460ex.py
|
||||
|
||||
pegasos2
|
||||
M: BALATON Zoltan <[email protected]>
|
||||
@@ -1619,6 +1586,7 @@ F: include/hw/riscv/opentitan.h
|
||||
F: include/hw/*/ibex_*.h
|
||||
|
||||
Microchip PolarFire SoC Icicle Kit
|
||||
M: Bin Meng <[email protected]>
|
||||
L: [email protected]
|
||||
S: Supported
|
||||
F: docs/system/riscv/microchip-icicle-kit.rst
|
||||
@@ -1645,6 +1613,7 @@ F: include/hw/char/shakti_uart.h
|
||||
|
||||
SiFive Machines
|
||||
M: Alistair Francis <[email protected]>
|
||||
M: Bin Meng <[email protected]>
|
||||
M: Palmer Dabbelt <[email protected]>
|
||||
L: [email protected]
|
||||
S: Supported
|
||||
@@ -1652,12 +1621,6 @@ F: docs/system/riscv/sifive_u.rst
|
||||
F: hw/*/*sifive*.c
|
||||
F: include/hw/*/*sifive*.h
|
||||
|
||||
AMD Microblaze-V Generic Board
|
||||
M: Sai Pavan Boddu <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/riscv/microblaze-v-generic.c
|
||||
F: docs/system/riscv/microblaze-v-generic.rst
|
||||
|
||||
RX Machines
|
||||
-----------
|
||||
rx-gdbsim
|
||||
@@ -1680,7 +1643,7 @@ F: hw/pci-host/sh_pci.c
|
||||
F: hw/timer/sh_timer.c
|
||||
F: include/hw/sh4/sh_intc.h
|
||||
F: include/hw/timer/tmu012.h
|
||||
F: tests/functional/test_sh4*_r2d.py
|
||||
F: tests/functional/test_sh4_r2d.py
|
||||
F: tests/functional/test_sh4_tuxrun.py
|
||||
|
||||
SPARC Machines
|
||||
@@ -1832,7 +1795,6 @@ F: include/hw/isa/apm.h
|
||||
F: tests/unit/test-x86-topo.c
|
||||
F: tests/qtest/test-x86-cpuid-compat.c
|
||||
F: tests/functional/test_i386_tuxrun.py
|
||||
F: tests/functional/test_linux_initrd.py
|
||||
F: tests/functional/test_mem_addr_space.py
|
||||
F: tests/functional/test_pc_cpu_hotplug_props.py
|
||||
F: tests/functional/test_x86_64_tuxrun.py
|
||||
@@ -1899,7 +1861,7 @@ R: Yanan Wang <[email protected]>
|
||||
R: Zhao Liu <[email protected]>
|
||||
S: Supported
|
||||
F: hw/core/cpu-common.c
|
||||
F: hw/core/cpu-system.c
|
||||
F: hw/core/cpu-sysemu.c
|
||||
F: hw/core/machine-qmp-cmds.c
|
||||
F: hw/core/machine.c
|
||||
F: hw/core/machine-smp.c
|
||||
@@ -1912,7 +1874,7 @@ F: qapi/machine-target.json
|
||||
F: include/hw/boards.h
|
||||
F: include/hw/core/cpu.h
|
||||
F: include/hw/cpu/cluster.h
|
||||
F: include/system/numa.h
|
||||
F: include/sysemu/numa.h
|
||||
F: tests/functional/test_cpu_queries.py
|
||||
F: tests/functional/test_empty_cpu_model.py
|
||||
F: tests/unit/test-smp-parse.c
|
||||
@@ -1952,7 +1914,6 @@ F: tests/qtest/fuzz-sb16-test.c
|
||||
|
||||
Xilinx CAN
|
||||
M: Francisco Iglesias <[email protected]>
|
||||
M: Vikram Garhwal <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/net/can/xlnx-*
|
||||
F: include/hw/net/xlnx-*
|
||||
@@ -2009,11 +1970,10 @@ F: include/hw/hyperv/vmbus*.h
|
||||
OMAP
|
||||
M: Peter Maydell <[email protected]>
|
||||
L: [email protected]
|
||||
S: Odd Fixes
|
||||
S: Maintained
|
||||
F: hw/*/omap*
|
||||
F: include/hw/arm/omap.h
|
||||
F: docs/system/arm/sx1.rst
|
||||
F: tests/functional/test_arm_sx1.py
|
||||
|
||||
IPack
|
||||
M: Alberto Garcia <[email protected]>
|
||||
@@ -2079,7 +2039,7 @@ S: Supported
|
||||
F: hw/acpi/viot.c
|
||||
F: hw/acpi/viot.h
|
||||
|
||||
ACPI/FUNCTIONAL/BIOSBITS
|
||||
ACPI/AVOCADO/BIOSBITS
|
||||
M: Ani Sinha <[email protected]>
|
||||
M: Michael S. Tsirkin <[email protected]>
|
||||
S: Supported
|
||||
@@ -2190,17 +2150,10 @@ M: Cédric Le Goater <[email protected]>
|
||||
S: Supported
|
||||
F: hw/vfio/*
|
||||
F: include/hw/vfio/
|
||||
F: docs/igd-assign.txt
|
||||
F: docs/devel/migration/vfio.rst
|
||||
F: qapi/vfio.json
|
||||
|
||||
vfio-igd
|
||||
M: Alex Williamson <[email protected]>
|
||||
M: Cédric Le Goater <[email protected]>
|
||||
M: Tomita Moeko <[email protected]>
|
||||
S: Supported
|
||||
F: hw/vfio/igd.c
|
||||
F: docs/igd-assign.txt
|
||||
|
||||
vfio-ccw
|
||||
M: Eric Farman <[email protected]>
|
||||
M: Matthew Rosato <[email protected]>
|
||||
@@ -2230,9 +2183,9 @@ M: Eric Auger <[email protected]>
|
||||
M: Zhenzhong Duan <[email protected]>
|
||||
S: Supported
|
||||
F: backends/iommufd.c
|
||||
F: include/system/iommufd.h
|
||||
F: include/sysemu/iommufd.h
|
||||
F: backends/host_iommu_device.c
|
||||
F: include/system/host_iommu_device.h
|
||||
F: include/sysemu/host_iommu_device.h
|
||||
F: include/qemu/chardev_open.h
|
||||
F: util/chardev_open.c
|
||||
F: docs/devel/vfio-iommufd.rst
|
||||
@@ -2242,16 +2195,12 @@ M: Michael S. Tsirkin <[email protected]>
|
||||
R: Stefano Garzarella <[email protected]>
|
||||
S: Supported
|
||||
F: hw/*/*vhost*
|
||||
F: docs/interop/vhost-user*
|
||||
F: docs/system/devices/vhost-user*
|
||||
F: docs/interop/vhost-user.json
|
||||
F: docs/interop/vhost-user.rst
|
||||
F: contrib/vhost-user-*/
|
||||
F: backends/*vhost*
|
||||
F: include/system/vhost-user-backend.h
|
||||
F: include/hw/virtio/vhost*
|
||||
F: include/*/vhost*
|
||||
F: backends/vhost-user.c
|
||||
F: include/sysemu/vhost-user-backend.h
|
||||
F: subprojects/libvhost-user/
|
||||
F: block/export/vhost-user*
|
||||
F: util/vhost-user-server.c
|
||||
|
||||
vhost-shadow-virtqueue
|
||||
R: Eugenio Pérez <[email protected]>
|
||||
@@ -2278,13 +2227,12 @@ F: docs/interop/virtio-balloon-stats.rst
|
||||
F: hw/virtio/virtio-balloon*.c
|
||||
F: include/hw/virtio/virtio-balloon.h
|
||||
F: system/balloon.c
|
||||
F: include/system/balloon.h
|
||||
F: include/sysemu/balloon.h
|
||||
F: tests/qtest/virtio-balloon-test.c
|
||||
F: tests/functional/test_virtio_balloon.py
|
||||
|
||||
virtio-9p
|
||||
M: Greg Kurz <[email protected]>
|
||||
M: Christian Schoenebeck <[email protected]>
|
||||
R: Greg Kurz <[email protected]>
|
||||
S: Maintained
|
||||
W: https://wiki.qemu.org/Documentation/9p
|
||||
F: hw/9pfs/
|
||||
@@ -2292,6 +2240,7 @@ X: hw/9pfs/xen-9p*
|
||||
F: fsdev/
|
||||
F: tests/qtest/virtio-9p-test.c
|
||||
F: tests/qtest/libqos/virtio-9p*
|
||||
T: git https://gitlab.com/gkurz/qemu.git 9p-next
|
||||
T: git https://github.com/cschoenebeck/qemu.git 9p.next
|
||||
|
||||
virtio-blk
|
||||
@@ -2303,7 +2252,6 @@ F: hw/block/virtio-blk.c
|
||||
F: hw/block/dataplane/*
|
||||
F: include/hw/virtio/virtio-blk-common.h
|
||||
F: tests/qtest/virtio-blk-test.c
|
||||
F: tests/functional/test_x86_64_hotplug_blk.py
|
||||
T: git https://github.com/stefanha/qemu.git block
|
||||
|
||||
virtio-ccw
|
||||
@@ -2361,7 +2309,7 @@ R: Amit Shah <[email protected]>
|
||||
S: Supported
|
||||
F: hw/virtio/virtio-rng.c
|
||||
F: include/hw/virtio/virtio-rng.h
|
||||
F: include/system/rng*.h
|
||||
F: include/sysemu/rng*.h
|
||||
F: backends/rng*.c
|
||||
F: tests/qtest/virtio-rng-test.c
|
||||
|
||||
@@ -2422,9 +2370,6 @@ F: include/hw/virtio/virtio-crypto.h
|
||||
virtio based memory device
|
||||
M: David Hildenbrand <[email protected]>
|
||||
S: Supported
|
||||
F: hw/s390x/virtio-ccw-md.c
|
||||
F: hw/s390x/virtio-ccw-md.h
|
||||
F: hw/s390x/virtio-ccw-md-stubs.c
|
||||
F: hw/virtio/virtio-md-pci.c
|
||||
F: include/hw/virtio/virtio-md-pci.h
|
||||
F: stubs/virtio-md-pci.c
|
||||
@@ -2436,8 +2381,6 @@ W: https://virtio-mem.gitlab.io/
|
||||
F: hw/virtio/virtio-mem.c
|
||||
F: hw/virtio/virtio-mem-pci.h
|
||||
F: hw/virtio/virtio-mem-pci.c
|
||||
F: hw/s390x/virtio-ccw-mem.c
|
||||
F: hw/s390x/virtio-ccw-mem.h
|
||||
F: include/hw/virtio/virtio-mem.h
|
||||
|
||||
virtio-snd
|
||||
@@ -2550,7 +2493,8 @@ F: hw/i2c/i2c_mux_pca954x.c
|
||||
F: include/hw/i2c/i2c_mux_pca954x.h
|
||||
|
||||
pcf8574
|
||||
S: Orphaned
|
||||
M: Dmitrii Sharikhin <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/gpio/pcf8574.c
|
||||
F: include/gpio/pcf8574.h
|
||||
|
||||
@@ -2567,7 +2511,7 @@ M: Alex Bennée <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/core/guest-loader.c
|
||||
F: docs/system/guest-loader.rst
|
||||
F: tests/functional/test_aarch64_xen.py
|
||||
F: tests/avocado/boot_xen.py
|
||||
|
||||
Intel Hexadecimal Object File Loader
|
||||
M: Su Hang <[email protected]>
|
||||
@@ -2633,7 +2577,6 @@ F: hw/display/virtio-gpu*
|
||||
F: hw/display/virtio-vga.*
|
||||
F: include/hw/virtio/virtio-gpu.h
|
||||
F: docs/system/devices/virtio-gpu.rst
|
||||
F: tests/functional/test_aarch64_virt_gpu.py
|
||||
|
||||
vhost-user-blk
|
||||
M: Raphael Norwitz <[email protected]>
|
||||
@@ -2669,11 +2612,6 @@ F: hw/display/edid*
|
||||
F: include/hw/display/edid.h
|
||||
F: qemu-edid.c
|
||||
|
||||
macOS PV Graphics (apple-gfx)
|
||||
M: Phil Dennis-Jordan <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/display/apple-gfx*
|
||||
|
||||
PIIX4 South Bridge (i82371AB)
|
||||
M: Hervé Poussineau <[email protected]>
|
||||
M: Philippe Mathieu-Daudé <[email protected]>
|
||||
@@ -2735,7 +2673,6 @@ F: include/hw/rx/
|
||||
CAN bus subsystem and hardware
|
||||
M: Pavel Pisa <[email protected]>
|
||||
M: Francisco Iglesias <[email protected]>
|
||||
M: Vikram Garhwal <[email protected]>
|
||||
S: Maintained
|
||||
W: https://canbus.pages.fel.cvut.cz/
|
||||
F: net/can/*
|
||||
@@ -2821,27 +2758,6 @@ F: hw/hyperv/hv-balloon*.h
|
||||
F: include/hw/hyperv/dynmem-proto.h
|
||||
F: include/hw/hyperv/hv-balloon.h
|
||||
|
||||
ivshmem-flat
|
||||
M: Gustavo Romero <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/misc/ivshmem-flat.c
|
||||
F: include/hw/misc/ivshmem-flat.h
|
||||
F: docs/system/devices/ivshmem-flat.rst
|
||||
|
||||
UEFI variable service
|
||||
M: Gerd Hoffmann <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/uefi/
|
||||
F: include/hw/uefi/
|
||||
|
||||
VMapple
|
||||
M: Alexander Graf <[email protected]>
|
||||
M: Phil Dennis-Jordan <[email protected]>
|
||||
S: Maintained
|
||||
F: hw/vmapple/*
|
||||
F: include/hw/vmapple/*
|
||||
F: docs/system/arm/vmapple.rst
|
||||
|
||||
Subsystems
|
||||
----------
|
||||
Overall Audio backends
|
||||
@@ -2850,7 +2766,7 @@ M: Marc-André Lureau <[email protected]>
|
||||
S: Odd Fixes
|
||||
F: audio/
|
||||
X: audio/alsaaudio.c
|
||||
X: audio/coreaudio.m
|
||||
X: audio/coreaudio.c
|
||||
X: audio/dsound*
|
||||
X: audio/jackaudio.c
|
||||
X: audio/ossaudio.c
|
||||
@@ -2872,7 +2788,7 @@ M: Philippe Mathieu-Daudé <[email protected]>
|
||||
R: Christian Schoenebeck <[email protected]>
|
||||
R: Akihiko Odaki <[email protected]>
|
||||
S: Odd Fixes
|
||||
F: audio/coreaudio.m
|
||||
F: audio/coreaudio.c
|
||||
|
||||
DSound Audio backend
|
||||
M: Gerd Hoffmann <[email protected]>
|
||||
@@ -2918,7 +2834,7 @@ F: hw/block/
|
||||
F: qapi/block*.json
|
||||
F: qapi/transaction.json
|
||||
F: include/block/
|
||||
F: include/system/block-*.h
|
||||
F: include/sysemu/block-*.h
|
||||
F: qemu-img*
|
||||
F: docs/tools/qemu-img.rst
|
||||
F: qemu-io*
|
||||
@@ -3057,23 +2973,21 @@ M: Alistair Francis <[email protected]>
|
||||
R: David Gibson <[email protected]>
|
||||
S: Maintained
|
||||
F: system/device_tree.c
|
||||
F: include/system/device_tree.h
|
||||
F: include/sysemu/device_tree.h
|
||||
|
||||
Dump
|
||||
S: Supported
|
||||
M: Marc-André Lureau <[email protected]>
|
||||
R: Ani Sinha <[email protected]>
|
||||
F: dump/
|
||||
F: hw/misc/vmcoreinfo.c
|
||||
F: include/hw/misc/vmcoreinfo.h
|
||||
F: include/qemu/win_dump_defs
|
||||
F: include/system/dump-arch.h
|
||||
F: include/system/dump.h
|
||||
F: include/sysemu/dump-arch.h
|
||||
F: include/sysemu/dump.h
|
||||
F: qapi/dump.json
|
||||
F: scripts/dump-guest-memory.py
|
||||
F: stubs/dump.c
|
||||
F: docs/specs/vmcoreinfo.rst
|
||||
F: tests/qtest/vmcoreinfo-test.c
|
||||
|
||||
Error reporting
|
||||
M: Markus Armbruster <[email protected]>
|
||||
@@ -3115,7 +3029,7 @@ F: include/exec/memop.h
|
||||
F: include/exec/memory.h
|
||||
F: include/exec/ram_addr.h
|
||||
F: include/exec/ramblock.h
|
||||
F: include/system/memory_mapping.h
|
||||
F: include/sysemu/memory_mapping.h
|
||||
F: system/dma-helpers.c
|
||||
F: system/ioport.c
|
||||
F: system/memory.c
|
||||
@@ -3156,7 +3070,6 @@ F: include/ui/
|
||||
F: qapi/ui.json
|
||||
F: util/drm.c
|
||||
F: docs/devel/ui.rst
|
||||
F: tests/functional/test_vnc.py
|
||||
|
||||
Cocoa graphics
|
||||
M: Peter Maydell <[email protected]>
|
||||
@@ -3169,8 +3082,8 @@ Main loop
|
||||
M: Paolo Bonzini <[email protected]>
|
||||
S: Maintained
|
||||
F: include/qemu/main-loop.h
|
||||
F: include/system/runstate.h
|
||||
F: include/system/runstate-action.h
|
||||
F: include/sysemu/runstate.h
|
||||
F: include/sysemu/runstate-action.h
|
||||
F: util/main-loop.c
|
||||
F: util/qemu-timer*.c
|
||||
F: system/vl.c
|
||||
@@ -3233,7 +3146,7 @@ M: David Hildenbrand <[email protected]>
|
||||
M: Igor Mammedov <[email protected]>
|
||||
S: Maintained
|
||||
F: backends/hostmem*.c
|
||||
F: include/system/hostmem.h
|
||||
F: include/sysemu/hostmem.h
|
||||
F: docs/system/vm-templating.rst
|
||||
T: git https://gitlab.com/ehabkost/qemu.git machine-next
|
||||
|
||||
@@ -3241,7 +3154,7 @@ Cryptodev Backends
|
||||
M: Gonglei <[email protected]>
|
||||
M: zhenwei pi <[email protected]>
|
||||
S: Maintained
|
||||
F: include/system/cryptodev*.h
|
||||
F: include/sysemu/cryptodev*.h
|
||||
F: backends/cryptodev*.c
|
||||
F: qapi/cryptodev.json
|
||||
|
||||
@@ -3279,6 +3192,8 @@ S: Supported
|
||||
F: qapi/
|
||||
X: qapi/*.json
|
||||
F: include/qapi/
|
||||
X: include/qapi/qmp/
|
||||
F: include/qapi/qmp/dispatch.h
|
||||
F: tests/qapi-schema/
|
||||
F: tests/unit/test-*-visitor.c
|
||||
F: tests/unit/test-qapi-*.c
|
||||
@@ -3302,7 +3217,8 @@ QObject
|
||||
M: Markus Armbruster <[email protected]>
|
||||
S: Supported
|
||||
F: qobject/
|
||||
F: include/qobject/
|
||||
F: include/qapi/qmp/
|
||||
X: include/qapi/qmp/dispatch.h
|
||||
F: scripts/coccinelle/qobject.cocci
|
||||
F: tests/unit/check-qdict.c
|
||||
F: tests/unit/check-qjson.c
|
||||
@@ -3387,7 +3303,7 @@ M: Laurent Vivier <[email protected]>
|
||||
R: Paolo Bonzini <[email protected]>
|
||||
S: Maintained
|
||||
F: system/qtest.c
|
||||
F: include/system/qtest.h
|
||||
F: include/sysemu/qtest.h
|
||||
F: accel/qtest/
|
||||
F: tests/qtest/
|
||||
F: docs/devel/qgraph.rst
|
||||
@@ -3427,7 +3343,6 @@ F: rust/rustfmt.toml
|
||||
|
||||
Rust-related patches CC here
|
||||
L: [email protected]
|
||||
F: tests/docker/test-rust
|
||||
F: rust/
|
||||
|
||||
SLIRP
|
||||
@@ -3439,7 +3354,7 @@ T: git https://people.debian.org/~sthibault/qemu.git slirp
|
||||
|
||||
Stats
|
||||
S: Orphan
|
||||
F: include/system/stats.h
|
||||
F: include/sysemu/stats.h
|
||||
F: stats/
|
||||
F: qapi/stats.json
|
||||
|
||||
@@ -3480,7 +3395,7 @@ S: Maintained
|
||||
F: system/tpm*
|
||||
F: hw/tpm/*
|
||||
F: include/hw/acpi/tpm.h
|
||||
F: include/system/tpm*
|
||||
F: include/sysemu/tpm*
|
||||
F: qapi/tpm.json
|
||||
F: backends/tpm/
|
||||
F: tests/qtest/*tpm*
|
||||
@@ -3491,7 +3406,7 @@ SPDM
|
||||
M: Alistair Francis <[email protected]>
|
||||
S: Maintained
|
||||
F: backends/spdm-socket.c
|
||||
F: include/system/spdm-socket.h
|
||||
F: include/sysemu/spdm-socket.h
|
||||
|
||||
Checkpatch
|
||||
S: Odd Fixes
|
||||
@@ -3507,13 +3422,11 @@ F: include/migration/
|
||||
F: include/qemu/userfaultfd.h
|
||||
F: migration/
|
||||
F: scripts/vmstate-static-checker.py
|
||||
F: tests/functional/test_migration.py
|
||||
F: tests/vmstate-static-checker-data/
|
||||
F: tests/qtest/migration/
|
||||
F: tests/qtest/migration-*
|
||||
F: docs/devel/migration/
|
||||
F: qapi/migration.json
|
||||
F: tests/migration-stress/
|
||||
F: tests/migration/
|
||||
F: util/userfaultfd.c
|
||||
X: migration/rdma*
|
||||
|
||||
@@ -3527,10 +3440,10 @@ Migration dirty limit and dirty page rate
|
||||
M: Hyman Huang <[email protected]>
|
||||
S: Maintained
|
||||
F: system/dirtylimit.c
|
||||
F: include/system/dirtylimit.h
|
||||
F: include/sysemu/dirtylimit.h
|
||||
F: migration/dirtyrate.c
|
||||
F: migration/dirtyrate.h
|
||||
F: include/system/dirtyrate.h
|
||||
F: include/sysemu/dirtyrate.h
|
||||
F: docs/devel/migration/dirty-limit.rst
|
||||
|
||||
Detached LUKS header
|
||||
@@ -3558,7 +3471,7 @@ Seccomp
|
||||
M: Daniel P. Berrange <[email protected]>
|
||||
S: Odd Fixes
|
||||
F: system/qemu-seccomp.c
|
||||
F: include/system/seccomp.h
|
||||
F: include/sysemu/seccomp.h
|
||||
F: tests/unit/test-seccomp.c
|
||||
|
||||
Cryptography
|
||||
@@ -3663,20 +3576,21 @@ F: net/filter-mirror.c
|
||||
F: tests/qtest/test-filter*
|
||||
|
||||
Record/replay
|
||||
M: Pavel Dovgalyuk <[email protected]>
|
||||
R: Paolo Bonzini <[email protected]>
|
||||
R: Alex Bennée <[email protected]>
|
||||
W: https://wiki.qemu.org/Features/record-replay
|
||||
S: Odd Fixes
|
||||
S: Supported
|
||||
F: replay/*
|
||||
F: block/blkreplay.c
|
||||
F: net/filter-replay.c
|
||||
F: include/exec/replay-core.h
|
||||
F: include/system/replay.h
|
||||
F: include/sysemu/replay.h
|
||||
F: docs/devel/replay.rst
|
||||
F: docs/system/replay.rst
|
||||
F: stubs/replay.c
|
||||
F: tests/functional/*reverse_debug*.py
|
||||
F: tests/functional/*replay*.py
|
||||
F: tests/avocado/replay_kernel.py
|
||||
F: tests/avocado/replay_linux.py
|
||||
F: tests/avocado/reverse_debugging.py
|
||||
F: qapi/replay.json
|
||||
|
||||
IOVA Tree
|
||||
@@ -3760,16 +3674,13 @@ S: Supported
|
||||
F: hw/i386/intel_iommu.c
|
||||
F: hw/i386/intel_iommu_internal.h
|
||||
F: include/hw/i386/intel_iommu.h
|
||||
F: tests/functional/test_intel_iommu.py
|
||||
F: tests/qtest/intel-iommu-test.c
|
||||
|
||||
AMD-Vi Emulation
|
||||
S: Orphan
|
||||
F: hw/i386/amd_iommu.?
|
||||
F: tests/qtest/amd-iommu-test.c
|
||||
|
||||
OpenSBI Firmware
|
||||
L: [email protected]
|
||||
M: Bin Meng <[email protected]>
|
||||
S: Supported
|
||||
F: pc-bios/opensbi-*
|
||||
F: .gitlab-ci.d/opensbi.yml
|
||||
@@ -3791,7 +3702,7 @@ M: Peter Maydell <[email protected]>
|
||||
S: Maintained
|
||||
F: include/hw/resettable.h
|
||||
F: include/hw/core/resetcontainer.h
|
||||
F: include/system/reset.h
|
||||
F: include/sysemu/reset.h
|
||||
F: hw/core/reset.c
|
||||
F: hw/core/resettable.c
|
||||
F: hw/core/resetcontainer.c
|
||||
@@ -3802,7 +3713,6 @@ Overall usermode emulation
|
||||
M: Riku Voipio <[email protected]>
|
||||
S: Maintained
|
||||
F: accel/tcg/user-exec*.c
|
||||
F: hw/core/cpu-user.c
|
||||
F: include/user/
|
||||
F: common-user/
|
||||
|
||||
@@ -3823,7 +3733,6 @@ F: configs/targets/*linux-user.mak
|
||||
F: scripts/qemu-binfmt-conf.sh
|
||||
F: scripts/update-syscalltbl.sh
|
||||
F: scripts/update-mips-syscall-args.sh
|
||||
F: tests/functional/test_arm_bflt.py
|
||||
|
||||
Tiny Code Generator (TCG)
|
||||
-------------------------
|
||||
@@ -4196,7 +4105,6 @@ F: hw/remote/vfio-user-obj.c
|
||||
F: include/hw/remote/vfio-user-obj.h
|
||||
F: hw/remote/iommu.c
|
||||
F: include/hw/remote/iommu.h
|
||||
F: tests/functional/test_multiprocess.py
|
||||
|
||||
EBPF:
|
||||
M: Jason Wang <[email protected]>
|
||||
@@ -4214,6 +4122,7 @@ M: Alex Bennée <[email protected]>
|
||||
T: git https://gitlab.com/stsquad/qemu testing/next
|
||||
M: Philippe Mathieu-Daudé <[email protected]>
|
||||
M: Thomas Huth <[email protected]>
|
||||
R: Wainer dos Santos Moschetta <[email protected]>
|
||||
S: Maintained
|
||||
F: .github/workflows/lockdown.yml
|
||||
F: .gitlab-ci.yml
|
||||
@@ -4241,8 +4150,6 @@ W: https://cirrus-ci.com/github/qemu/qemu
|
||||
Functional testing framework
|
||||
M: Thomas Huth <[email protected]>
|
||||
R: Philippe Mathieu-Daudé <[email protected]>
|
||||
R: Daniel P. Berrange <[email protected]>
|
||||
F: docs/devel/testing/functional.rst
|
||||
F: tests/functional/qemu_test/
|
||||
|
||||
Windows Hosted Continuous Integration
|
||||
@@ -4256,6 +4163,14 @@ R: Philippe Mathieu-Daudé <[email protected]>
|
||||
S: Maintained
|
||||
F: tests/tcg/Makefile.target
|
||||
|
||||
Integration Testing with the Avocado framework
|
||||
W: https://trello.com/b/6Qi1pxVn/avocado-qemu
|
||||
R: Cleber Rosa <[email protected]>
|
||||
R: Philippe Mathieu-Daudé <[email protected]>
|
||||
R: Wainer dos Santos Moschetta <[email protected]>
|
||||
S: Odd Fixes
|
||||
F: tests/avocado/
|
||||
|
||||
GitLab custom runner (Works On Arm Sponsored)
|
||||
M: Alex Bennée <[email protected]>
|
||||
M: Philippe Mathieu-Daudé <[email protected]>
|
||||
@@ -4324,7 +4239,6 @@ S: Orphan
|
||||
F: po/*.po
|
||||
|
||||
Sphinx documentation configuration and build machinery
|
||||
M: John Snow <[email protected]>
|
||||
M: Peter Maydell <[email protected]>
|
||||
S: Maintained
|
||||
F: docs/conf.py
|
||||
|
||||
@@ -16,5 +16,4 @@ config KVM
|
||||
config XEN
|
||||
bool
|
||||
select FSDEV_9P if VIRTFS
|
||||
select PCI_EXPRESS_GENERIC_BRIDGE
|
||||
select XEN_BUS
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "qemu/thread.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "system/accel-blocker.h"
|
||||
#include "sysemu/accel-blocker.h"
|
||||
|
||||
static QemuLockCnt accel_in_ioctl_lock;
|
||||
static QemuEvent accel_in_ioctl_event;
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/accel.h"
|
||||
#include "hw/boards.h"
|
||||
#include "system/accel-ops.h"
|
||||
#include "system/cpus.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "accel-system.h"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "qemu/accel.h"
|
||||
|
||||
#include "cpu.h"
|
||||
#include "accel/accel-cpu-target.h"
|
||||
#include "hw/core/accel-cpu.h"
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#include "accel-system.h"
|
||||
@@ -38,7 +38,6 @@ static const TypeInfo accel_type = {
|
||||
.parent = TYPE_OBJECT,
|
||||
.class_size = sizeof(AccelClass),
|
||||
.instance_size = sizeof(AccelState),
|
||||
.abstract = true,
|
||||
};
|
||||
|
||||
/* Lookup AccelClass from opt_name. Returns NULL if not found */
|
||||
@@ -113,20 +112,22 @@ void accel_init_interfaces(AccelClass *ac)
|
||||
|
||||
void accel_cpu_instance_init(CPUState *cpu)
|
||||
{
|
||||
if (cpu->cc->accel_cpu && cpu->cc->accel_cpu->cpu_instance_init) {
|
||||
cpu->cc->accel_cpu->cpu_instance_init(cpu);
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
||||
|
||||
if (cc->accel_cpu && cc->accel_cpu->cpu_instance_init) {
|
||||
cc->accel_cpu->cpu_instance_init(cpu);
|
||||
}
|
||||
}
|
||||
|
||||
bool accel_cpu_common_realize(CPUState *cpu, Error **errp)
|
||||
{
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
||||
AccelState *accel = current_accel();
|
||||
AccelClass *acc = ACCEL_GET_CLASS(accel);
|
||||
|
||||
/* target specific realization */
|
||||
if (cpu->cc->accel_cpu
|
||||
&& cpu->cc->accel_cpu->cpu_target_realize
|
||||
&& !cpu->cc->accel_cpu->cpu_target_realize(cpu, errp)) {
|
||||
if (cc->accel_cpu && cc->accel_cpu->cpu_target_realize
|
||||
&& !cc->accel_cpu->cpu_target_realize(cpu, errp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "system/cpus.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "hw/core/cpu.h"
|
||||
|
||||
+21
-191
@@ -48,84 +48,22 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#ifdef HOST_X86_64
|
||||
#include <mach/mach.h>
|
||||
#include <mach/mach_vm.h>
|
||||
#endif
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "gdbstub/enums.h"
|
||||
#include "hw/boards.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "system/accel-ops.h"
|
||||
#include "system/cpus.h"
|
||||
#include "system/hvf.h"
|
||||
#include "system/hvf_int.h"
|
||||
#include "system/runstate.h"
|
||||
#include "system/system.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/hvf.h"
|
||||
#include "sysemu/hvf_int.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "hw/boards.h"
|
||||
|
||||
HVFState *hvf_state;
|
||||
bool hvf_tso_mode = 0;
|
||||
uint32_t hvf_ipa_granule_size = 0;
|
||||
|
||||
/* Memory slots */
|
||||
|
||||
/* Default num of memslots to be allocated when VM starts */
|
||||
#define HVF_MEMSLOTS_NUM_ALLOC_DEFAULT 32
|
||||
|
||||
static bool hvf_slots_grow(HVFState *state, unsigned int num_slots_new)
|
||||
{
|
||||
unsigned int i, cur = state->num_slots;
|
||||
hvf_slot *slots;
|
||||
hvf_mac_slot *mac_slots;
|
||||
|
||||
assert(num_slots_new > cur);
|
||||
if (cur == 0) {
|
||||
slots = g_new0(hvf_slot, num_slots_new);
|
||||
if (!slots) {
|
||||
return false;
|
||||
}
|
||||
mac_slots = g_new0(hvf_mac_slot, num_slots_new);
|
||||
if (!mac_slots) {
|
||||
g_free(slots);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
slots = g_renew(hvf_slot, state->slots, num_slots_new);
|
||||
if (!slots) {
|
||||
return false;
|
||||
}
|
||||
mac_slots = g_renew(hvf_mac_slot, state->mac_slots, num_slots_new);
|
||||
if (!mac_slots) {
|
||||
/* save allocated slots but not new size */
|
||||
state->slots = slots;
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* g_renew() doesn't initialize extended buffers, however hvf
|
||||
* memslots require fields to be zero-initialized. E.g. pointers,
|
||||
* memory_size field, etc.
|
||||
*/
|
||||
memset(&slots[cur], 0x0, sizeof(slots[0]) * (num_slots_new - cur));
|
||||
memset(&mac_slots[cur], 0x0, sizeof(mac_slots[0]) * (num_slots_new - cur));
|
||||
}
|
||||
|
||||
for (i = cur; i < num_slots_new; i++) {
|
||||
slots[i].slot_id = i;
|
||||
}
|
||||
|
||||
state->slots = slots;
|
||||
state->mac_slots = mac_slots;
|
||||
state->num_slots = num_slots_new;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
hvf_slot *hvf_find_overlap_slot(uint64_t start, uint64_t size)
|
||||
{
|
||||
hvf_slot *slot;
|
||||
@@ -140,46 +78,21 @@ hvf_slot *hvf_find_overlap_slot(uint64_t start, uint64_t size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef HOST_X86_64
|
||||
/*
|
||||
* Intel Hypervisor.framework refuses hv_vm_map() with HV_MEMORY_EXEC when the
|
||||
* host mapping's maximum protection lacks execute. virtio-gpu blobs shared
|
||||
* from the render server are mapped read/write only, so check the host
|
||||
* entries backing [mem, mem + size) and leave EXEC out for such memory.
|
||||
*/
|
||||
static bool hvf_host_mem_executable(void *mem, uint64_t size)
|
||||
{
|
||||
mach_vm_address_t addr = (mach_vm_address_t)mem;
|
||||
mach_vm_address_t end = addr + size;
|
||||
struct mac_slot {
|
||||
int present;
|
||||
uint64_t size;
|
||||
uint64_t gpa_start;
|
||||
uint64_t gva;
|
||||
};
|
||||
|
||||
while (addr < end) {
|
||||
mach_vm_address_t start = addr;
|
||||
mach_vm_size_t len = 0;
|
||||
natural_t depth = 1;
|
||||
vm_region_submap_info_data_64_t info;
|
||||
mach_msg_type_number_t count = VM_REGION_SUBMAP_INFO_COUNT_64;
|
||||
|
||||
if (mach_vm_region_recurse(mach_task_self(), &start, &len, &depth,
|
||||
(vm_region_recurse_info_t)&info,
|
||||
&count) != KERN_SUCCESS ||
|
||||
start > addr) {
|
||||
return true;
|
||||
}
|
||||
if (!(info.max_protection & VM_PROT_EXECUTE)) {
|
||||
return false;
|
||||
}
|
||||
addr = start + len;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
struct mac_slot mac_slots[32];
|
||||
|
||||
static int do_hvf_set_memory(hvf_slot *slot, hv_memory_flags_t flags)
|
||||
{
|
||||
hvf_mac_slot *macslot;
|
||||
struct mac_slot *macslot;
|
||||
hv_return_t ret;
|
||||
|
||||
macslot = &hvf_state->mac_slots[slot->slot_id];
|
||||
macslot = &mac_slots[slot->slot_id];
|
||||
|
||||
if (macslot->present) {
|
||||
if (macslot->size != slot->size) {
|
||||
@@ -196,21 +109,6 @@ static int do_hvf_set_memory(hvf_slot *slot, hv_memory_flags_t flags)
|
||||
macslot->present = 1;
|
||||
macslot->gpa_start = slot->start;
|
||||
macslot->size = slot->size;
|
||||
#ifdef HOST_X86_64
|
||||
if (!hvf_host_mem_executable(slot->mem, slot->size)) {
|
||||
flags &= ~HV_MEMORY_EXEC;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* mlockall() returns ENOSYS on macOS, and left alone the host compresses
|
||||
* guest RAM until every touch faults, so honour -overcommit mem-lock=on
|
||||
* for each RAM mapping.
|
||||
*/
|
||||
if (should_mlock(mlock_state) && memory_region_is_ram(slot->region) &&
|
||||
mlock(slot->mem, slot->size) < 0) {
|
||||
error_report_once("hvf: mlock of guest RAM failed: %s",
|
||||
strerror(errno));
|
||||
}
|
||||
ret = hv_vm_map(slot->mem, slot->start, slot->size, flags);
|
||||
assert_hvf_ok(ret);
|
||||
return 0;
|
||||
@@ -236,20 +134,8 @@ static void hvf_set_phys_mem(MemoryRegionSection *section, bool add)
|
||||
}
|
||||
}
|
||||
|
||||
if (hvf_ipa_granule_size) {
|
||||
page_size = hvf_ipa_granule_size;
|
||||
}
|
||||
|
||||
if (!QEMU_IS_ALIGNED(int128_get64(section->size), page_size) ||
|
||||
!QEMU_IS_ALIGNED(section->offset_within_address_space, page_size)) {
|
||||
if (add) {
|
||||
warn_report("Cannot add 0x%016llX:0x%016llX because it is not "
|
||||
"aligned to page size (0x%X)",
|
||||
section->offset_within_address_space,
|
||||
section->offset_within_address_space +
|
||||
int128_get64(section->size),
|
||||
(uint32_t)page_size);
|
||||
}
|
||||
/* Not page aligned, so we can not map as RAM */
|
||||
add = false;
|
||||
}
|
||||
@@ -298,11 +184,8 @@ static void hvf_set_phys_mem(MemoryRegionSection *section, bool add)
|
||||
}
|
||||
|
||||
if (x == hvf_state->num_slots) {
|
||||
if (!hvf_slots_grow(hvf_state, hvf_state->num_slots * 2)) {
|
||||
error_report("Cannot allocate any more slots");
|
||||
abort();
|
||||
}
|
||||
mem = &hvf_state->slots[x];
|
||||
error_report("No free slots");
|
||||
abort();
|
||||
}
|
||||
|
||||
mem->size = int128_get64(section->size);
|
||||
@@ -439,7 +322,6 @@ static int hvf_accel_init(MachineState *ms)
|
||||
HVFState *s;
|
||||
int pa_range = 36;
|
||||
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
||||
bool success;
|
||||
|
||||
if (mc->hvf_get_physical_address_range) {
|
||||
pa_range = mc->hvf_get_physical_address_range(ms);
|
||||
@@ -448,13 +330,16 @@ static int hvf_accel_init(MachineState *ms)
|
||||
}
|
||||
}
|
||||
|
||||
ret = hvf_arch_vm_create(ms, (uint32_t)pa_range, hvf_ipa_granule_size);
|
||||
ret = hvf_arch_vm_create(ms, (uint32_t)pa_range);
|
||||
assert_hvf_ok(ret);
|
||||
|
||||
s = g_new0(HVFState, 1);
|
||||
|
||||
success = hvf_slots_grow(s, HVF_MEMSLOTS_NUM_ALLOC_DEFAULT);
|
||||
assert(success);
|
||||
s->num_slots = ARRAY_SIZE(s->slots);
|
||||
for (x = 0; x < s->num_slots; ++x) {
|
||||
s->slots[x].size = 0;
|
||||
s->slots[x].slot_id = x;
|
||||
}
|
||||
|
||||
QTAILQ_INIT(&s->hvf_sw_breakpoints);
|
||||
|
||||
@@ -464,53 +349,11 @@ static int hvf_accel_init(MachineState *ms)
|
||||
return hvf_arch_init();
|
||||
}
|
||||
|
||||
#if defined(__aarch64__)
|
||||
|
||||
static bool hvf_get_tso(Object *obj, Error **errp)
|
||||
{
|
||||
return hvf_tso_mode;
|
||||
}
|
||||
|
||||
static void hvf_set_tso(Object *obj, bool value, Error **errp)
|
||||
{
|
||||
hvf_tso_mode = value;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static inline int hvf_gdbstub_sstep_flags(void)
|
||||
{
|
||||
return SSTEP_ENABLE | SSTEP_NOIRQ;
|
||||
}
|
||||
|
||||
static void hvf_get_ipa_granule_size(Object *obj, Visitor *v,
|
||||
const char *name, void *opaque,
|
||||
Error **errp)
|
||||
{
|
||||
HVFState *s = HVF_STATE(obj);
|
||||
uint32_t value = hvf_ipa_granule_size;
|
||||
|
||||
visit_type_uint32(v, name, &value, errp);
|
||||
}
|
||||
|
||||
static void hvf_set_ipa_granule_size(Object *obj, Visitor *v,
|
||||
const char *name, void *opaque,
|
||||
Error **errp)
|
||||
{
|
||||
HVFState *s = HVF_STATE(obj);
|
||||
uint32_t value;
|
||||
|
||||
if (!visit_type_uint32(v, name, &value, errp)) {
|
||||
return;
|
||||
}
|
||||
if (value & (value - 1)) {
|
||||
error_setg(errp, "ipa-granule-size must be a power of two.");
|
||||
return;
|
||||
}
|
||||
|
||||
hvf_ipa_granule_size = value;
|
||||
}
|
||||
|
||||
static void hvf_accel_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
AccelClass *ac = ACCEL_CLASS(oc);
|
||||
@@ -518,19 +361,6 @@ static void hvf_accel_class_init(ObjectClass *oc, void *data)
|
||||
ac->init_machine = hvf_accel_init;
|
||||
ac->allowed = &hvf_allowed;
|
||||
ac->gdbstub_supported_sstep_flags = hvf_gdbstub_sstep_flags;
|
||||
|
||||
#if defined(__aarch64__)
|
||||
object_class_property_add_bool(oc, "tso",
|
||||
hvf_get_tso, hvf_set_tso);
|
||||
object_class_property_set_description(oc, "tso",
|
||||
"Set on/off to enable/disable total store ordering mode");
|
||||
#endif
|
||||
|
||||
object_class_property_add(oc, "ipa-granule-size", "uint32",
|
||||
hvf_get_ipa_granule_size, hvf_set_ipa_granule_size,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "ipa-granule-size",
|
||||
"Size of a single guest page");
|
||||
}
|
||||
|
||||
static const TypeInfo hvf_accel_type = {
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "system/hvf.h"
|
||||
#include "system/hvf_int.h"
|
||||
#include "sysemu/hvf.h"
|
||||
#include "sysemu/hvf_int.h"
|
||||
|
||||
const char *hvf_return_string(hv_return_t ret)
|
||||
{
|
||||
|
||||
@@ -16,11 +16,10 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "system/accel-ops.h"
|
||||
#include "system/kvm.h"
|
||||
#include "system/kvm_int.h"
|
||||
#include "system/runstate.h"
|
||||
#include "system/cpus.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "sysemu/kvm_int.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
|
||||
+20
-22
@@ -28,10 +28,10 @@
|
||||
#include "hw/pci/msix.h"
|
||||
#include "hw/s390x/adapter.h"
|
||||
#include "gdbstub/enums.h"
|
||||
#include "system/kvm_int.h"
|
||||
#include "system/runstate.h"
|
||||
#include "system/cpus.h"
|
||||
#include "system/accel-blocker.h"
|
||||
#include "sysemu/kvm_int.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/accel-blocker.h"
|
||||
#include "qemu/bswap.h"
|
||||
#include "exec/memory.h"
|
||||
#include "exec/ram_addr.h"
|
||||
@@ -42,15 +42,15 @@
|
||||
#include "qapi/visitor.h"
|
||||
#include "qapi/qapi-types-common.h"
|
||||
#include "qapi/qapi-visit-common.h"
|
||||
#include "system/reset.h"
|
||||
#include "sysemu/reset.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "system/hw_accel.h"
|
||||
#include "sysemu/hw_accel.h"
|
||||
#include "kvm-cpus.h"
|
||||
#include "system/dirtylimit.h"
|
||||
#include "sysemu/dirtylimit.h"
|
||||
#include "qemu/range.h"
|
||||
|
||||
#include "hw/boards.h"
|
||||
#include "system/stats.h"
|
||||
#include "sysemu/stats.h"
|
||||
|
||||
/* This check must be after config-host.h is included */
|
||||
#ifdef CONFIG_EVENTFD
|
||||
@@ -437,8 +437,9 @@ int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id)
|
||||
return kvm_fd;
|
||||
}
|
||||
|
||||
static void kvm_reset_parked_vcpus(KVMState *s)
|
||||
static void kvm_reset_parked_vcpus(void *param)
|
||||
{
|
||||
KVMState *s = param;
|
||||
struct KVMParkedVcpu *cpu;
|
||||
|
||||
QLIST_FOREACH(cpu, &s->kvm_parked_vcpus, node) {
|
||||
@@ -1287,7 +1288,7 @@ static void kvm_unpoison_all(void *param)
|
||||
|
||||
QLIST_FOREACH_SAFE(page, &hwpoison_page_list, list, next_page) {
|
||||
QLIST_REMOVE(page, list);
|
||||
qemu_ram_remap(page->ram_addr);
|
||||
qemu_ram_remap(page->ram_addr, TARGET_PAGE_SIZE);
|
||||
g_free(page);
|
||||
}
|
||||
}
|
||||
@@ -2556,7 +2557,8 @@ static int kvm_init(MachineState *ms)
|
||||
{
|
||||
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
||||
static const char upgrade_note[] =
|
||||
"Please upgrade to at least kernel 4.5.\n";
|
||||
"Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n"
|
||||
"(see http://sourceforge.net/projects/kvm).\n";
|
||||
const struct {
|
||||
const char *name;
|
||||
int num;
|
||||
@@ -2736,6 +2738,7 @@ static int kvm_init(MachineState *ms)
|
||||
}
|
||||
|
||||
qemu_register_reset(kvm_unpoison_all, NULL);
|
||||
qemu_register_reset(kvm_reset_parked_vcpus, s);
|
||||
|
||||
if (s->kernel_irqchip_allowed) {
|
||||
kvm_irqchip_create(s);
|
||||
@@ -2905,10 +2908,6 @@ static void do_kvm_cpu_synchronize_post_reset(CPUState *cpu, run_on_cpu_data arg
|
||||
void kvm_cpu_synchronize_post_reset(CPUState *cpu)
|
||||
{
|
||||
run_on_cpu(cpu, do_kvm_cpu_synchronize_post_reset, RUN_ON_CPU_NULL);
|
||||
|
||||
if (cpu == first_cpu) {
|
||||
kvm_reset_parked_vcpus(kvm_state);
|
||||
}
|
||||
}
|
||||
|
||||
static void do_kvm_cpu_synchronize_post_init(CPUState *cpu, run_on_cpu_data arg)
|
||||
@@ -3011,17 +3010,17 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private)
|
||||
MemoryRegion *mr;
|
||||
RAMBlock *rb;
|
||||
void *addr;
|
||||
int ret = -EINVAL;
|
||||
int ret = -1;
|
||||
|
||||
trace_kvm_convert_memory(start, size, to_private ? "shared_to_private" : "private_to_shared");
|
||||
|
||||
if (!QEMU_PTR_IS_ALIGNED(start, qemu_real_host_page_size()) ||
|
||||
!QEMU_PTR_IS_ALIGNED(size, qemu_real_host_page_size())) {
|
||||
return ret;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!size) {
|
||||
return ret;
|
||||
return -1;
|
||||
}
|
||||
|
||||
section = memory_region_find(get_system_memory(), start, size);
|
||||
@@ -3039,7 +3038,7 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private)
|
||||
if (!to_private) {
|
||||
return 0;
|
||||
}
|
||||
return ret;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!memory_region_has_guest_memfd(mr)) {
|
||||
@@ -3322,10 +3321,10 @@ int kvm_vm_ioctl(KVMState *s, unsigned long type, ...)
|
||||
trace_kvm_vm_ioctl(type, arg);
|
||||
accel_ioctl_begin();
|
||||
ret = ioctl(s->vmfd, type, arg);
|
||||
accel_ioctl_end();
|
||||
if (ret == -1) {
|
||||
ret = -errno;
|
||||
}
|
||||
accel_ioctl_end();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3362,10 +3361,10 @@ int kvm_device_ioctl(int fd, unsigned long type, ...)
|
||||
trace_kvm_device_ioctl(fd, type, arg);
|
||||
accel_ioctl_begin();
|
||||
ret = ioctl(fd, type, arg);
|
||||
accel_ioctl_end();
|
||||
if (ret == -1) {
|
||||
ret = -errno;
|
||||
}
|
||||
accel_ioctl_end();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3945,7 +3944,6 @@ static void kvm_accel_instance_init(Object *obj)
|
||||
s->xen_evtchn_max_pirq = 256;
|
||||
s->device = NULL;
|
||||
s->msr_energy.enable = false;
|
||||
s->honor_guest_pat = ON_OFF_AUTO_OFF;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#ifndef KVM_CPUS_H
|
||||
#define KVM_CPUS_H
|
||||
|
||||
#include "sysemu/cpus.h"
|
||||
|
||||
int kvm_init_vcpu(CPUState *cpu, Error **errp);
|
||||
int kvm_cpu_exec(CPUState *cpu);
|
||||
void kvm_destroy_vcpu(CPUState *cpu);
|
||||
|
||||
+2
-3
@@ -18,9 +18,8 @@
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/config-file.h"
|
||||
#include "qemu/accel.h"
|
||||
#include "system/accel-ops.h"
|
||||
#include "system/qtest.h"
|
||||
#include "system/cpus.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "hw/core/cpu.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/kvm.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "hw/pci/msi.h"
|
||||
|
||||
KVMState *kvm_state;
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
#include "exec/tb-flush.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
||||
void tb_flush(CPUState *cpu)
|
||||
{
|
||||
}
|
||||
|
||||
G_NORETURN void cpu_loop_exit(CPUState *cpu)
|
||||
{
|
||||
g_assert_not_reached();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/xen.h"
|
||||
#include "sysemu/xen.h"
|
||||
#include "qapi/qapi-commands-migration.h"
|
||||
|
||||
bool xen_allowed;
|
||||
|
||||
@@ -18,45 +18,13 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "exec/log.h"
|
||||
#include "system/tcg.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "qemu/plugin.h"
|
||||
#include "internal-common.h"
|
||||
|
||||
bool tcg_allowed;
|
||||
|
||||
bool tcg_cflags_has(CPUState *cpu, uint32_t flags)
|
||||
{
|
||||
return cpu->tcg_cflags & flags;
|
||||
}
|
||||
|
||||
void tcg_cflags_set(CPUState *cpu, uint32_t flags)
|
||||
{
|
||||
cpu->tcg_cflags |= flags;
|
||||
}
|
||||
|
||||
uint32_t curr_cflags(CPUState *cpu)
|
||||
{
|
||||
uint32_t cflags = cpu->tcg_cflags;
|
||||
|
||||
/*
|
||||
* Record gdb single-step. We should be exiting the TB by raising
|
||||
* EXCP_DEBUG, but to simplify other tests, disable chaining too.
|
||||
*
|
||||
* For singlestep and -d nochain, suppress goto_tb so that
|
||||
* we can log -d cpu,exec after every TB.
|
||||
*/
|
||||
if (unlikely(cpu->singlestep_enabled)) {
|
||||
cflags |= CF_NO_GOTO_TB | CF_NO_GOTO_PTR | CF_SINGLE_STEP | 1;
|
||||
} else if (qatomic_read(&one_insn_per_tb)) {
|
||||
cflags |= CF_NO_GOTO_TB | 1;
|
||||
} else if (qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
|
||||
cflags |= CF_NO_GOTO_TB;
|
||||
}
|
||||
|
||||
return cflags;
|
||||
}
|
||||
|
||||
/* exit the current TB, but without causing any exception to be raised */
|
||||
void cpu_loop_exit_noexc(CPUState *cpu)
|
||||
{
|
||||
|
||||
+41
-38
@@ -21,28 +21,24 @@
|
||||
#include "qemu/qemu-print.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/type-helpers.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
#include "hw/core/tcg-cpu-ops.h"
|
||||
#include "trace.h"
|
||||
#include "disas/disas.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "exec/page-protection.h"
|
||||
#include "exec/translation-block.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "tcg/tcg.h"
|
||||
#include "tcg/tcg-apple-jit.h"
|
||||
#include "qemu/atomic.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "exec/log.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "exec/cpu-all.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "exec/replay-core.h"
|
||||
#include "system/tcg.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "exec/helper-proto-common.h"
|
||||
#include "tb-jmp-cache.h"
|
||||
#include "tb-hash.h"
|
||||
#include "tb-context.h"
|
||||
#include "tb-internal.h"
|
||||
#include "internal-common.h"
|
||||
#include "internal-target.h"
|
||||
|
||||
@@ -148,6 +144,38 @@ static void init_delay_params(SyncClocks *sc, const CPUState *cpu)
|
||||
}
|
||||
#endif /* CONFIG USER ONLY */
|
||||
|
||||
bool tcg_cflags_has(CPUState *cpu, uint32_t flags)
|
||||
{
|
||||
return cpu->tcg_cflags & flags;
|
||||
}
|
||||
|
||||
void tcg_cflags_set(CPUState *cpu, uint32_t flags)
|
||||
{
|
||||
cpu->tcg_cflags |= flags;
|
||||
}
|
||||
|
||||
uint32_t curr_cflags(CPUState *cpu)
|
||||
{
|
||||
uint32_t cflags = cpu->tcg_cflags;
|
||||
|
||||
/*
|
||||
* Record gdb single-step. We should be exiting the TB by raising
|
||||
* EXCP_DEBUG, but to simplify other tests, disable chaining too.
|
||||
*
|
||||
* For singlestep and -d nochain, suppress goto_tb so that
|
||||
* we can log -d cpu,exec after every TB.
|
||||
*/
|
||||
if (unlikely(cpu->singlestep_enabled)) {
|
||||
cflags |= CF_NO_GOTO_TB | CF_NO_GOTO_PTR | CF_SINGLE_STEP | 1;
|
||||
} else if (qatomic_read(&one_insn_per_tb)) {
|
||||
cflags |= CF_NO_GOTO_TB | 1;
|
||||
} else if (qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
|
||||
cflags |= CF_NO_GOTO_TB;
|
||||
}
|
||||
|
||||
return cflags;
|
||||
}
|
||||
|
||||
struct tb_desc {
|
||||
vaddr pc;
|
||||
uint64_t cs_base;
|
||||
@@ -217,20 +245,7 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu, vaddr pc,
|
||||
return qht_lookup_custom(&tb_ctx.htable, &desc, h, tb_lookup_cmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* tb_lookup:
|
||||
* @cpu: CPU that will execute the returned translation block
|
||||
* @pc: guest PC
|
||||
* @cs_base: arch-specific value associated with translation block
|
||||
* @flags: arch-specific translation block flags
|
||||
* @cflags: CF_* flags
|
||||
*
|
||||
* Look up a translation block inside the QHT using @pc, @cs_base, @flags and
|
||||
* @cflags. Uses @cpu's tb_jmp_cache. Might cause an exception, so have a
|
||||
* longjmp destination ready.
|
||||
*
|
||||
* Returns: an existing translation block or NULL.
|
||||
*/
|
||||
/* Might cause an exception, so have a longjmp destination ready */
|
||||
static inline TranslationBlock *tb_lookup(CPUState *cpu, vaddr pc,
|
||||
uint64_t cs_base, uint32_t flags,
|
||||
uint32_t cflags)
|
||||
@@ -418,16 +433,6 @@ const void *HELPER(lookup_tb_ptr)(CPUArchState *env)
|
||||
return tb->tc.ptr;
|
||||
}
|
||||
|
||||
/* Return the current PC from CPU, which may be cached in TB. */
|
||||
static vaddr log_pc(CPUState *cpu, const TranslationBlock *tb)
|
||||
{
|
||||
if (tb_cflags(tb) & CF_PCREL) {
|
||||
return cpu->cc->get_pc(cpu);
|
||||
} else {
|
||||
return tb->pc;
|
||||
}
|
||||
}
|
||||
|
||||
/* Execute a TB, and fix up the CPU state afterwards if necessary */
|
||||
/*
|
||||
* Disable CFI checks.
|
||||
@@ -1069,13 +1074,11 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp)
|
||||
|
||||
if (!tcg_target_initialized) {
|
||||
/* Check mandatory TCGCPUOps handlers */
|
||||
const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
assert(tcg_ops->cpu_exec_halt);
|
||||
assert(tcg_ops->cpu_exec_interrupt);
|
||||
assert(cpu->cc->tcg_ops->cpu_exec_halt);
|
||||
assert(cpu->cc->tcg_ops->cpu_exec_interrupt);
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
assert(tcg_ops->translate_code);
|
||||
tcg_ops->initialize();
|
||||
cpu->cc->tcg_ops->initialize();
|
||||
tcg_target_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
+30
-35
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
#include "hw/core/tcg-cpu-ops.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/page-protection.h"
|
||||
#include "exec/memory.h"
|
||||
@@ -37,16 +37,16 @@
|
||||
#include "exec/helper-proto-common.h"
|
||||
#include "qemu/atomic.h"
|
||||
#include "qemu/atomic128.h"
|
||||
#include "tb-internal.h"
|
||||
#include "exec/translate-all.h"
|
||||
#include "trace.h"
|
||||
#include "tb-hash.h"
|
||||
#include "tb-internal.h"
|
||||
#include "internal-common.h"
|
||||
#include "internal-target.h"
|
||||
#ifdef CONFIG_PLUGIN
|
||||
#include "qemu/plugin-memory.h"
|
||||
#endif
|
||||
#include "tcg/tcg-ldst.h"
|
||||
#include "tcg/oversized-guest.h"
|
||||
|
||||
/* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */
|
||||
/* #define DEBUG_TLB */
|
||||
@@ -104,15 +104,26 @@ static inline uint64_t tlb_read_idx(const CPUTLBEntry *entry,
|
||||
{
|
||||
/* Do not rearrange the CPUTLBEntry structure members. */
|
||||
QEMU_BUILD_BUG_ON(offsetof(CPUTLBEntry, addr_read) !=
|
||||
MMU_DATA_LOAD * sizeof(uintptr_t));
|
||||
MMU_DATA_LOAD * sizeof(uint64_t));
|
||||
QEMU_BUILD_BUG_ON(offsetof(CPUTLBEntry, addr_write) !=
|
||||
MMU_DATA_STORE * sizeof(uintptr_t));
|
||||
MMU_DATA_STORE * sizeof(uint64_t));
|
||||
QEMU_BUILD_BUG_ON(offsetof(CPUTLBEntry, addr_code) !=
|
||||
MMU_INST_FETCH * sizeof(uintptr_t));
|
||||
MMU_INST_FETCH * sizeof(uint64_t));
|
||||
|
||||
const uintptr_t *ptr = &entry->addr_idx[access_type];
|
||||
#if TARGET_LONG_BITS == 32
|
||||
/* Use qatomic_read, in case of addr_write; only care about low bits. */
|
||||
const uint32_t *ptr = (uint32_t *)&entry->addr_idx[access_type];
|
||||
ptr += HOST_BIG_ENDIAN;
|
||||
return qatomic_read(ptr);
|
||||
#else
|
||||
const uint64_t *ptr = &entry->addr_idx[access_type];
|
||||
# if TCG_OVERSIZED_GUEST
|
||||
return *ptr;
|
||||
# else
|
||||
/* ofs might correspond to .addr_write, so use qatomic_read */
|
||||
return qatomic_read(ptr);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint64_t tlb_addr_write(const CPUTLBEntry *entry)
|
||||
@@ -892,8 +903,16 @@ static void tlb_reset_dirty_range_locked(CPUTLBEntry *tlb_entry,
|
||||
addr &= TARGET_PAGE_MASK;
|
||||
addr += tlb_entry->addend;
|
||||
if ((addr - start) < length) {
|
||||
#if TARGET_LONG_BITS == 32
|
||||
uint32_t *ptr_write = (uint32_t *)&tlb_entry->addr_write;
|
||||
ptr_write += HOST_BIG_ENDIAN;
|
||||
qatomic_set(ptr_write, *ptr_write | TLB_NOTDIRTY);
|
||||
#elif TCG_OVERSIZED_GUEST
|
||||
tlb_entry->addr_write |= TLB_NOTDIRTY;
|
||||
#else
|
||||
qatomic_set(&tlb_entry->addr_write,
|
||||
tlb_entry->addr_write | TLB_NOTDIRTY);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1180,7 +1199,7 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
|
||||
|
||||
void tlb_set_page_with_attrs(CPUState *cpu, vaddr addr,
|
||||
hwaddr paddr, MemTxAttrs attrs, int prot,
|
||||
int mmu_idx, vaddr size)
|
||||
int mmu_idx, uint64_t size)
|
||||
{
|
||||
CPUTLBEntryFull full = {
|
||||
.phys_addr = paddr,
|
||||
@@ -1195,35 +1214,12 @@ void tlb_set_page_with_attrs(CPUState *cpu, vaddr addr,
|
||||
|
||||
void tlb_set_page(CPUState *cpu, vaddr addr,
|
||||
hwaddr paddr, int prot,
|
||||
int mmu_idx, vaddr size)
|
||||
int mmu_idx, uint64_t size)
|
||||
{
|
||||
tlb_set_page_with_attrs(cpu, addr, paddr, MEMTXATTRS_UNSPECIFIED,
|
||||
prot, mmu_idx, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* tlb_hit_page: return true if page aligned @addr is a hit against the
|
||||
* TLB entry @tlb_addr
|
||||
*
|
||||
* @addr: virtual address to test (must be page aligned)
|
||||
* @tlb_addr: TLB entry address (a CPUTLBEntry addr_read/write/code value)
|
||||
*/
|
||||
static inline bool tlb_hit_page(uint64_t tlb_addr, vaddr addr)
|
||||
{
|
||||
return addr == (tlb_addr & (TARGET_PAGE_MASK | TLB_INVALID_MASK));
|
||||
}
|
||||
|
||||
/**
|
||||
* tlb_hit: return true if @addr is a hit against the TLB entry @tlb_addr
|
||||
*
|
||||
* @addr: virtual address to test (need not be page aligned)
|
||||
* @tlb_addr: TLB entry address (a CPUTLBEntry addr_read/write/code value)
|
||||
*/
|
||||
static inline bool tlb_hit(uint64_t tlb_addr, vaddr addr)
|
||||
{
|
||||
return tlb_hit_page(tlb_addr, addr & TARGET_PAGE_MASK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Note: tlb_fill_align() can trigger a resize of the TLB.
|
||||
* This means that all of the caller's prior references to the TLB table
|
||||
@@ -1508,7 +1504,7 @@ void *probe_access(CPUArchState *env, vaddr addr, int size,
|
||||
return host;
|
||||
}
|
||||
|
||||
void *tlb_vaddr_to_host(CPUArchState *env, vaddr addr,
|
||||
void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr,
|
||||
MMUAccessType access_type, int mmu_idx)
|
||||
{
|
||||
CPUTLBEntryFull *full;
|
||||
@@ -2890,8 +2886,7 @@ static void do_st16_mmu(CPUState *cpu, vaddr addr, Int128 val,
|
||||
#include "atomic_template.h"
|
||||
#endif
|
||||
|
||||
/* FIXME: this doesn't work in TCTI */
|
||||
#if (defined(CONFIG_ATOMIC128) && !defined(CONFIG_TCG_THREADED_INTERPRETER)) || HAVE_CMPXCHG128
|
||||
#if defined(CONFIG_ATOMIC128) || HAVE_CMPXCHG128
|
||||
#define DATA_SIZE 16
|
||||
#include "atomic_template.h"
|
||||
#endif
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "system/cpus.h"
|
||||
#include "system/qtest.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/seqlock.h"
|
||||
#include "system/replay.h"
|
||||
#include "system/runstate.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "system/cpu-timers-internal.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "sysemu/cpu-timers-internal.h"
|
||||
|
||||
/*
|
||||
* ICOUNT: Instruction Counter
|
||||
@@ -48,8 +48,6 @@ static bool icount_sleep = true;
|
||||
/* Arbitrarily pick 1MIPS as the minimum allowable speed. */
|
||||
#define MAX_ICOUNT_SHIFT 10
|
||||
|
||||
bool icount_align_option;
|
||||
|
||||
/* Do not count executed instructions */
|
||||
ICountMode use_icount = ICOUNT_DISABLED;
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ extern int64_t max_advance;
|
||||
|
||||
extern bool one_insn_per_tb;
|
||||
|
||||
extern bool icount_align_option;
|
||||
|
||||
/*
|
||||
* Return true if CS is not running in parallel with other cpus, either
|
||||
* because there are no other cpus or we are within an exclusive context.
|
||||
@@ -55,23 +53,7 @@ TranslationBlock *tb_link_page(TranslationBlock *tb);
|
||||
void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
|
||||
uintptr_t host_pc);
|
||||
|
||||
/**
|
||||
* tlb_init - initialize a CPU's TLB
|
||||
* @cpu: CPU whose TLB should be initialized
|
||||
*/
|
||||
void tlb_init(CPUState *cpu);
|
||||
/**
|
||||
* tlb_destroy - destroy a CPU's TLB
|
||||
* @cpu: CPU whose TLB should be destroyed
|
||||
*/
|
||||
void tlb_destroy(CPUState *cpu);
|
||||
|
||||
bool tcg_exec_realizefn(CPUState *cpu, Error **errp);
|
||||
void tcg_exec_unrealizefn(CPUState *cpu);
|
||||
|
||||
/* current cflags for hashing/comparison */
|
||||
uint32_t curr_cflags(CPUState *cpu);
|
||||
|
||||
void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
|
||||
|
||||
#endif
|
||||
@@ -10,9 +10,7 @@
|
||||
#define ACCEL_TCG_INTERNAL_TARGET_H
|
||||
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/translation-block.h"
|
||||
#include "tb-internal.h"
|
||||
#include "tcg-target-mo.h"
|
||||
#include "exec/translate-all.h"
|
||||
|
||||
/*
|
||||
* Access to the various translations structures need to be serialised
|
||||
@@ -38,9 +36,50 @@ static inline void page_table_config_init(void) { }
|
||||
void page_table_config_init(void);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
/*
|
||||
* For user-only, page_protect sets the page read-only.
|
||||
* Since most execution is already on read-only pages, and we'd need to
|
||||
* account for other TBs on the same page, defer undoing any page protection
|
||||
* until we receive the write fault.
|
||||
*/
|
||||
static inline void tb_lock_page0(tb_page_addr_t p0)
|
||||
{
|
||||
page_protect(p0);
|
||||
}
|
||||
|
||||
static inline void tb_lock_page1(tb_page_addr_t p0, tb_page_addr_t p1)
|
||||
{
|
||||
page_protect(p1);
|
||||
}
|
||||
|
||||
static inline void tb_unlock_page1(tb_page_addr_t p0, tb_page_addr_t p1) { }
|
||||
static inline void tb_unlock_pages(TranslationBlock *tb) { }
|
||||
#else
|
||||
void tb_lock_page0(tb_page_addr_t);
|
||||
void tb_lock_page1(tb_page_addr_t, tb_page_addr_t);
|
||||
void tb_unlock_page1(tb_page_addr_t, tb_page_addr_t);
|
||||
void tb_unlock_pages(TranslationBlock *);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
void tb_invalidate_phys_range_fast(ram_addr_t ram_addr,
|
||||
unsigned size,
|
||||
uintptr_t retaddr);
|
||||
G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr);
|
||||
#endif /* CONFIG_USER_ONLY */
|
||||
#endif /* CONFIG_SOFTMMU */
|
||||
|
||||
bool tb_invalidate_phys_page_unwind(tb_page_addr_t addr, uintptr_t pc);
|
||||
|
||||
/* Return the current PC from CPU, which may be cached in TB. */
|
||||
static inline vaddr log_pc(CPUState *cpu, const TranslationBlock *tb)
|
||||
{
|
||||
if (tb_cflags(tb) & CF_PCREL) {
|
||||
return cpu->cc->get_pc(cpu);
|
||||
} else {
|
||||
return tb->pc;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* tcg_req_mo:
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
common_ss.add(when: 'CONFIG_TCG', if_true: files(
|
||||
'cpu-exec-common.c',
|
||||
'tcg-runtime.c',
|
||||
'tcg-runtime-gvec.c',
|
||||
))
|
||||
tcg_specific_ss = ss.source_set()
|
||||
tcg_specific_ss.add(files(
|
||||
'tcg-all.c',
|
||||
'cpu-exec.c',
|
||||
'tb-maint.c',
|
||||
'tcg-runtime-gvec.c',
|
||||
'tcg-runtime.c',
|
||||
'translate-all.c',
|
||||
'translator.c',
|
||||
))
|
||||
@@ -20,14 +20,17 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss)
|
||||
|
||||
specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
|
||||
'cputlb.c',
|
||||
'watchpoint.c',
|
||||
))
|
||||
|
||||
system_ss.add(when: ['CONFIG_TCG'], if_true: files(
|
||||
'icount-common.c',
|
||||
'monitor.c',
|
||||
))
|
||||
|
||||
tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
|
||||
'tcg-accel-ops.c',
|
||||
'tcg-accel-ops-mttcg.c',
|
||||
'tcg-accel-ops-icount.c',
|
||||
'tcg-accel-ops-mttcg.c',
|
||||
'tcg-accel-ops-rr.c',
|
||||
'watchpoint.c',
|
||||
))
|
||||
+3
-2
@@ -13,8 +13,9 @@
|
||||
#include "qapi/type-helpers.h"
|
||||
#include "qapi/qapi-commands-machine.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "system/tcg.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "tcg/tcg.h"
|
||||
#include "internal-common.h"
|
||||
#include "tb-context.h"
|
||||
|
||||
@@ -102,15 +102,6 @@ static void gen_disable_mem_helper(void)
|
||||
|
||||
static TCGv_i32 gen_cpu_index(void)
|
||||
{
|
||||
/*
|
||||
* Optimize when we run with a single vcpu. All values using cpu_index,
|
||||
* including scoreboard index, will be optimized out.
|
||||
* User-mode calls tb_flush when setting this flag. In system-mode, all
|
||||
* vcpus are created before generating code.
|
||||
*/
|
||||
if (!tcg_cflags_has(current_cpu, CF_PARALLEL)) {
|
||||
return tcg_constant_i32(current_cpu->cpu_index);
|
||||
}
|
||||
TCGv_i32 cpu_index = tcg_temp_ebb_new_i32();
|
||||
tcg_gen_ld_i32(cpu_index, tcg_env,
|
||||
-offsetof(ArchCPU, env) + offsetof(CPUState, cpu_index));
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "exec/cpu-defs.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/translation-block.h"
|
||||
#include "qemu/xxhash.h"
|
||||
#include "tb-jmp-cache.h"
|
||||
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
* TranslationBlock internal declarations (target specific)
|
||||
*
|
||||
* Copyright (c) 2003 Fabrice Bellard
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef ACCEL_TCG_TB_INTERNAL_TARGET_H
|
||||
#define ACCEL_TCG_TB_INTERNAL_TARGET_H
|
||||
|
||||
#include "exec/cpu-all.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/translation-block.h"
|
||||
|
||||
/*
|
||||
* The true return address will often point to a host insn that is part of
|
||||
* the next translated guest insn. Adjust the address backward to point to
|
||||
* the middle of the call insn. Subtracting one would do the job except for
|
||||
* several compressed mode architectures (arm, mips) which set the low bit
|
||||
* to indicate the compressed mode; subtracting two works around that. It
|
||||
* is also the case that there are no host isas that contain a call insn
|
||||
* smaller than 4 bytes, so we don't worry about special-casing this.
|
||||
*/
|
||||
#define GETPC_ADJ 2
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
|
||||
#define CPU_TLB_DYN_MIN_BITS 6
|
||||
#define CPU_TLB_DYN_DEFAULT_BITS 8
|
||||
|
||||
# if HOST_LONG_BITS == 32
|
||||
/* Make sure we do not require a double-word shift for the TLB load */
|
||||
# define CPU_TLB_DYN_MAX_BITS (32 - TARGET_PAGE_BITS)
|
||||
# else /* HOST_LONG_BITS == 64 */
|
||||
/*
|
||||
* Assuming TARGET_PAGE_BITS==12, with 2**22 entries we can cover 2**(22+12) ==
|
||||
* 2**34 == 16G of address space. This is roughly what one would expect a
|
||||
* TLB to cover in a modern (as of 2018) x86_64 CPU. For instance, Intel
|
||||
* Skylake's Level-2 STLB has 16 1G entries.
|
||||
* Also, make sure we do not size the TLB past the guest's address space.
|
||||
*/
|
||||
# ifdef TARGET_PAGE_BITS_VARY
|
||||
# define CPU_TLB_DYN_MAX_BITS \
|
||||
MIN(22, TARGET_VIRT_ADDR_SPACE_BITS - TARGET_PAGE_BITS)
|
||||
# else
|
||||
# define CPU_TLB_DYN_MAX_BITS \
|
||||
MIN_CONST(22, TARGET_VIRT_ADDR_SPACE_BITS - TARGET_PAGE_BITS)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* CONFIG_SOFTMMU */
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#include "user/page-protection.h"
|
||||
/*
|
||||
* For user-only, page_protect sets the page read-only.
|
||||
* Since most execution is already on read-only pages, and we'd need to
|
||||
* account for other TBs on the same page, defer undoing any page protection
|
||||
* until we receive the write fault.
|
||||
*/
|
||||
static inline void tb_lock_page0(tb_page_addr_t p0)
|
||||
{
|
||||
page_protect(p0);
|
||||
}
|
||||
|
||||
static inline void tb_lock_page1(tb_page_addr_t p0, tb_page_addr_t p1)
|
||||
{
|
||||
page_protect(p1);
|
||||
}
|
||||
|
||||
static inline void tb_unlock_page1(tb_page_addr_t p0, tb_page_addr_t p1) { }
|
||||
static inline void tb_unlock_pages(TranslationBlock *tb) { }
|
||||
#else
|
||||
void tb_lock_page0(tb_page_addr_t);
|
||||
void tb_lock_page1(tb_page_addr_t, tb_page_addr_t);
|
||||
void tb_unlock_page1(tb_page_addr_t, tb_page_addr_t);
|
||||
void tb_unlock_pages(TranslationBlock *);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
void tb_invalidate_phys_range_fast(ram_addr_t ram_addr,
|
||||
unsigned size,
|
||||
uintptr_t retaddr);
|
||||
#endif /* CONFIG_SOFTMMU */
|
||||
|
||||
bool tb_invalidate_phys_page_unwind(tb_page_addr_t addr, uintptr_t pc);
|
||||
|
||||
#endif
|
||||
+30
-38
@@ -25,18 +25,13 @@
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/page-protection.h"
|
||||
#include "exec/tb-flush.h"
|
||||
#include "tb-internal.h"
|
||||
#include "system/tcg.h"
|
||||
#include "exec/translate-all.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "tcg/tcg.h"
|
||||
#include "tcg/tcg-apple-jit.h"
|
||||
#include "tb-hash.h"
|
||||
#include "tb-context.h"
|
||||
#include "tb-internal.h"
|
||||
#include "internal-common.h"
|
||||
#include "internal-target.h"
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#include "user/page-protection.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* List iterators for lists of tagged pointers in TranslationBlock. */
|
||||
@@ -840,14 +835,6 @@ static inline void tb_remove_from_jmp_list(TranslationBlock *orig, int n_orig)
|
||||
* We first acquired the lock, and since the destination pointer matches,
|
||||
* we know for sure that @orig is in the jmp list.
|
||||
*/
|
||||
if (dest == orig) {
|
||||
/*
|
||||
* In the case of a TB that links to itself, removing the entry
|
||||
* from the list means that it won't be present later during
|
||||
* tb_jmp_unlink -- unlink now.
|
||||
*/
|
||||
tb_reset_jump(orig, n_orig);
|
||||
}
|
||||
pprev = &dest->jmp_list_head;
|
||||
TB_FOR_EACH_JMP(dest, tb, n) {
|
||||
if (tb == orig && n == n_orig) {
|
||||
@@ -922,7 +909,6 @@ static void do_tb_phys_invalidate(TranslationBlock *tb, bool rm_from_page_list)
|
||||
uint32_t orig_cflags = tb_cflags(tb);
|
||||
|
||||
assert_memory_lock();
|
||||
qemu_thread_jit_write();
|
||||
|
||||
/* make sure no further incoming jumps will be chained to this TB */
|
||||
qemu_spin_lock(&tb->jmp_lock);
|
||||
@@ -933,27 +919,33 @@ static void do_tb_phys_invalidate(TranslationBlock *tb, bool rm_from_page_list)
|
||||
phys_pc = tb_page_addr0(tb);
|
||||
h = tb_hash_func(phys_pc, (orig_cflags & CF_PCREL ? 0 : tb->pc),
|
||||
tb->flags, tb->cs_base, orig_cflags);
|
||||
if (qht_remove(&tb_ctx.htable, tb, h)) {
|
||||
|
||||
/* remove the TB from the page list */
|
||||
if (rm_from_page_list) {
|
||||
tb_remove(tb);
|
||||
}
|
||||
|
||||
/* remove the TB from the hash list */
|
||||
tb_jmp_cache_inval_tb(tb);
|
||||
|
||||
/* suppress this TB from the two jump lists */
|
||||
tb_remove_from_jmp_list(tb, 0);
|
||||
tb_remove_from_jmp_list(tb, 1);
|
||||
|
||||
/* suppress any remaining jumps to this TB */
|
||||
tb_jmp_unlink(tb);
|
||||
|
||||
qatomic_set(&tb_ctx.tb_phys_invalidate_count,
|
||||
tb_ctx.tb_phys_invalidate_count + 1);
|
||||
if (!qht_remove(&tb_ctx.htable, tb, h)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* remove the TB from the page list */
|
||||
if (rm_from_page_list) {
|
||||
tb_remove(tb);
|
||||
}
|
||||
|
||||
/* remove the TB from the hash list */
|
||||
tb_jmp_cache_inval_tb(tb);
|
||||
|
||||
/* suppress this TB from the two jump lists */
|
||||
tb_remove_from_jmp_list(tb, 0);
|
||||
tb_remove_from_jmp_list(tb, 1);
|
||||
|
||||
/* suppress any remaining jumps to this TB */
|
||||
tb_jmp_unlink(tb);
|
||||
|
||||
qatomic_set(&tb_ctx.tb_phys_invalidate_count,
|
||||
tb_ctx.tb_phys_invalidate_count + 1);
|
||||
}
|
||||
|
||||
static void tb_phys_invalidate__locked(TranslationBlock *tb)
|
||||
{
|
||||
qemu_thread_jit_write();
|
||||
do_tb_phys_invalidate(tb, true);
|
||||
qemu_thread_jit_execute();
|
||||
}
|
||||
|
||||
@@ -1021,7 +1013,7 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t last)
|
||||
assert_memory_lock();
|
||||
|
||||
PAGE_FOR_EACH_TB(start, last, unused, tb, n) {
|
||||
do_tb_phys_invalidate(tb, true);
|
||||
tb_phys_invalidate__locked(tb);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1086,7 +1078,7 @@ bool tb_invalidate_phys_page_unwind(tb_page_addr_t addr, uintptr_t pc)
|
||||
current_tb_modified = true;
|
||||
cpu_restore_state_from_tb(current_cpu, current_tb, pc);
|
||||
}
|
||||
do_tb_phys_invalidate(tb, true);
|
||||
tb_phys_invalidate__locked(tb);
|
||||
}
|
||||
|
||||
if (current_tb_modified) {
|
||||
@@ -1149,7 +1141,7 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
|
||||
cpu_restore_state_from_tb(current_cpu, current_tb, retaddr);
|
||||
}
|
||||
#endif /* TARGET_HAS_PRECISE_SMC */
|
||||
do_tb_phys_invalidate(tb, true);
|
||||
tb_phys_invalidate__locked(tb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/replay.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
||||
#include "tcg-accel-ops.h"
|
||||
#include "tcg-accel-ops-icount.h"
|
||||
|
||||
@@ -24,12 +24,13 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/tcg.h"
|
||||
#include "system/replay.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/notify.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "hw/boards.h"
|
||||
#include "tcg/startup.h"
|
||||
#include "tcg-accel-ops.h"
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/lockable.h"
|
||||
#include "system/tcg.h"
|
||||
#include "system/replay.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/notify.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "tcg/startup.h"
|
||||
#include "tcg-accel-ops.h"
|
||||
#include "tcg-accel-ops-rr.h"
|
||||
|
||||
@@ -26,17 +26,15 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/accel-ops.h"
|
||||
#include "system/tcg.h"
|
||||
#include "system/replay.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "exec/cputlb.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/hwaddr.h"
|
||||
#include "exec/tb-flush.h"
|
||||
#include "exec/translation-block.h"
|
||||
#include "gdbstub/enums.h"
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
@@ -64,12 +62,6 @@ void tcg_cpu_init_cflags(CPUState *cpu, bool parallel)
|
||||
|
||||
cflags |= parallel ? CF_PARALLEL : 0;
|
||||
cflags |= icount_enabled() ? CF_USE_ICOUNT : 0;
|
||||
#if defined(CONFIG_TCG_THREADED_INTERPRETER)
|
||||
// GOTO_PTR is too complex to emit a simple gadget for.
|
||||
// We'll let C handle it, since the overhead is similar.
|
||||
cflags |= CF_NO_GOTO_PTR;
|
||||
cpu->cflags_next_tb = CF_NO_GOTO_PTR;
|
||||
#endif
|
||||
tcg_cflags_set(cpu, cflags);
|
||||
}
|
||||
|
||||
@@ -127,9 +119,10 @@ static inline int xlat_gdb_type(CPUState *cpu, int gdbtype)
|
||||
[GDB_WATCHPOINT_ACCESS] = BP_GDB | BP_MEM_ACCESS,
|
||||
};
|
||||
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
||||
int cputype = xlat[gdbtype];
|
||||
|
||||
if (cpu->cc->gdb_stop_before_watchpoint) {
|
||||
if (cc->gdb_stop_before_watchpoint) {
|
||||
cputype |= BP_STOP_BEFORE_ACCESS;
|
||||
}
|
||||
return cputype;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef TCG_ACCEL_OPS_H
|
||||
#define TCG_ACCEL_OPS_H
|
||||
|
||||
#include "system/cpus.h"
|
||||
#include "sysemu/cpus.h"
|
||||
|
||||
void tcg_cpu_destroy(CPUState *cpu);
|
||||
int tcg_cpu_exec(CPUState *cpu);
|
||||
|
||||
+8
-13
@@ -24,24 +24,21 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/tcg.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "exec/replay-core.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "tcg/startup.h"
|
||||
#include "tcg/oversized-guest.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/accel.h"
|
||||
#include "qemu/atomic.h"
|
||||
#include "qapi/qapi-builtin-visit.h"
|
||||
#include "qemu/units.h"
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#include "hw/qdev-core.h"
|
||||
#else
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
#include "hw/boards.h"
|
||||
#endif
|
||||
#include "internal-common.h"
|
||||
#include "cpu-param.h"
|
||||
|
||||
|
||||
struct TCGState {
|
||||
AccelState parent_obj;
|
||||
@@ -73,7 +70,7 @@ DECLARE_INSTANCE_CHECKER(TCGState, TCG_STATE,
|
||||
|
||||
static bool default_mttcg_enabled(void)
|
||||
{
|
||||
if (icount_enabled()) {
|
||||
if (icount_enabled() || TCG_OVERSIZED_GUEST) {
|
||||
return false;
|
||||
}
|
||||
#ifdef TARGET_SUPPORTS_MTTCG
|
||||
@@ -127,10 +124,6 @@ static int tcg_init_machine(MachineState *ms)
|
||||
tcg_prologue_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
qdev_create_fake_machine();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -146,7 +139,9 @@ static void tcg_set_thread(Object *obj, const char *value, Error **errp)
|
||||
TCGState *s = TCG_STATE(obj);
|
||||
|
||||
if (strcmp(value, "multi") == 0) {
|
||||
if (icount_enabled()) {
|
||||
if (TCG_OVERSIZED_GUEST) {
|
||||
error_setg(errp, "No MTTCG when guest word size > hosts");
|
||||
} else if (icount_enabled()) {
|
||||
error_setg(errp, "No MTTCG when icount is enabled");
|
||||
} else {
|
||||
#ifndef TARGET_SUPPORTS_MTTCG
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/host-utils.h"
|
||||
#include "cpu.h"
|
||||
#include "exec/helper-proto-common.h"
|
||||
#include "tcg/tcg-gvec-desc.h"
|
||||
|
||||
|
||||
@@ -23,9 +23,13 @@
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/host-utils.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "exec/helper-proto-common.h"
|
||||
#include "accel/tcg/getpc.h"
|
||||
#include "exec/cpu_ldst.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "disas/disas.h"
|
||||
#include "exec/log.h"
|
||||
#include "tcg/tcg.h"
|
||||
|
||||
#define HELPER_H "accel/tcg/tcg-runtime.h"
|
||||
#include "exec/helper-info.c.inc"
|
||||
|
||||
+21
-35
@@ -23,7 +23,6 @@
|
||||
#include "disas/disas.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "tcg/tcg.h"
|
||||
#include "tcg/tcg-apple-jit.h"
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#include "qemu.h"
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
@@ -45,8 +44,7 @@
|
||||
#endif
|
||||
|
||||
#include "exec/cputlb.h"
|
||||
#include "exec/page-protection.h"
|
||||
#include "tb-internal.h"
|
||||
#include "exec/translate-all.h"
|
||||
#include "exec/translator.h"
|
||||
#include "exec/tb-flush.h"
|
||||
#include "qemu/bitmap.h"
|
||||
@@ -55,14 +53,14 @@
|
||||
#include "qemu/cacheinfo.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "exec/log.h"
|
||||
#include "system/cpu-timers.h"
|
||||
#include "system/tcg.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/cpu-timers.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "qapi/error.h"
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
#include "hw/core/tcg-cpu-ops.h"
|
||||
#include "tb-jmp-cache.h"
|
||||
#include "tb-hash.h"
|
||||
#include "tb-context.h"
|
||||
#include "tb-internal.h"
|
||||
#include "internal-common.h"
|
||||
#include "internal-target.h"
|
||||
#include "tcg/perf.h"
|
||||
@@ -107,7 +105,7 @@ static int64_t decode_sleb128(const uint8_t **pp)
|
||||
val |= (int64_t)(byte & 0x7f) << shift;
|
||||
shift += 7;
|
||||
} while (byte & 0x80);
|
||||
if (shift < 64 && (byte & 0x40)) {
|
||||
if (shift < TARGET_LONG_BITS && (byte & 0x40)) {
|
||||
val |= -(int64_t)1 << shift;
|
||||
}
|
||||
|
||||
@@ -276,10 +274,8 @@ static int setjmp_gen_code(CPUArchState *env, TranslationBlock *tb,
|
||||
|
||||
tcg_func_start(tcg_ctx);
|
||||
|
||||
CPUState *cs = env_cpu(env);
|
||||
tcg_ctx->cpu = cs;
|
||||
cs->cc->tcg_ops->translate_code(cs, tb, max_insns, pc, host_pc);
|
||||
|
||||
tcg_ctx->cpu = env_cpu(env);
|
||||
gen_intermediate_code(env_cpu(env), tb, max_insns, pc, host_pc);
|
||||
assert(tb->size != 0);
|
||||
tcg_ctx->cpu = NULL;
|
||||
*max_insns = tb->icount;
|
||||
@@ -366,7 +362,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||
/*
|
||||
* Overflow of code_gen_buffer, or the current slice of it.
|
||||
*
|
||||
* TODO: We don't need to re-do tcg_ops->translate_code, nor
|
||||
* TODO: We don't need to re-do gen_intermediate_code, nor
|
||||
* should we re-do the tcg optimization currently hidden
|
||||
* inside tcg_gen_code. All that should be required is to
|
||||
* flush the TBs, allocate a new TB, re-initialize it per
|
||||
@@ -531,32 +527,23 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||
tb_reset_jump(tb, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Insert TB into the corresponding region tree before publishing it
|
||||
* through QHT. Otherwise rewinding happened in the TB might fail to
|
||||
* lookup itself using host PC.
|
||||
*/
|
||||
tcg_tb_insert(tb);
|
||||
|
||||
/*
|
||||
* If the TB is not associated with a physical RAM page then it must be
|
||||
* a temporary one-insn TB.
|
||||
*
|
||||
* Such TBs must be added to region trees in order to make sure that
|
||||
* restore_state_to_opc() - which on some architectures is not limited to
|
||||
* rewinding, but also affects exception handling! - is called when such a
|
||||
* TB causes an exception.
|
||||
*
|
||||
* At the same time, temporary one-insn TBs must be executed at most once,
|
||||
* because subsequent reads from, e.g., I/O memory may return different
|
||||
* values. So return early before attempting to link to other TBs or add
|
||||
* to the QHT.
|
||||
* a temporary one-insn TB, and we have nothing left to do. Return early
|
||||
* before attempting to link to other TBs or add to the lookup table.
|
||||
*/
|
||||
if (tb_page_addr0(tb) == -1) {
|
||||
assert_no_pages_locked();
|
||||
return tb;
|
||||
}
|
||||
|
||||
/*
|
||||
* Insert TB into the corresponding region tree before publishing it
|
||||
* through QHT. Otherwise rewinding happened in the TB might fail to
|
||||
* lookup itself using host PC.
|
||||
*/
|
||||
tcg_tb_insert(tb);
|
||||
|
||||
/*
|
||||
* No explicit memory barrier is required -- tb_link_page() makes the
|
||||
* TB visible in a consistent state.
|
||||
@@ -631,7 +618,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
|
||||
* to account for the re-execution of the branch.
|
||||
*/
|
||||
n = 1;
|
||||
cc = cpu->cc;
|
||||
cc = CPU_GET_CLASS(cpu);
|
||||
if (cc->tcg_ops->io_recompile_replay_branch &&
|
||||
cc->tcg_ops->io_recompile_replay_branch(cpu, tb)) {
|
||||
cpu->neg.icount_decr.u16.low++;
|
||||
@@ -642,10 +629,9 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
|
||||
* Exit the loop and potentially generate a new TB executing the
|
||||
* just the I/O insns. We also limit instrumentation to memory
|
||||
* operations only (which execute after completion) so we don't
|
||||
* double instrument the instruction. Also don't let an IRQ sneak
|
||||
* in before we execute it.
|
||||
* double instrument the instruction.
|
||||
*/
|
||||
cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | CF_NOIRQ | n;
|
||||
cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | n;
|
||||
|
||||
if (qemu_loglevel_mask(CPU_LOG_EXEC)) {
|
||||
vaddr pc = cpu->cc->get_pc(cpu);
|
||||
|
||||
@@ -15,11 +15,9 @@
|
||||
#include "exec/cpu_ldst.h"
|
||||
#include "exec/plugin-gen.h"
|
||||
#include "exec/cpu_ldst.h"
|
||||
#include "exec/tswap.h"
|
||||
#include "tcg/tcg-op-common.h"
|
||||
#include "internal-target.h"
|
||||
#include "disas/disas.h"
|
||||
#include "tb-internal.h"
|
||||
|
||||
static void set_can_do_io(DisasContextBase *db, bool val)
|
||||
{
|
||||
@@ -104,11 +102,6 @@ static void gen_tb_end(const TranslationBlock *tb, uint32_t cflags,
|
||||
}
|
||||
}
|
||||
|
||||
bool translator_is_same_page(const DisasContextBase *db, vaddr addr)
|
||||
{
|
||||
return ((addr ^ db->pc_first) & TARGET_PAGE_MASK) == 0;
|
||||
}
|
||||
|
||||
bool translator_use_goto_tb(DisasContextBase *db, vaddr dest)
|
||||
{
|
||||
/* Suppress goto_tb if requested. */
|
||||
@@ -117,7 +110,7 @@ bool translator_use_goto_tb(DisasContextBase *db, vaddr dest)
|
||||
}
|
||||
|
||||
/* Check for the dest on the same page as the start of the TB. */
|
||||
return translator_is_same_page(db, dest);
|
||||
return ((db->pc_first ^ dest) & TARGET_PAGE_MASK) == 0;
|
||||
}
|
||||
|
||||
void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "exec/replay-core.h"
|
||||
#include "internal-common.h"
|
||||
|
||||
void cpu_resume(CPUState *cpu)
|
||||
{
|
||||
@@ -19,16 +18,6 @@ void cpu_exec_reset_hold(CPUState *cpu)
|
||||
{
|
||||
}
|
||||
|
||||
/* User mode emulation does not support softmmu yet. */
|
||||
|
||||
void tlb_init(CPUState *cpu)
|
||||
{
|
||||
}
|
||||
|
||||
void tlb_destroy(CPUState *cpu)
|
||||
{
|
||||
}
|
||||
|
||||
/* User mode emulation does not support record/replay yet. */
|
||||
|
||||
bool replay_exception(void)
|
||||
|
||||
+21
-110
@@ -17,27 +17,22 @@
|
||||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
#include "hw/core/tcg-cpu-ops.h"
|
||||
#include "disas/disas.h"
|
||||
#include "exec/vaddr.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "tcg/tcg.h"
|
||||
#include "qemu/bitops.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "exec/cpu_ldst.h"
|
||||
#include "user/cpu_loop.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "user/page-protection.h"
|
||||
#include "exec/translate-all.h"
|
||||
#include "exec/page-protection.h"
|
||||
#include "exec/helper-proto.h"
|
||||
#include "qemu/atomic128.h"
|
||||
#include "qemu/bswap.h"
|
||||
#include "qemu/int128.h"
|
||||
#include "trace.h"
|
||||
#include "tcg/tcg-ldst.h"
|
||||
#include "internal-common.h"
|
||||
#include "internal-target.h"
|
||||
#include "tb-internal.h"
|
||||
|
||||
__thread uintptr_t helper_retaddr;
|
||||
|
||||
@@ -222,16 +217,13 @@ void page_dump(FILE *f)
|
||||
|
||||
int page_get_flags(target_ulong address)
|
||||
{
|
||||
PageFlagsNode *p;
|
||||
|
||||
RCU_READ_LOCK_GUARD();
|
||||
PageFlagsNode *p = pageflags_find(address, address);
|
||||
|
||||
/*
|
||||
* See util/interval-tree.c re lockless lookups: no false positives but
|
||||
* there are false negatives. If we find nothing, retry with the mmap
|
||||
* lock acquired.
|
||||
*/
|
||||
p = pageflags_find(address, address);
|
||||
if (p) {
|
||||
return p->flags;
|
||||
}
|
||||
@@ -330,15 +322,15 @@ static void pageflags_create_merge(target_ulong start, target_ulong last,
|
||||
|
||||
if (prev) {
|
||||
if (next) {
|
||||
pageflags_create(prev->itree.start, next->itree.last, flags);
|
||||
prev->itree.last = next->itree.last;
|
||||
g_free_rcu(next, rcu);
|
||||
} else {
|
||||
pageflags_create(prev->itree.start, last, flags);
|
||||
prev->itree.last = last;
|
||||
}
|
||||
g_free_rcu(prev, rcu);
|
||||
interval_tree_insert(&prev->itree, &pageflags_root);
|
||||
} else if (next) {
|
||||
pageflags_create(start, next->itree.last, flags);
|
||||
g_free_rcu(next, rcu);
|
||||
next->itree.start = start;
|
||||
interval_tree_insert(&next->itree, &pageflags_root);
|
||||
} else {
|
||||
pageflags_create(start, last, flags);
|
||||
}
|
||||
@@ -408,8 +400,8 @@ static bool pageflags_set_clear(target_ulong start, target_ulong last,
|
||||
if (set_flags != merge_flags) {
|
||||
if (p_start < start) {
|
||||
interval_tree_remove(&p->itree, &pageflags_root);
|
||||
pageflags_create(p_start, start - 1, p_flags);
|
||||
g_free_rcu(p, rcu);
|
||||
p->itree.last = start - 1;
|
||||
interval_tree_insert(&p->itree, &pageflags_root);
|
||||
|
||||
if (last < p_last) {
|
||||
if (merge_flags) {
|
||||
@@ -431,11 +423,11 @@ static bool pageflags_set_clear(target_ulong start, target_ulong last,
|
||||
}
|
||||
if (last < p_last) {
|
||||
interval_tree_remove(&p->itree, &pageflags_root);
|
||||
pageflags_create(last + 1, p_last, p_flags);
|
||||
p->itree.start = last + 1;
|
||||
interval_tree_insert(&p->itree, &pageflags_root);
|
||||
if (merge_flags) {
|
||||
pageflags_create(start, last, merge_flags);
|
||||
}
|
||||
g_free_rcu(p, rcu);
|
||||
} else {
|
||||
if (merge_flags) {
|
||||
p->flags = merge_flags;
|
||||
@@ -456,8 +448,8 @@ static bool pageflags_set_clear(target_ulong start, target_ulong last,
|
||||
if (set_flags == p_flags) {
|
||||
if (start < p_start) {
|
||||
interval_tree_remove(&p->itree, &pageflags_root);
|
||||
pageflags_create(start, p_last, p_flags);
|
||||
g_free_rcu(p, rcu);
|
||||
p->itree.start = start;
|
||||
interval_tree_insert(&p->itree, &pageflags_root);
|
||||
}
|
||||
if (p_last < last) {
|
||||
start = p_last + 1;
|
||||
@@ -469,8 +461,8 @@ static bool pageflags_set_clear(target_ulong start, target_ulong last,
|
||||
/* Maybe split out head and/or tail ranges with the original flags. */
|
||||
interval_tree_remove(&p->itree, &pageflags_root);
|
||||
if (p_start < start) {
|
||||
pageflags_create(p_start, start - 1, p_flags);
|
||||
g_free_rcu(p, rcu);
|
||||
p->itree.last = start - 1;
|
||||
interval_tree_insert(&p->itree, &pageflags_root);
|
||||
|
||||
if (p_last < last) {
|
||||
goto restart;
|
||||
@@ -479,8 +471,8 @@ static bool pageflags_set_clear(target_ulong start, target_ulong last,
|
||||
pageflags_create(last + 1, p_last, p_flags);
|
||||
}
|
||||
} else if (last < p_last) {
|
||||
pageflags_create(last + 1, p_last, p_flags);
|
||||
g_free_rcu(p, rcu);
|
||||
p->itree.start = last + 1;
|
||||
interval_tree_insert(&p->itree, &pageflags_root);
|
||||
} else {
|
||||
g_free_rcu(p, rcu);
|
||||
goto restart;
|
||||
@@ -548,8 +540,6 @@ bool page_check_range(target_ulong start, target_ulong len, int flags)
|
||||
return false; /* wrap around */
|
||||
}
|
||||
|
||||
RCU_READ_LOCK_GUARD();
|
||||
|
||||
locked = have_mmap_lock();
|
||||
while (true) {
|
||||
PageFlagsNode *p = pageflags_find(start, last);
|
||||
@@ -706,7 +696,7 @@ void page_protect(tb_page_addr_t address)
|
||||
* immediately exited. (We can only return 2 if the 'pc' argument is
|
||||
* non-zero.)
|
||||
*/
|
||||
int page_unprotect(tb_page_addr_t address, uintptr_t pc)
|
||||
int page_unprotect(target_ulong address, uintptr_t pc)
|
||||
{
|
||||
PageFlagsNode *p;
|
||||
bool current_tb_invalidated;
|
||||
@@ -812,7 +802,7 @@ static int probe_access_internal(CPUArchState *env, vaddr addr,
|
||||
if (page_flags & acc_flag) {
|
||||
if (access_type != MMU_INST_FETCH
|
||||
&& cpu_plugin_mem_cbs_enabled(env_cpu(env))) {
|
||||
return TLB_FORCE_SLOW;
|
||||
return TLB_MMIO;
|
||||
}
|
||||
return 0; /* success */
|
||||
}
|
||||
@@ -847,7 +837,7 @@ void *probe_access(CPUArchState *env, vaddr addr, int size,
|
||||
|
||||
g_assert(-(addr | TARGET_PAGE_MASK) >= size);
|
||||
flags = probe_access_internal(env, addr, size, access_type, false, ra);
|
||||
g_assert((flags & ~TLB_FORCE_SLOW) == 0);
|
||||
g_assert((flags & ~TLB_MMIO) == 0);
|
||||
|
||||
return size ? g2h(env_cpu(env), addr) : NULL;
|
||||
}
|
||||
@@ -977,85 +967,6 @@ static void *cpu_mmu_lookup(CPUState *cpu, vaddr addr,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* physical memory access (slow version, mainly for debug) */
|
||||
int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
|
||||
void *ptr, size_t len, bool is_write)
|
||||
{
|
||||
int flags;
|
||||
vaddr l, page;
|
||||
uint8_t *buf = ptr;
|
||||
ssize_t written;
|
||||
int ret = -1;
|
||||
int fd = -1;
|
||||
|
||||
mmap_lock();
|
||||
|
||||
while (len > 0) {
|
||||
page = addr & TARGET_PAGE_MASK;
|
||||
l = (page + TARGET_PAGE_SIZE) - addr;
|
||||
if (l > len) {
|
||||
l = len;
|
||||
}
|
||||
flags = page_get_flags(page);
|
||||
if (!(flags & PAGE_VALID)) {
|
||||
goto out_close;
|
||||
}
|
||||
if (is_write) {
|
||||
if (flags & PAGE_WRITE) {
|
||||
memcpy(g2h(cpu, addr), buf, l);
|
||||
} else {
|
||||
/* Bypass the host page protection using ptrace. */
|
||||
if (fd == -1) {
|
||||
fd = open("/proc/self/mem", O_WRONLY);
|
||||
if (fd == -1) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* If there is a TranslationBlock and we weren't bypassing the
|
||||
* host page protection, the memcpy() above would SEGV,
|
||||
* ultimately leading to page_unprotect(). So invalidate the
|
||||
* translations manually. Both invalidation and pwrite() must
|
||||
* be under mmap_lock() in order to prevent the creation of
|
||||
* another TranslationBlock in between.
|
||||
*/
|
||||
tb_invalidate_phys_range(addr, addr + l - 1);
|
||||
written = pwrite(fd, buf, l,
|
||||
(off_t)(uintptr_t)g2h_untagged(addr));
|
||||
if (written != l) {
|
||||
goto out_close;
|
||||
}
|
||||
}
|
||||
} else if (flags & PAGE_READ) {
|
||||
memcpy(buf, g2h(cpu, addr), l);
|
||||
} else {
|
||||
/* Bypass the host page protection using ptrace. */
|
||||
if (fd == -1) {
|
||||
fd = open("/proc/self/mem", O_RDONLY);
|
||||
if (fd == -1) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (pread(fd, buf, l,
|
||||
(off_t)(uintptr_t)g2h_untagged(addr)) != l) {
|
||||
goto out_close;
|
||||
}
|
||||
}
|
||||
len -= l;
|
||||
buf += l;
|
||||
addr += l;
|
||||
}
|
||||
ret = 0;
|
||||
out_close:
|
||||
if (fd != -1) {
|
||||
close(fd);
|
||||
}
|
||||
out:
|
||||
mmap_unlock();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#include "ldst_atomicity.c.inc"
|
||||
|
||||
static uint8_t do_ld1_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi,
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/*
|
||||
* TaskState helpers for QEMU
|
||||
*
|
||||
* Copyright (c) 2023 Linaro Ltd.
|
||||
*
|
||||
* Authors:
|
||||
* Philippe Mathieu-Daudé
|
||||
*
|
||||
* SPDX-FileContributor: Philippe Mathieu-Daudé <[email protected]>
|
||||
* SPDX-FileCopyrightText: 2023 Linaro Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
#ifndef ACCEL_TCG_VCPU_STATE_H
|
||||
|
||||
+11
-12
@@ -19,15 +19,13 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "exec/breakpoint.h"
|
||||
#include "exec/cpu-interrupt.h"
|
||||
#include "exec/page-protection.h"
|
||||
#include "exec/translation-block.h"
|
||||
#include "system/tcg.h"
|
||||
#include "system/replay.h"
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/translate-all.h"
|
||||
#include "sysemu/tcg.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "hw/core/tcg-cpu-ops.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "internal-common.h"
|
||||
|
||||
/*
|
||||
* Return true if this watchpoint address matches the specified
|
||||
@@ -68,6 +66,7 @@ int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len)
|
||||
void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
|
||||
MemTxAttrs attrs, int flags, uintptr_t ra)
|
||||
{
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
||||
CPUWatchpoint *wp;
|
||||
|
||||
assert(tcg_enabled());
|
||||
@@ -83,9 +82,9 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
|
||||
return;
|
||||
}
|
||||
|
||||
if (cpu->cc->tcg_ops->adjust_watchpoint_address) {
|
||||
if (cc->tcg_ops->adjust_watchpoint_address) {
|
||||
/* this is currently used only by ARM BE32 */
|
||||
addr = cpu->cc->tcg_ops->adjust_watchpoint_address(cpu, addr, len);
|
||||
addr = cc->tcg_ops->adjust_watchpoint_address(cpu, addr, len);
|
||||
}
|
||||
|
||||
assert((flags & ~BP_MEM_ACCESS) == 0);
|
||||
@@ -117,8 +116,8 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
|
||||
wp->hitattrs = attrs;
|
||||
|
||||
if (wp->flags & BP_CPU
|
||||
&& cpu->cc->tcg_ops->debug_check_watchpoint
|
||||
&& !cpu->cc->tcg_ops->debug_check_watchpoint(cpu, wp)) {
|
||||
&& cc->tcg_ops->debug_check_watchpoint
|
||||
&& !cc->tcg_ops->debug_check_watchpoint(cpu, wp)) {
|
||||
wp->flags &= ~BP_WATCHPOINT_HIT;
|
||||
continue;
|
||||
}
|
||||
|
||||
+3
-4
@@ -18,10 +18,9 @@
|
||||
#include "hw/xen/xen_igd.h"
|
||||
#include "chardev/char.h"
|
||||
#include "qemu/accel.h"
|
||||
#include "system/accel-ops.h"
|
||||
#include "system/cpus.h"
|
||||
#include "system/xen.h"
|
||||
#include "system/runstate.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/xen.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "migration/misc.h"
|
||||
#include "migration/global_state.h"
|
||||
#include "hw/boards.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qobject/qdict.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
|
||||
static QLIST_HEAD (capture_list_head, CaptureState) capture_head;
|
||||
|
||||
|
||||
+10
-36
@@ -32,15 +32,15 @@
|
||||
#include "qapi/qobject-input-visitor.h"
|
||||
#include "qapi/qapi-visit-audio.h"
|
||||
#include "qapi/qapi-commands-audio.h"
|
||||
#include "qobject/qdict.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/help_option.h"
|
||||
#include "system/system.h"
|
||||
#include "system/replay.h"
|
||||
#include "system/runstate.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "ui/qemu-spice.h"
|
||||
#include "trace.h"
|
||||
|
||||
@@ -905,14 +905,6 @@ size_t AUD_read(SWVoiceIn *sw, void *buf, size_t size)
|
||||
|
||||
int AUD_get_buffer_size_out(SWVoiceOut *sw)
|
||||
{
|
||||
if (!sw) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (audio_get_pdo_out(sw->s->dev)->mixing_engine) {
|
||||
return sw->resample_buf.size * sw->info.bytes_per_frame;
|
||||
}
|
||||
|
||||
return sw->hw->samples * sw->hw->info.bytes_per_frame;
|
||||
}
|
||||
|
||||
@@ -1415,21 +1407,12 @@ void audio_run(AudioState *s, const char *msg)
|
||||
#endif
|
||||
}
|
||||
|
||||
void audio_generic_initialize_buffer_in(HWVoiceIn *hw)
|
||||
{
|
||||
if (hw->buf_emul) {
|
||||
g_free(hw->buf_emul);
|
||||
}
|
||||
|
||||
hw->size_emul = hw->samples * hw->info.bytes_per_frame;
|
||||
hw->buf_emul = g_malloc(hw->size_emul);
|
||||
hw->pos_emul = hw->pending_emul = 0;
|
||||
}
|
||||
|
||||
void audio_generic_run_buffer_in(HWVoiceIn *hw)
|
||||
{
|
||||
if (unlikely(!hw->buf_emul)) {
|
||||
audio_generic_initialize_buffer_in(hw);
|
||||
hw->size_emul = hw->samples * hw->info.bytes_per_frame;
|
||||
hw->buf_emul = g_malloc(hw->size_emul);
|
||||
hw->pos_emul = hw->pending_emul = 0;
|
||||
}
|
||||
|
||||
while (hw->pending_emul < hw->size_emul) {
|
||||
@@ -1463,17 +1446,6 @@ void audio_generic_put_buffer_in(HWVoiceIn *hw, void *buf, size_t size)
|
||||
hw->pending_emul -= size;
|
||||
}
|
||||
|
||||
void audio_generic_initialize_buffer_out(HWVoiceOut *hw)
|
||||
{
|
||||
if (hw->buf_emul) {
|
||||
g_free(hw->buf_emul);
|
||||
}
|
||||
|
||||
hw->size_emul = hw->samples * hw->info.bytes_per_frame;
|
||||
hw->buf_emul = g_malloc(hw->size_emul);
|
||||
hw->pos_emul = hw->pending_emul = 0;
|
||||
}
|
||||
|
||||
size_t audio_generic_buffer_get_free(HWVoiceOut *hw)
|
||||
{
|
||||
if (hw->buf_emul) {
|
||||
@@ -1505,7 +1477,9 @@ void audio_generic_run_buffer_out(HWVoiceOut *hw)
|
||||
void *audio_generic_get_buffer_out(HWVoiceOut *hw, size_t *size)
|
||||
{
|
||||
if (unlikely(!hw->buf_emul)) {
|
||||
audio_generic_initialize_buffer_out(hw);
|
||||
hw->size_emul = hw->samples * hw->info.bytes_per_frame;
|
||||
hw->buf_emul = g_malloc(hw->size_emul);
|
||||
hw->pos_emul = hw->pending_emul = 0;
|
||||
}
|
||||
|
||||
*size = MIN(hw->size_emul - hw->pending_emul,
|
||||
|
||||
@@ -187,11 +187,9 @@ struct audio_pcm_ops {
|
||||
void (*volume_in)(HWVoiceIn *hw, Volume *vol);
|
||||
};
|
||||
|
||||
void audio_generic_initialize_buffer_in(HWVoiceIn *hw);
|
||||
void audio_generic_run_buffer_in(HWVoiceIn *hw);
|
||||
void *audio_generic_get_buffer_in(HWVoiceIn *hw, size_t *size);
|
||||
void audio_generic_put_buffer_in(HWVoiceIn *hw, void *buf, size_t size);
|
||||
void audio_generic_initialize_buffer_out(HWVoiceOut *hw);
|
||||
void audio_generic_run_buffer_out(HWVoiceOut *hw);
|
||||
size_t audio_generic_buffer_get_free(HWVoiceOut *hw);
|
||||
void *audio_generic_get_buffer_out(HWVoiceOut *hw, size_t *size);
|
||||
|
||||
+22
-46
@@ -42,7 +42,6 @@ typedef struct coreaudioVoiceOut {
|
||||
UInt32 audioDevicePropertyBufferFrameSize;
|
||||
AudioDeviceIOProcID ioprocid;
|
||||
bool enabled;
|
||||
bool primed;
|
||||
} coreaudioVoiceOut;
|
||||
|
||||
static const AudioObjectPropertyAddress voice_addr = {
|
||||
@@ -326,22 +325,8 @@ static OSStatus audioDeviceIOProc(
|
||||
frameCount = core->audioDevicePropertyBufferFrameSize;
|
||||
pending_frames = hw->pending_emul / hw->info.bytes_per_frame;
|
||||
|
||||
/*
|
||||
* Jitter buffer: start playing only once half of the ring is queued, and
|
||||
* prime again after an underrun. Without the cushion, playback runs with
|
||||
* about one buffer queued, and every late audio timer (the main loop also
|
||||
* runs the vCPUs' I/O and virgl) costs a whole buffer of silence.
|
||||
*/
|
||||
if (!core->primed && pending_frames < hw->samples / 2) {
|
||||
inInputTime = 0;
|
||||
coreaudio_buf_unlock (core, "audioDeviceIOProc(priming)");
|
||||
return 0;
|
||||
}
|
||||
core->primed = true;
|
||||
|
||||
/* if there are not enough samples, set signal and return */
|
||||
if (pending_frames < frameCount) {
|
||||
core->primed = false;
|
||||
inInputTime = 0;
|
||||
coreaudio_buf_unlock (core, "audioDeviceIOProc(empty)");
|
||||
return 0;
|
||||
@@ -370,10 +355,7 @@ static OSStatus audioDeviceIOProc(
|
||||
static OSStatus init_out_device(coreaudioVoiceOut *core)
|
||||
{
|
||||
OSStatus status;
|
||||
AudioDeviceID deviceID;
|
||||
AudioValueRange frameRange;
|
||||
UInt32 audioDevicePropertyBufferFrameSize;
|
||||
AudioDeviceIOProcID ioprocid;
|
||||
|
||||
AudioStreamBasicDescription streamBasicDescription = {
|
||||
.mBitsPerChannel = core->hw.info.bits,
|
||||
@@ -386,19 +368,20 @@ static OSStatus init_out_device(coreaudioVoiceOut *core)
|
||||
.mSampleRate = core->hw.info.freq
|
||||
};
|
||||
|
||||
status = coreaudio_get_voice(&deviceID);
|
||||
status = coreaudio_get_voice(&core->outputDeviceID);
|
||||
if (status != kAudioHardwareNoError) {
|
||||
coreaudio_playback_logerr (status,
|
||||
"Could not get default output Device\n");
|
||||
return status;
|
||||
}
|
||||
if (deviceID == kAudioDeviceUnknown) {
|
||||
if (core->outputDeviceID == kAudioDeviceUnknown) {
|
||||
dolog ("Could not initialize playback - Unknown Audiodevice\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
/* get minimum and maximum buffer frame sizes */
|
||||
status = coreaudio_get_framesizerange(deviceID, &frameRange);
|
||||
status = coreaudio_get_framesizerange(core->outputDeviceID,
|
||||
&frameRange);
|
||||
if (status == kAudioHardwareBadObjectError) {
|
||||
return 0;
|
||||
}
|
||||
@@ -409,31 +392,31 @@ static OSStatus init_out_device(coreaudioVoiceOut *core)
|
||||
}
|
||||
|
||||
if (frameRange.mMinimum > core->frameSizeSetting) {
|
||||
audioDevicePropertyBufferFrameSize = (UInt32) frameRange.mMinimum;
|
||||
core->audioDevicePropertyBufferFrameSize = (UInt32) frameRange.mMinimum;
|
||||
dolog ("warning: Upsizing Buffer Frames to %f\n", frameRange.mMinimum);
|
||||
} else if (frameRange.mMaximum < core->frameSizeSetting) {
|
||||
audioDevicePropertyBufferFrameSize = (UInt32) frameRange.mMaximum;
|
||||
core->audioDevicePropertyBufferFrameSize = (UInt32) frameRange.mMaximum;
|
||||
dolog ("warning: Downsizing Buffer Frames to %f\n", frameRange.mMaximum);
|
||||
} else {
|
||||
audioDevicePropertyBufferFrameSize = core->frameSizeSetting;
|
||||
core->audioDevicePropertyBufferFrameSize = core->frameSizeSetting;
|
||||
}
|
||||
|
||||
/* set Buffer Frame Size */
|
||||
status = coreaudio_set_framesize(deviceID,
|
||||
&audioDevicePropertyBufferFrameSize);
|
||||
status = coreaudio_set_framesize(core->outputDeviceID,
|
||||
&core->audioDevicePropertyBufferFrameSize);
|
||||
if (status == kAudioHardwareBadObjectError) {
|
||||
return 0;
|
||||
}
|
||||
if (status != kAudioHardwareNoError) {
|
||||
coreaudio_playback_logerr (status,
|
||||
"Could not set device buffer frame size %" PRIu32 "\n",
|
||||
(uint32_t)audioDevicePropertyBufferFrameSize);
|
||||
(uint32_t)core->audioDevicePropertyBufferFrameSize);
|
||||
return status;
|
||||
}
|
||||
|
||||
/* get Buffer Frame Size */
|
||||
status = coreaudio_get_framesize(deviceID,
|
||||
&audioDevicePropertyBufferFrameSize);
|
||||
status = coreaudio_get_framesize(core->outputDeviceID,
|
||||
&core->audioDevicePropertyBufferFrameSize);
|
||||
if (status == kAudioHardwareBadObjectError) {
|
||||
return 0;
|
||||
}
|
||||
@@ -442,9 +425,11 @@ static OSStatus init_out_device(coreaudioVoiceOut *core)
|
||||
"Could not get device buffer frame size\n");
|
||||
return status;
|
||||
}
|
||||
core->hw.samples = core->bufferCount * core->audioDevicePropertyBufferFrameSize;
|
||||
|
||||
/* set Samplerate */
|
||||
status = coreaudio_set_streamformat(deviceID, &streamBasicDescription);
|
||||
status = coreaudio_set_streamformat(core->outputDeviceID,
|
||||
&streamBasicDescription);
|
||||
if (status == kAudioHardwareBadObjectError) {
|
||||
return 0;
|
||||
}
|
||||
@@ -452,6 +437,7 @@ static OSStatus init_out_device(coreaudioVoiceOut *core)
|
||||
coreaudio_playback_logerr (status,
|
||||
"Could not set samplerate %lf\n",
|
||||
streamBasicDescription.mSampleRate);
|
||||
core->outputDeviceID = kAudioDeviceUnknown;
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -465,25 +451,20 @@ static OSStatus init_out_device(coreaudioVoiceOut *core)
|
||||
* Therefore, the specified callback must be designed to avoid a deadlock
|
||||
* with the callers of AudioObjectGetPropertyData.
|
||||
*/
|
||||
ioprocid = NULL;
|
||||
status = AudioDeviceCreateIOProcID(deviceID,
|
||||
core->ioprocid = NULL;
|
||||
status = AudioDeviceCreateIOProcID(core->outputDeviceID,
|
||||
audioDeviceIOProc,
|
||||
&core->hw,
|
||||
&ioprocid);
|
||||
&core->ioprocid);
|
||||
if (status == kAudioHardwareBadDeviceError) {
|
||||
return 0;
|
||||
}
|
||||
if (status != kAudioHardwareNoError || ioprocid == NULL) {
|
||||
if (status != kAudioHardwareNoError || core->ioprocid == NULL) {
|
||||
coreaudio_playback_logerr (status, "Could not set IOProc\n");
|
||||
core->outputDeviceID = kAudioDeviceUnknown;
|
||||
return status;
|
||||
}
|
||||
|
||||
core->outputDeviceID = deviceID;
|
||||
core->audioDevicePropertyBufferFrameSize = audioDevicePropertyBufferFrameSize;
|
||||
core->hw.samples = core->bufferCount * core->audioDevicePropertyBufferFrameSize;
|
||||
audio_generic_initialize_buffer_out(&core->hw);
|
||||
core->ioprocid = ioprocid;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -567,9 +548,7 @@ static OSStatus handle_voice_change(
|
||||
fini_out_device(core);
|
||||
}
|
||||
|
||||
init_out_device(core);
|
||||
|
||||
if (core->outputDeviceID) {
|
||||
if (!init_out_device(core)) {
|
||||
update_device_playback_state(core);
|
||||
}
|
||||
|
||||
@@ -657,9 +636,6 @@ static void coreaudio_enable_out(HWVoiceOut *hw, bool enable)
|
||||
coreaudioVoiceOut *core = (coreaudioVoiceOut *) hw;
|
||||
|
||||
core->enabled = enable;
|
||||
if (enable) {
|
||||
core->primed = false;
|
||||
}
|
||||
update_device_playback_state(core);
|
||||
}
|
||||
|
||||
|
||||
+4
-25
@@ -43,10 +43,9 @@
|
||||
|
||||
#define DBUS_DISPLAY1_AUDIO_PATH DBUS_DISPLAY1_ROOT "/Audio"
|
||||
|
||||
#define DBUS_DEFAULT_AUDIO_NSAMPLES 480
|
||||
#define DBUS_AUDIO_NSAMPLES 1024 /* could be configured? */
|
||||
|
||||
typedef struct DBusAudio {
|
||||
Audiodev *dev;
|
||||
GDBusObjectManagerServer *server;
|
||||
bool p2p;
|
||||
GDBusObjectSkeleton *audio;
|
||||
@@ -152,18 +151,6 @@ dbus_init_out_listener(QemuDBusDisplay1AudioOutListener *listener,
|
||||
G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static guint
|
||||
dbus_audio_get_nsamples(DBusAudio *da)
|
||||
{
|
||||
AudiodevDBusOptions *opts = &da->dev->u.dbus;
|
||||
|
||||
if (opts->has_nsamples && opts->nsamples) {
|
||||
return opts->nsamples;
|
||||
} else {
|
||||
return DBUS_DEFAULT_AUDIO_NSAMPLES;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
dbus_init_out(HWVoiceOut *hw, struct audsettings *as, void *drv_opaque)
|
||||
{
|
||||
@@ -173,7 +160,7 @@ dbus_init_out(HWVoiceOut *hw, struct audsettings *as, void *drv_opaque)
|
||||
QemuDBusDisplay1AudioOutListener *listener = NULL;
|
||||
|
||||
audio_pcm_init_info(&hw->info, as);
|
||||
hw->samples = dbus_audio_get_nsamples(da);
|
||||
hw->samples = DBUS_AUDIO_NSAMPLES;
|
||||
audio_rate_start(&vo->rate);
|
||||
|
||||
g_hash_table_iter_init(&iter, da->out_listeners);
|
||||
@@ -287,7 +274,7 @@ dbus_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque)
|
||||
QemuDBusDisplay1AudioInListener *listener = NULL;
|
||||
|
||||
audio_pcm_init_info(&hw->info, as);
|
||||
hw->samples = dbus_audio_get_nsamples(da);
|
||||
hw->samples = DBUS_AUDIO_NSAMPLES;
|
||||
audio_rate_start(&vo->rate);
|
||||
|
||||
g_hash_table_iter_init(&iter, da->in_listeners);
|
||||
@@ -412,7 +399,6 @@ dbus_audio_init(Audiodev *dev, Error **errp)
|
||||
{
|
||||
DBusAudio *da = g_new0(DBusAudio, 1);
|
||||
|
||||
da->dev = dev;
|
||||
da->out_listeners = g_hash_table_new_full(g_str_hash, g_str_equal,
|
||||
g_free, g_object_unref);
|
||||
da->in_listeners = g_hash_table_new_full(g_str_hash, g_str_equal,
|
||||
@@ -538,17 +524,11 @@ dbus_audio_register_listener(AudioState *s,
|
||||
);
|
||||
}
|
||||
|
||||
GDBusConnectionFlags flags =
|
||||
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER;
|
||||
#ifdef WIN32
|
||||
flags |= G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS;
|
||||
#endif
|
||||
|
||||
listener_conn =
|
||||
g_dbus_connection_new_sync(
|
||||
G_IO_STREAM(socket_conn),
|
||||
guid,
|
||||
flags,
|
||||
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER,
|
||||
NULL, NULL, &err);
|
||||
if (err) {
|
||||
error_report("Failed to setup peer connection: %s", err->message);
|
||||
@@ -666,7 +646,6 @@ dbus_audio_set_server(AudioState *s, GDBusObjectManagerServer *server, bool p2p)
|
||||
"swapped-signal::handle-register-out-listener",
|
||||
dbus_audio_register_out_listener, s,
|
||||
NULL);
|
||||
qemu_dbus_display1_audio_set_nsamples(da->iface, dbus_audio_get_nsamples(da));
|
||||
|
||||
g_dbus_object_skeleton_add_interface(G_DBUS_OBJECT_SKELETON(da->audio),
|
||||
G_DBUS_INTERFACE_SKELETON(da->iface));
|
||||
|
||||
+2
-2
@@ -28,8 +28,8 @@
|
||||
#include "qemu/filemonitor.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "qapi/qapi-visit-authz.h"
|
||||
#include "qobject/qjson.h"
|
||||
#include "qobject/qobject.h"
|
||||
#include "qapi/qmp/qjson.h"
|
||||
#include "qapi/qmp/qobject.h"
|
||||
#include "qapi/qobject-input-visitor.h"
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#include "system/confidential-guest-support.h"
|
||||
#include "exec/confidential-guest-support.h"
|
||||
|
||||
OBJECT_DEFINE_ABSTRACT_TYPE(ConfidentialGuestSupport,
|
||||
confidential_guest_support,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/cryptodev.h"
|
||||
#include "sysemu/cryptodev.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "standard-headers/linux/virtio_crypto.h"
|
||||
@@ -53,8 +53,6 @@ typedef struct CryptoDevBackendBuiltinSession {
|
||||
|
||||
#define CRYPTODEV_BUITLIN_MAX_AUTH_KEY_LEN 512
|
||||
#define CRYPTODEV_BUITLIN_MAX_CIPHER_KEY_LEN 64
|
||||
/* demonstration purposes only, use a limited size to avoid QEMU OOM */
|
||||
#define CRYPTODEV_BUITLIN_MAX_REQUEST_SIZE (1024 * 1024)
|
||||
|
||||
struct CryptoDevBackendBuiltin {
|
||||
CryptoDevBackend parent_obj;
|
||||
@@ -100,7 +98,12 @@ static void cryptodev_builtin_init(
|
||||
1u << QCRYPTODEV_BACKEND_SERVICE_TYPE_MAC;
|
||||
backend->conf.cipher_algo_l = 1u << VIRTIO_CRYPTO_CIPHER_AES_CBC;
|
||||
backend->conf.hash_algo = 1u << VIRTIO_CRYPTO_HASH_SHA1;
|
||||
backend->conf.max_size = CRYPTODEV_BUITLIN_MAX_REQUEST_SIZE;
|
||||
/*
|
||||
* Set the Maximum length of crypto request.
|
||||
* Why this value? Just avoid to overflow when
|
||||
* memory allocation for each crypto request.
|
||||
*/
|
||||
backend->conf.max_size = LONG_MAX - sizeof(CryptoDevBackendOpInfo);
|
||||
backend->conf.max_cipher_key_len = CRYPTODEV_BUITLIN_MAX_CIPHER_KEY_LEN;
|
||||
backend->conf.max_auth_key_len = CRYPTODEV_BUITLIN_MAX_AUTH_KEY_LEN;
|
||||
cryptodev_builtin_init_akcipher(backend);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qapi/qapi-commands-cryptodev.h"
|
||||
#include "qobject/qdict.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
|
||||
|
||||
void hmp_info_cryptodev(Monitor *mon, const QDict *qdict)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/queue.h"
|
||||
#include "qom/object.h"
|
||||
#include "system/cryptodev.h"
|
||||
#include "sysemu/cryptodev.h"
|
||||
#include "standard-headers/linux/virtio_crypto.h"
|
||||
|
||||
#include <keyutils.h>
|
||||
@@ -330,8 +330,6 @@ static void cryptodev_lkcf_execute_task(CryptoDevLKCFTask *task)
|
||||
cryptodev_lkcf_set_op_desc(&session->akcipher_opts, op_desc,
|
||||
sizeof(op_desc), &local_error) != 0) {
|
||||
error_report_err(local_error);
|
||||
status = -VIRTIO_CRYPTO_ERR;
|
||||
goto out;
|
||||
} else {
|
||||
key_id = add_key(KCTL_KEY_TYPE_PKEY, "lkcf-backend-priv-key",
|
||||
p8info, p8info_len, KCTL_KEY_RING);
|
||||
@@ -348,7 +346,6 @@ static void cryptodev_lkcf_execute_task(CryptoDevLKCFTask *task)
|
||||
session->key, session->keylen,
|
||||
&local_error);
|
||||
if (!akcipher) {
|
||||
error_report_err(local_error);
|
||||
status = -VIRTIO_CRYPTO_ERR;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/virtio/vhost-user.h"
|
||||
#include "standard-headers/linux/virtio_crypto.h"
|
||||
#include "system/cryptodev-vhost.h"
|
||||
#include "sysemu/cryptodev-vhost.h"
|
||||
#include "chardev/char-fe.h"
|
||||
#include "system/cryptodev-vhost-user.h"
|
||||
#include "sysemu/cryptodev-vhost-user.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/virtio/virtio-bus.h"
|
||||
#include "system/cryptodev-vhost.h"
|
||||
#include "sysemu/cryptodev-vhost.h"
|
||||
|
||||
#ifdef CONFIG_VHOST_CRYPTO
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/virtio/virtio-crypto.h"
|
||||
#include "system/cryptodev-vhost-user.h"
|
||||
#include "sysemu/cryptodev-vhost-user.h"
|
||||
|
||||
uint64_t
|
||||
cryptodev_vhost_get_max_queues(
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/cryptodev.h"
|
||||
#include "system/stats.h"
|
||||
#include "sysemu/cryptodev.h"
|
||||
#include "sysemu/stats.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-cryptodev.h"
|
||||
#include "qapi/qapi-types-stats.h"
|
||||
@@ -97,7 +97,7 @@ static int qmp_query_cryptodev_foreach(Object *obj, void *data)
|
||||
QCryptodevInfoList *qmp_query_cryptodev(Error **errp)
|
||||
{
|
||||
QCryptodevInfoList *list = NULL;
|
||||
Object *objs = object_get_container("objects");
|
||||
Object *objs = container_get(object_get_root(), "/objects");
|
||||
|
||||
object_child_foreach(objs, qmp_query_cryptodev_foreach, &list);
|
||||
|
||||
@@ -557,7 +557,7 @@ static void cryptodev_backend_stats_cb(StatsResultList **result,
|
||||
switch (target) {
|
||||
case STATS_TARGET_CRYPTODEV:
|
||||
{
|
||||
Object *objs = object_get_container("objects");
|
||||
Object *objs = container_get(object_get_root(), "/objects");
|
||||
StatsArgs stats_args;
|
||||
stats_args.result.stats = result;
|
||||
stats_args.names = names;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/host_iommu_device.h"
|
||||
#include "sysemu/host_iommu_device.h"
|
||||
|
||||
OBJECT_DEFINE_ABSTRACT_TYPE(HostIOMMUDevice,
|
||||
host_iommu_device,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "qapi/error.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "hw/i386/hostmem-epc.h"
|
||||
|
||||
static bool
|
||||
@@ -36,7 +36,7 @@ sgx_epc_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
|
||||
backend->aligned = true;
|
||||
name = object_get_canonical_path(OBJECT(backend));
|
||||
ram_flags = (backend->share ? RAM_SHARED : RAM_PRIVATE) | RAM_PROTECTED;
|
||||
ram_flags = (backend->share ? RAM_SHARED : 0) | RAM_PROTECTED;
|
||||
return memory_region_init_ram_from_fd(&backend->mr, OBJECT(backend), name,
|
||||
backend->size, ram_flags, fd, 0, errp);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/madvise.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "qom/object.h"
|
||||
#include "qapi/visitor.h"
|
||||
@@ -82,7 +82,7 @@ file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
|
||||
backend->aligned = true;
|
||||
name = host_memory_backend_get_name(backend);
|
||||
ram_flags = backend->share ? RAM_SHARED : RAM_PRIVATE;
|
||||
ram_flags = backend->share ? RAM_SHARED : 0;
|
||||
ram_flags |= fb->readonly ? RAM_READONLY_FD : 0;
|
||||
ram_flags |= fb->rom == ON_OFF_AUTO_ON ? RAM_READONLY : 0;
|
||||
ram_flags |= backend->reserve ? 0 : RAM_NORESERVE;
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "qemu/memfd.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qom/object.h"
|
||||
#include "migration/cpr.h"
|
||||
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(HostMemoryBackendMemfd, MEMORY_BACKEND_MEMFD)
|
||||
|
||||
@@ -34,19 +33,15 @@ static bool
|
||||
memfd_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
{
|
||||
HostMemoryBackendMemfd *m = MEMORY_BACKEND_MEMFD(backend);
|
||||
g_autofree char *name = host_memory_backend_get_name(backend);
|
||||
int fd = cpr_find_fd(name, 0);
|
||||
g_autofree char *name = NULL;
|
||||
uint32_t ram_flags;
|
||||
int fd;
|
||||
|
||||
if (!backend->size) {
|
||||
error_setg(errp, "can't create backend with size 0");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fd >= 0) {
|
||||
goto have_fd;
|
||||
}
|
||||
|
||||
fd = qemu_memfd_create(TYPE_MEMORY_BACKEND_MEMFD, backend->size,
|
||||
m->hugetlb, m->hugetlbsize, m->seal ?
|
||||
F_SEAL_GROW | F_SEAL_SHRINK | F_SEAL_SEAL : 0,
|
||||
@@ -54,11 +49,10 @@ memfd_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
if (fd == -1) {
|
||||
return false;
|
||||
}
|
||||
cpr_save_fd(name, 0, fd);
|
||||
|
||||
have_fd:
|
||||
backend->aligned = true;
|
||||
ram_flags = backend->share ? RAM_SHARED : RAM_PRIVATE;
|
||||
name = host_memory_backend_get_name(backend);
|
||||
ram_flags = backend->share ? RAM_SHARED : 0;
|
||||
ram_flags |= backend->reserve ? 0 : RAM_NORESERVE;
|
||||
ram_flags |= backend->guest_memfd ? RAM_GUEST_MEMFD : 0;
|
||||
return memory_region_init_ram_from_fd(&backend->mr, OBJECT(backend), name,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
@@ -28,7 +28,7 @@ ram_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
}
|
||||
|
||||
name = host_memory_backend_get_name(backend);
|
||||
ram_flags = backend->share ? RAM_SHARED : RAM_PRIVATE;
|
||||
ram_flags = backend->share ? RAM_SHARED : 0;
|
||||
ram_flags |= backend->reserve ? 0 : RAM_NORESERVE;
|
||||
ram_flags |= backend->guest_memfd ? RAM_GUEST_MEMFD : 0;
|
||||
return memory_region_init_ram_flags_nomigrate(&backend->mr, OBJECT(backend),
|
||||
|
||||
+42
-12
@@ -11,9 +11,8 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "qapi/error.h"
|
||||
#include "migration/cpr.h"
|
||||
|
||||
#define TYPE_MEMORY_BACKEND_SHM "memory-backend-shm"
|
||||
|
||||
@@ -26,9 +25,11 @@ struct HostMemoryBackendShm {
|
||||
static bool
|
||||
shm_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
{
|
||||
g_autofree char *backend_name = host_memory_backend_get_name(backend);
|
||||
g_autoptr(GString) shm_name = g_string_new(NULL);
|
||||
g_autofree char *backend_name = NULL;
|
||||
uint32_t ram_flags;
|
||||
int fd = cpr_find_fd(backend_name, 0);
|
||||
int fd, oflag;
|
||||
mode_t mode;
|
||||
|
||||
if (!backend->size) {
|
||||
error_setg(errp, "can't create shm backend with size 0");
|
||||
@@ -40,21 +41,50 @@ shm_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fd >= 0) {
|
||||
goto have_fd;
|
||||
}
|
||||
/*
|
||||
* Let's use `mode = 0` because we don't want other processes to open our
|
||||
* memory unless we share the file descriptor with them.
|
||||
*/
|
||||
mode = 0;
|
||||
oflag = O_RDWR | O_CREAT | O_EXCL;
|
||||
backend_name = host_memory_backend_get_name(backend);
|
||||
|
||||
fd = qemu_shm_alloc(backend->size, errp);
|
||||
/*
|
||||
* Some operating systems allow creating anonymous POSIX shared memory
|
||||
* objects (e.g. FreeBSD provides the SHM_ANON constant), but this is not
|
||||
* defined by POSIX, so let's create a unique name.
|
||||
*
|
||||
* From Linux's shm_open(3) man-page:
|
||||
* For portable use, a shared memory object should be identified
|
||||
* by a name of the form /somename;"
|
||||
*/
|
||||
g_string_printf(shm_name, "/qemu-" FMT_pid "-shm-%s", getpid(),
|
||||
backend_name);
|
||||
|
||||
fd = shm_open(shm_name->str, oflag, mode);
|
||||
if (fd < 0) {
|
||||
error_setg_errno(errp, errno,
|
||||
"failed to create POSIX shared memory");
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* We have the file descriptor, so we no longer need to expose the
|
||||
* POSIX shared memory object. However it will remain allocated as long as
|
||||
* there are file descriptors pointing to it.
|
||||
*/
|
||||
shm_unlink(shm_name->str);
|
||||
|
||||
if (ftruncate(fd, backend->size) == -1) {
|
||||
error_setg_errno(errp, errno,
|
||||
"failed to resize POSIX shared memory to %" PRIu64,
|
||||
backend->size);
|
||||
close(fd);
|
||||
return false;
|
||||
}
|
||||
cpr_save_fd(backend_name, 0, fd);
|
||||
|
||||
have_fd:
|
||||
/* Let's do the same as memory-backend-ram,share=on would do. */
|
||||
ram_flags = RAM_SHARED;
|
||||
ram_flags |= backend->reserve ? 0 : RAM_NORESERVE;
|
||||
ram_flags |= backend->guest_memfd ? RAM_GUEST_MEMFD : 0;
|
||||
|
||||
return memory_region_init_ram_from_fd(&backend->mr, OBJECT(backend),
|
||||
backend_name, backend->size,
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/hostmem.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
#include "hw/boards.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-visit.h"
|
||||
|
||||
+4
-1
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/iommufd.h"
|
||||
#include "sysemu/iommufd.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
@@ -167,6 +167,8 @@ int iommufd_backend_map_dma(IOMMUFDBackend *be, uint32_t ioas_id, hwaddr iova,
|
||||
/* TODO: Not support mapping hardware PCI BAR region for now. */
|
||||
if (errno == EFAULT) {
|
||||
warn_report("IOMMU_IOAS_MAP failed: %m, PCI BAR?");
|
||||
} else {
|
||||
error_report("IOMMU_IOAS_MAP failed: %m");
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@@ -201,6 +203,7 @@ int iommufd_backend_unmap_dma(IOMMUFDBackend *be, uint32_t ioas_id,
|
||||
|
||||
if (ret) {
|
||||
ret = -errno;
|
||||
error_report("IOMMU_IOAS_UNMAP failed: %m");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/rng.h"
|
||||
#include "sysemu/rng.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/guest-random.h"
|
||||
#include "qom/object.h"
|
||||
#include "system/replay.h"
|
||||
#include "sysemu/replay.h"
|
||||
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(RngBuiltin, RNG_BUILTIN)
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/rng.h"
|
||||
#include "sysemu/rng.h"
|
||||
#include "chardev/char-fe.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/rng-random.h"
|
||||
#include "system/rng.h"
|
||||
#include "sysemu/rng-random.h"
|
||||
#include "sysemu/rng.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "qemu/main-loop.h"
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/rng.h"
|
||||
#include "sysemu/rng.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/spdm-socket.h"
|
||||
#include "sysemu/spdm-socket.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
static bool read_bytes(const int socket, uint8_t *buffer,
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/tpm_backend.h"
|
||||
#include "sysemu/tpm_backend.h"
|
||||
#include "qapi/error.h"
|
||||
#include "system/tpm.h"
|
||||
#include "sysemu/tpm.h"
|
||||
#include "qemu/thread.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/module.h"
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#include "qemu/sockets.h"
|
||||
#include "qemu/lockable.h"
|
||||
#include "io/channel-socket.h"
|
||||
#include "system/runstate.h"
|
||||
#include "system/tpm_backend.h"
|
||||
#include "system/tpm_util.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "sysemu/tpm_backend.h"
|
||||
#include "sysemu/tpm_util.h"
|
||||
#include "tpm_int.h"
|
||||
#include "tpm_ioctl.h"
|
||||
#include "migration/blocker.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define BACKENDS_TPM_INT_H
|
||||
|
||||
#include "qemu/option.h"
|
||||
#include "system/tpm.h"
|
||||
#include "sysemu/tpm.h"
|
||||
|
||||
#define TPM_STANDARD_CMDLINE_OPTS \
|
||||
{ \
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/sockets.h"
|
||||
#include "system/tpm_backend.h"
|
||||
#include "system/tpm_util.h"
|
||||
#include "sysemu/tpm_backend.h"
|
||||
#include "sysemu/tpm_util.h"
|
||||
#include "tpm_int.h"
|
||||
#include "qapi/clone-visitor.h"
|
||||
#include "qapi/qapi-visit-tpm.h"
|
||||
@@ -211,7 +211,7 @@ static size_t tpm_passthrough_get_buffer_size(TPMBackend *tb)
|
||||
static int tpm_passthrough_open_sysfs_cancel(TPMPassthruState *tpm_pt)
|
||||
{
|
||||
int fd = -1;
|
||||
const char *dev;
|
||||
char *dev;
|
||||
char path[PATH_MAX];
|
||||
|
||||
if (tpm_pt->options->cancel_path) {
|
||||
|
||||
+21
-17
@@ -21,14 +21,13 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "tpm_int.h"
|
||||
#include "exec/memory.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "system/tpm_backend.h"
|
||||
#include "system/tpm_util.h"
|
||||
#include "sysemu/tpm_backend.h"
|
||||
#include "sysemu/tpm_util.h"
|
||||
#include "trace.h"
|
||||
|
||||
/* tpm backend property */
|
||||
@@ -47,7 +46,7 @@ static void get_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
|
||||
static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
|
||||
Error **errp)
|
||||
{
|
||||
const Property *prop = opaque;
|
||||
Property *prop = opaque;
|
||||
TPMBackend *s, **be = object_field_prop_ptr(obj, prop);
|
||||
char *str;
|
||||
|
||||
@@ -67,7 +66,7 @@ static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
|
||||
|
||||
static void release_tpm(Object *obj, const char *name, void *opaque)
|
||||
{
|
||||
const Property *prop = opaque;
|
||||
Property *prop = opaque;
|
||||
TPMBackend **be = object_field_prop_ptr(obj, prop);
|
||||
|
||||
if (*be) {
|
||||
@@ -76,7 +75,7 @@ static void release_tpm(Object *obj, const char *name, void *opaque)
|
||||
}
|
||||
|
||||
const PropertyInfo qdev_prop_tpm = {
|
||||
.type = "str",
|
||||
.name = "str",
|
||||
.description = "ID of a tpm to use as a backend",
|
||||
.get = get_tpm,
|
||||
.set = set_tpm,
|
||||
@@ -337,8 +336,8 @@ void tpm_sized_buffer_reset(TPMSizedBuffer *tsb)
|
||||
void tpm_util_show_buffer(const unsigned char *buffer,
|
||||
size_t buffer_size, const char *string)
|
||||
{
|
||||
g_autoptr(GString) str = NULL;
|
||||
size_t len, i, l;
|
||||
size_t len, i;
|
||||
char *line_buffer, *p;
|
||||
|
||||
if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER_CONTENT)) {
|
||||
return;
|
||||
@@ -346,14 +345,19 @@ void tpm_util_show_buffer(const unsigned char *buffer,
|
||||
len = MIN(tpm_cmd_get_size(buffer), buffer_size);
|
||||
trace_tpm_util_show_buffer_header(string, len);
|
||||
|
||||
for (i = 0; i < len; i += l) {
|
||||
if (str) {
|
||||
g_string_append_c(str, '\n');
|
||||
}
|
||||
l = MIN(len, 16);
|
||||
str = qemu_hexdump_line(str, buffer, l, 1, 0);
|
||||
}
|
||||
/*
|
||||
* allocate enough room for 3 chars per buffer entry plus a
|
||||
* newline after every 16 chars and a final null terminator.
|
||||
*/
|
||||
line_buffer = g_malloc(len * 3 + (len / 16) + 1);
|
||||
|
||||
g_string_ascii_up(str);
|
||||
trace_tpm_util_show_buffer_content(str->str);
|
||||
for (i = 0, p = line_buffer; i < len; i++) {
|
||||
if (i && !(i % 16)) {
|
||||
p += sprintf(p, "\n");
|
||||
}
|
||||
p += sprintf(p, "%.2X ", buffer[i]);
|
||||
}
|
||||
trace_tpm_util_show_buffer_content(line_buffer);
|
||||
|
||||
g_free(line_buffer);
|
||||
}
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "system/vhost-user-backend.h"
|
||||
#include "system/kvm.h"
|
||||
#include "sysemu/vhost-user-backend.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "io/channel-command.h"
|
||||
#include "hw/virtio/virtio-bus.h"
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qobject/qdict.h"
|
||||
#include "qobject/qjson.h"
|
||||
#include "qobject/qnull.h"
|
||||
#include "qobject/qstring.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "qapi/qmp/qjson.h"
|
||||
#include "qapi/qmp/qnull.h"
|
||||
#include "qapi/qmp/qstring.h"
|
||||
#include "qapi/qobject-output-visitor.h"
|
||||
#include "qapi/qapi-visit-block-core.h"
|
||||
#include "system/block-backend.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "qemu/notify.h"
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/coroutine.h"
|
||||
@@ -1573,10 +1573,6 @@ static void update_flags_from_options(int *flags, QemuOpts *opts)
|
||||
if (qemu_opt_get_bool_del(opts, BDRV_OPT_AUTO_READ_ONLY, false)) {
|
||||
*flags |= BDRV_O_AUTO_RDONLY;
|
||||
}
|
||||
|
||||
if (!qemu_opt_get_bool_del(opts, BDRV_OPT_ACTIVE, true)) {
|
||||
*flags |= BDRV_O_INACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
static void update_options_from_flags(QDict *options, int flags)
|
||||
@@ -1803,11 +1799,6 @@ QemuOptsList bdrv_runtime_opts = {
|
||||
.type = QEMU_OPT_BOOL,
|
||||
.help = "Ignore flush requests",
|
||||
},
|
||||
{
|
||||
.name = BDRV_OPT_ACTIVE,
|
||||
.type = QEMU_OPT_BOOL,
|
||||
.help = "Node is activated",
|
||||
},
|
||||
{
|
||||
.name = BDRV_OPT_READ_ONLY,
|
||||
.type = QEMU_OPT_BOOL,
|
||||
@@ -3086,13 +3077,6 @@ bdrv_attach_child_common(BlockDriverState *child_bs,
|
||||
assert(child_class->get_parent_desc);
|
||||
GLOBAL_STATE_CODE();
|
||||
|
||||
if (bdrv_is_inactive(child_bs) && (perm & ~BLK_PERM_CONSISTENT_READ)) {
|
||||
g_autofree char *perm_names = bdrv_perm_names(perm);
|
||||
error_setg(errp, "Permission '%s' unavailable on inactive node",
|
||||
perm_names);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
new_child = g_new(BdrvChild, 1);
|
||||
*new_child = (BdrvChild) {
|
||||
.bs = NULL,
|
||||
@@ -3199,11 +3183,6 @@ bdrv_attach_child_noperm(BlockDriverState *parent_bs,
|
||||
child_bs->node_name, child_name, parent_bs->node_name);
|
||||
return NULL;
|
||||
}
|
||||
if (bdrv_is_inactive(child_bs) && !bdrv_is_inactive(parent_bs)) {
|
||||
error_setg(errp, "Inactive '%s' can't be a %s child of active '%s'",
|
||||
child_bs->node_name, child_name, parent_bs->node_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bdrv_get_cumulative_perm(parent_bs, &perm, &shared_perm);
|
||||
bdrv_child_perm(parent_bs, child_bs, NULL, child_role, NULL,
|
||||
@@ -5377,13 +5356,17 @@ bdrv_replace_node_noperm(BlockDriverState *from,
|
||||
*
|
||||
* With auto_skip=false the error is returned if from has a parent which should
|
||||
* not be updated.
|
||||
*
|
||||
* With @detach_subchain=true @to must be in a backing chain of @from. In this
|
||||
* case backing link of the cow-parent of @to is removed.
|
||||
*/
|
||||
static int GRAPH_WRLOCK
|
||||
bdrv_replace_node_common(BlockDriverState *from, BlockDriverState *to,
|
||||
bool auto_skip, Error **errp)
|
||||
bool auto_skip, bool detach_subchain, Error **errp)
|
||||
{
|
||||
Transaction *tran = tran_new();
|
||||
g_autoptr(GSList) refresh_list = NULL;
|
||||
BlockDriverState *to_cow_parent = NULL;
|
||||
int ret;
|
||||
|
||||
GLOBAL_STATE_CODE();
|
||||
@@ -5392,6 +5375,17 @@ bdrv_replace_node_common(BlockDriverState *from, BlockDriverState *to,
|
||||
assert(to->quiesce_counter);
|
||||
assert(bdrv_get_aio_context(from) == bdrv_get_aio_context(to));
|
||||
|
||||
if (detach_subchain) {
|
||||
assert(bdrv_chain_contains(from, to));
|
||||
assert(from != to);
|
||||
for (to_cow_parent = from;
|
||||
bdrv_filter_or_cow_bs(to_cow_parent) != to;
|
||||
to_cow_parent = bdrv_filter_or_cow_bs(to_cow_parent))
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Do the replacement without permission update.
|
||||
* Replacement may influence the permissions, we should calculate new
|
||||
@@ -5403,6 +5397,11 @@ bdrv_replace_node_common(BlockDriverState *from, BlockDriverState *to,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (detach_subchain) {
|
||||
/* to_cow_parent is already drained because from is drained */
|
||||
bdrv_remove_child(bdrv_filter_or_cow_child(to_cow_parent), tran);
|
||||
}
|
||||
|
||||
refresh_list = g_slist_prepend(refresh_list, to);
|
||||
refresh_list = g_slist_prepend(refresh_list, from);
|
||||
|
||||
@@ -5421,7 +5420,7 @@ out:
|
||||
int bdrv_replace_node(BlockDriverState *from, BlockDriverState *to,
|
||||
Error **errp)
|
||||
{
|
||||
return bdrv_replace_node_common(from, to, true, errp);
|
||||
return bdrv_replace_node_common(from, to, true, false, errp);
|
||||
}
|
||||
|
||||
int bdrv_drop_filter(BlockDriverState *bs, Error **errp)
|
||||
@@ -5437,7 +5436,7 @@ int bdrv_drop_filter(BlockDriverState *bs, Error **errp)
|
||||
|
||||
bdrv_drained_begin(child_bs);
|
||||
bdrv_graph_wrlock();
|
||||
ret = bdrv_replace_node_common(bs, child_bs, true, errp);
|
||||
ret = bdrv_replace_node_common(bs, child_bs, true, true, errp);
|
||||
bdrv_graph_wrunlock();
|
||||
bdrv_drained_end(child_bs);
|
||||
|
||||
@@ -5894,7 +5893,17 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
|
||||
updated_children = g_slist_prepend(updated_children, c);
|
||||
}
|
||||
|
||||
bdrv_replace_node_common(top, base, false, &local_err);
|
||||
/*
|
||||
* It seems correct to pass detach_subchain=true here, but it triggers
|
||||
* one more yet not fixed bug, when due to nested aio_poll loop we switch to
|
||||
* another drained section, which modify the graph (for example, removing
|
||||
* the child, which we keep in updated_children list). So, it's a TODO.
|
||||
*
|
||||
* Note, bug triggered if pass detach_subchain=true here and run
|
||||
* test-bdrv-drain. test_drop_intermediate_poll() test-case will crash.
|
||||
* That's a FIXME.
|
||||
*/
|
||||
bdrv_replace_node_common(top, base, false, false, &local_err);
|
||||
bdrv_graph_wrunlock();
|
||||
|
||||
if (local_err) {
|
||||
@@ -6815,10 +6824,6 @@ void bdrv_init_with_whitelist(void)
|
||||
bdrv_init();
|
||||
}
|
||||
|
||||
bool bdrv_is_inactive(BlockDriverState *bs) {
|
||||
return bs->open_flags & BDRV_O_INACTIVE;
|
||||
}
|
||||
|
||||
int bdrv_activate(BlockDriverState *bs, Error **errp)
|
||||
{
|
||||
BdrvChild *child, *parent;
|
||||
@@ -6950,8 +6955,7 @@ bdrv_has_bds_parent(BlockDriverState *bs, bool only_active)
|
||||
return false;
|
||||
}
|
||||
|
||||
static int GRAPH_RDLOCK
|
||||
bdrv_inactivate_recurse(BlockDriverState *bs, bool top_level)
|
||||
static int GRAPH_RDLOCK bdrv_inactivate_recurse(BlockDriverState *bs)
|
||||
{
|
||||
BdrvChild *child, *parent;
|
||||
int ret;
|
||||
@@ -6969,14 +6973,7 @@ bdrv_inactivate_recurse(BlockDriverState *bs, bool top_level)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Inactivating an already inactive node on user request is harmless, but if
|
||||
* a child is already inactive before its parent, that's bad.
|
||||
*/
|
||||
if (bs->open_flags & BDRV_O_INACTIVE) {
|
||||
assert(top_level);
|
||||
return 0;
|
||||
}
|
||||
assert(!(bs->open_flags & BDRV_O_INACTIVE));
|
||||
|
||||
/* Inactivate this node */
|
||||
if (bs->drv->bdrv_inactivate) {
|
||||
@@ -7002,9 +6999,7 @@ bdrv_inactivate_recurse(BlockDriverState *bs, bool top_level)
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
bdrv_drained_begin(bs);
|
||||
bs->open_flags |= BDRV_O_INACTIVE;
|
||||
bdrv_drained_end(bs);
|
||||
|
||||
/*
|
||||
* Update permissions, they may differ for inactive nodes.
|
||||
@@ -7015,7 +7010,7 @@ bdrv_inactivate_recurse(BlockDriverState *bs, bool top_level)
|
||||
|
||||
/* Recursively inactivate children */
|
||||
QLIST_FOREACH(child, &bs->children, next) {
|
||||
ret = bdrv_inactivate_recurse(child->bs, false);
|
||||
ret = bdrv_inactivate_recurse(child->bs);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
@@ -7024,27 +7019,6 @@ bdrv_inactivate_recurse(BlockDriverState *bs, bool top_level)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bdrv_inactivate(BlockDriverState *bs, Error **errp)
|
||||
{
|
||||
int ret;
|
||||
|
||||
GLOBAL_STATE_CODE();
|
||||
GRAPH_RDLOCK_GUARD_MAINLOOP();
|
||||
|
||||
if (bdrv_has_bds_parent(bs, true)) {
|
||||
error_setg(errp, "Node has active parent node");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
ret = bdrv_inactivate_recurse(bs, true);
|
||||
if (ret < 0) {
|
||||
error_setg_errno(errp, -ret, "Failed to inactivate node");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bdrv_inactivate_all(void)
|
||||
{
|
||||
BlockDriverState *bs = NULL;
|
||||
@@ -7061,7 +7035,7 @@ int bdrv_inactivate_all(void)
|
||||
if (bdrv_has_bds_parent(bs, false)) {
|
||||
continue;
|
||||
}
|
||||
ret = bdrv_inactivate_recurse(bs, true);
|
||||
ret = bdrv_inactivate_recurse(bs);
|
||||
if (ret < 0) {
|
||||
bdrv_next_cleanup(&it);
|
||||
break;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
#include "block/accounting.h"
|
||||
#include "block/block_int.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "system/qtest.h"
|
||||
#include "sysemu/qtest.h"
|
||||
|
||||
static QEMUClockType clock_type = QEMU_CLOCK_REALTIME;
|
||||
static const int qtest_latency_ns = NANOSECONDS_PER_SECOND / 1000;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
#include "block/dirty-bitmap.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "system/block-backend.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "qemu/bitmap.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
|
||||
Loaded 100 of 3466 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user