[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 0d99d3: util: Add interval-tree.c
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 0d99d3: util: Add interval-tree.c |
Date: |
Wed, 21 Dec 2022 07:43:57 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 0d99d37a82f267395e97db2ece9b3880597253b2
https://github.com/qemu/qemu/commit/0d99d37a82f267395e97db2ece9b3880597253b2
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
A include/qemu/interval-tree.h
M tests/unit/meson.build
A tests/unit/test-interval-tree.c
A util/interval-tree.c
M util/meson.build
Log Message:
-----------
util: Add interval-tree.c
Copy and simplify the Linux kernel's interval_tree_generic.h,
instantiating for uint64_t.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: bf590a67dd7a92de89f5297fe87e48ad21f96194
https://github.com/qemu/qemu/commit/bf590a67dd7a92de89f5297fe87e48ad21f96194
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/tb-maint.c
Log Message:
-----------
accel/tcg: Rename page_flush_tb
Rename to tb_remove_all, to remove the PageDesc "page" from the name,
and to avoid suggesting a "flush" in the icache sense.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: a97d5d2c8be2aec5b2e3c81cde33506b3c029033
https://github.com/qemu/qemu/commit/a97d5d2c8be2aec5b2e3c81cde33506b3c029033
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
M accel/tcg/translate-all.c
M include/exec/exec-all.h
Log Message:
-----------
accel/tcg: Use interval tree for TBs in user-only mode
Begin weaning user-only away from PageDesc.
Since, for user-only, all TB (and page) manipulation is done with
a single mutex, and there is no virtual/physical discontinuity to
split a TB across discontinuous pages, place all of the TBs into
a single IntervalTree. This makes it trivial to find all of the
TBs intersecting a range.
Retain the existing PageDesc + linked list implementation for
system mode. Move the portion of the implementation that overlaps
the new user-only code behind the common ifdef.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: f88f3ac90f9e98333abf91f23c8547a428cd90fa
https://github.com/qemu/qemu/commit/f88f3ac90f9e98333abf91f23c8547a428cd90fa
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
M accel/tcg/user-exec.c
Log Message:
-----------
accel/tcg: Use interval tree for TARGET_PAGE_DATA_SIZE
Continue weaning user-only away from PageDesc.
Use an interval tree to record target data.
Chunk the data, to minimize allocation overhead.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 50d25c8aec3e495faee82f1732cc93f016967850
https://github.com/qemu/qemu/commit/50d25c8aec3e495faee82f1732cc93f016967850
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/translate-all.c
Log Message:
-----------
accel/tcg: Drop PAGE_RESERVED for CONFIG_BSD
Make bsd-user match linux-user in not marking host pages
as reserved. This isn't especially effective anyway, as
it doesn't take into account any heap memory that qemu
may allocate after startup.
Reviewed-by: Warner Losh <imp@bsdimp.com>
Tested-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: d941c086b818533a9332272609405334e59a6f27
https://github.com/qemu/qemu/commit/d941c086b818533a9332272609405334e59a6f27
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
M accel/tcg/translate-all.c
M accel/tcg/user-exec.c
Log Message:
-----------
accel/tcg: Move page_{get,set}_flags to user-exec.c
This page tracking implementation is specific to user-only,
since the system softmmu version is in cputlb.c. Move it
out of translate-all.c to user-exec.c.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 67ff2186b0a49d4e1ea0be2398548eae443762e4
https://github.com/qemu/qemu/commit/67ff2186b0a49d4e1ea0be2398548eae443762e4
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
M accel/tcg/user-exec.c
A tests/tcg/multiarch/test-vma.c
Log Message:
-----------
accel/tcg: Use interval tree for user-only page tracking
Finish weaning user-only away from PageDesc.
Using an interval tree to track page permissions means that
we can represent very large regions efficiently.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/290
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/967
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1214
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: babcbc220ba658b30a43da5e88284a499c17da3e
https://github.com/qemu/qemu/commit/babcbc220ba658b30a43da5e88284a499c17da3e
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
M accel/tcg/translate-all.c
Log Message:
-----------
accel/tcg: Move PageDesc tree into tb-maint.c for system
Now that PageDesc is not used for user-only, and for system
it is only used for tb maintenance, move the implementation
into tb-main.c appropriately ifdefed.
We have not yet eliminated all references to PageDesc for
user-only, so retain a typedef to the structure without definition.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 6ca5ac139fc47d689cff17a6111a21a51e52dfc4
https://github.com/qemu/qemu/commit/6ca5ac139fc47d689cff17a6111a21a51e52dfc4
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
M accel/tcg/translate-all.c
M include/exec/translate-all.h
Log Message:
-----------
accel/tcg: Move remainder of page locking to tb-maint.c
The only thing that still touches PageDesc in translate-all.c
are some locking routines related to tb-maint.c which have not
yet been moved. Do so now.
Move some code up in tb-maint.c as well, to untangle the maze
of ifdefs, and allow a sensible final ordering.
Move some declarations from exec/translate-all.h to internal.h,
as they are only used within accel/tcg/.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 38fc4b11e039eef922f61dad2a4574b6d39549da
https://github.com/qemu/qemu/commit/38fc4b11e039eef922f61dad2a4574b6d39549da
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
Log Message:
-----------
accel/tcg: Restrict cpu_io_recompile() to system emulation
Missed in commit 6526919224 ("accel/tcg: Restrict cpu_io_recompile()
from other accelerators").
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221209093649.43738-2-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 518077638f2bbbe3609bf49892b02e3b5ab7a05a
https://github.com/qemu/qemu/commit/518077638f2bbbe3609bf49892b02e3b5ab7a05a
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/cputlb.c
M accel/tcg/trace-events
M trace-events
Log Message:
-----------
accel/tcg: Remove trace events from trace-root.h
Commit d9bb58e510 ("tcg: move tcg related files into accel/tcg/
subdirectory") introduced accel/tcg/trace-events, so we don't
need to use the root trace-events anymore.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221209093649.43738-3-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: c9a5217bd39c51316015a662881fed36f52aea7b
https://github.com/qemu/qemu/commit/c9a5217bd39c51316015a662881fed36f52aea7b
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/cputlb.c
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
Log Message:
-----------
accel/tcg: Rename tb_invalidate_phys_page_fast{,__locked}()
Emphasize this function is called with pages locked.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221209093649.43738-4-philmd@linaro.org>
[rth: Use "__locked" suffix, to match other instances.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: f349e92e8edc66b6d4cfc4a0981da6d510fef683
https://github.com/qemu/qemu/commit/f349e92e8edc66b6d4cfc4a0981da6d510fef683
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/cputlb.c
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
Log Message:
-----------
accel/tcg: Factor tb_invalidate_phys_range_fast() out
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221209093649.43738-5-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 811242654934bd4613634235ef6a8219792ab088
https://github.com/qemu/qemu/commit/811242654934bd4613634235ef6a8219792ab088
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths:
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
Log Message:
-----------
accel/tcg: Restrict page_collection structure to system TB maintainance
Only the system emulation part of TB maintainance uses the
page_collection structure. Restrict its declaration (and the
functions requiring it) to tb-maint.c.
Convert the 'len' argument of tb_invalidate_phys_page_fast__locked()
from signed to unsigned.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221209093649.43738-6-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 700ce3b1bb52da4acbbf1ad8f6256baaf52c7953
https://github.com/qemu/qemu/commit/700ce3b1bb52da4acbbf1ad8f6256baaf52c7953
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2022-12-21 (Wed, 21 Dec 2022)
Changed paths:
M accel/tcg/cputlb.c
M accel/tcg/internal.h
M accel/tcg/tb-maint.c
M accel/tcg/trace-events
M accel/tcg/translate-all.c
M accel/tcg/user-exec.c
M include/exec/exec-all.h
M include/exec/translate-all.h
A include/qemu/interval-tree.h
A tests/tcg/multiarch/test-vma.c
M tests/unit/meson.build
A tests/unit/test-interval-tree.c
M trace-events
A util/interval-tree.c
M util/meson.build
Log Message:
-----------
Merge tag 'pull-tcg-20221220' of https://gitlab.com/rth7680/qemu into staging
Use interval trees for user-only vma mappings.
Assorted cleanups to page locking.
# gpg: Signature made Wed 21 Dec 2022 05:00:30 GMT
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
[full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* tag 'pull-tcg-20221220' of https://gitlab.com/rth7680/qemu:
accel/tcg: Restrict page_collection structure to system TB maintainance
accel/tcg: Factor tb_invalidate_phys_range_fast() out
accel/tcg: Rename tb_invalidate_phys_page_fast{,__locked}()
accel/tcg: Remove trace events from trace-root.h
accel/tcg: Restrict cpu_io_recompile() to system emulation
accel/tcg: Move remainder of page locking to tb-maint.c
accel/tcg: Move PageDesc tree into tb-maint.c for system
accel/tcg: Use interval tree for user-only page tracking
accel/tcg: Move page_{get,set}_flags to user-exec.c
accel/tcg: Drop PAGE_RESERVED for CONFIG_BSD
accel/tcg: Use interval tree for TARGET_PAGE_DATA_SIZE
accel/tcg: Use interval tree for TBs in user-only mode
accel/tcg: Rename page_flush_tb
util: Add interval-tree.c
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/6394578984da...700ce3b1bb52