From dfcce68857d5ab0c167019fc051fd82dea2f8e93 Mon Sep 17 00:00:00 2001 From: Hou haole Date: Thu, 7 Nov 2024 18:29:00 +0800 Subject: [PATCH 1/4] Use probe_access_full_mmu in ptw_translate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The probe_access_full_mmu function was designed for this purpose, and does not report the memory operation event to plugins. Cc: qemu-stable@nongnu.org Fixes: 6d03226 ("plugins: force slow path when plugins instrument memory ops") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-ID: <20241013184733.1423747-3-richard.henderson@linaro.org> (cherry picked from commit 115ade4) Signed-off-by: Michael Tokarev Signed-off-by: Hou haole --- target/i386/tcg/sysemu/excp_helper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 5b86f439ad..766cc67320 100644 --- a/target/i386/tcg/sysemu/excp_helper.c +++ b/target/i386/tcg/sysemu/excp_helper.c @@ -61,12 +61,13 @@ typedef struct PTETranslate { static bool ptw_translate(PTETranslate *inout, hwaddr addr) { - CPUTLBEntryFull *full; + int flags; inout->gaddr = addr; - flags = probe_access_full(inout->env, addr, 0, MMU_DATA_STORE, - inout->ptw_idx, true, &inout->haddr, &full, 0); + + flags = probe_access_full_mmu(inout->env, addr, 0, MMU_DATA_STORE, + inout->ptw_idx, &inout->haddr, NULL); if (unlikely(flags & TLB_INVALID_MASK)) { TranslateFault *err = inout->err; @@ -430,9 +431,8 @@ do_check_protect_pse36: CPUTLBEntryFull *full; int flags, nested_page_size; - flags = probe_access_full(env, paddr, 0, access_type, - MMU_NESTED_IDX, true, - &pte_trans.haddr, &full, 0); + flags = probe_access_full_mmu(env, paddr, 0, access_type, + MMU_NESTED_IDX, &pte_trans.haddr, &full); if (unlikely(flags & TLB_INVALID_MASK)) { *err = (TranslateFault){ .error_code = env->error_code, -- Gitee From 7268af0fba44a3225ecc0d68d836f3277fc0a287 Mon Sep 17 00:00:00 2001 From: Hou haole Date: Fri, 8 Nov 2024 14:05:24 +0800 Subject: [PATCH 2/4] gitlab: fix logic for changing docker tag on stable branches This fixes: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit e28112d Author: Daniel P. Berrangé Date: Thu Jun 8 17:40:16 2023 +0100 gitlab: stable staging branches publish containers in a separate tag Due to a copy+paste mistake, that commit included "QEMU_JOB_SKIPPED" in the final rule that was meant to be a 'catch all' for staging branches. As a result stable branches are still splattering dockers from the primary development branch. Signed-off-by: Daniel P. Berrangé Reviewed-by: Michael Tokarev Tested-by: Michael Tokarev Message-ID: <20240906140958.84755-1-berrange@redhat.com> Signed-off-by: Thomas Huth (cherry picked from commit 8d5ab74) Signed-off-by: Michael Tokarev Signed-off-by: Hou haole --- .gitlab-ci.d/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml index ef173a34e6..023f0a5f13 100644 --- a/.gitlab-ci.d/base.yml +++ b/.gitlab-ci.d/base.yml @@ -120,7 +120,7 @@ variables: when: manual # Jobs can run if any jobs they depend on were successful - - if: '$QEMU_JOB_SKIPPED && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ /staging-[[:digit:]]+\.[[:digit:]]/' + - if: '$CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ /staging-[[:digit:]]+\.[[:digit:]]/' when: on_success variables: QEMU_CI_CONTAINER_TAG: $CI_COMMIT_REF_SLUG -- Gitee From ff1df9a83fb4a4b3b0b26b9008a9ae6bbc9da1d6 Mon Sep 17 00:00:00 2001 From: Hou haole Date: Mon, 25 Nov 2024 17:39:22 +0800 Subject: [PATCH 3/4] linux-user: Fix strace output for s390x mmap() print_mmap() assumes that mmap() receives arguments via memory if mmap2() is present. s390x (as opposed to s390) does not fit this pattern: it does not have mmap2(), but mmap() still receives arguments via memory. Fix by sharing the detection logic between syscall.c and strace.c. Cc: qemu-stable@nongnu.org Fixes: d971040 ("linux-user: Fix strace output for old_mmap") Suggested-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-ID: <20241120212717.246186-1-iii@linux.ibm.com> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Hou haole --- linux-user/strace.c | 2 +- linux-user/syscall.c | 5 +---- linux-user/syscall_defs.h | 7 +++++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index cf26e55264..3be77c4a38 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3803,7 +3803,7 @@ print_mmap(CPUArchState *cpu_env, const struct syscallname *name, { return print_mmap_both(cpu_env, name, arg0, arg1, arg2, arg3, arg4, arg5, -#if defined(TARGET_NR_mmap2) +#ifdef TARGET_ARCH_WANT_SYS_OLD_MMAP true #else false diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 513996e6fa..ecacd58be4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -10352,10 +10352,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, return ret; #ifdef TARGET_NR_mmap case TARGET_NR_mmap: -#if (defined(TARGET_I386) && defined(TARGET_ABI32)) || \ - (defined(TARGET_ARM) && defined(TARGET_ABI32)) || \ - defined(TARGET_M68K) || defined(TARGET_CRIS) || defined(TARGET_MICROBLAZE) \ - || defined(TARGET_S390X) +#ifdef TARGET_ARCH_WANT_SYS_OLD_MMAP { abi_ulong *v; abi_ulong v1, v2, v3, v4, v5, v6; diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 77ba343c85..1c008489aa 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2750,4 +2750,11 @@ struct target_sched_param { abi_int sched_priority; }; +#if (defined(TARGET_I386) && defined(TARGET_ABI32)) || \ + (defined(TARGET_ARM) && defined(TARGET_ABI32)) || \ + defined(TARGET_M68K) || defined(TARGET_MICROBLAZE) || \ + defined(TARGET_S390X) +#define TARGET_ARCH_WANT_SYS_OLD_MMAP +#endif + #endif -- Gitee From e4adaccd9bd1bf54d0bf276c15ee7cd702c2d9b9 Mon Sep 17 00:00:00 2001 From: houhaole Date: Sat, 18 Jan 2025 15:30:27 +0800 Subject: [PATCH 4/4] Correct release of TCG trace-events removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TCG trace-events were deprecated before the v6.2 release, and removed for v7.0. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev (cherry picked from commit b4859e8) Signed-off-by: Michael Tokarev Signed-off-by: houhaole --- docs/about/removed-features.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index f04036987b..82c861d0de 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -787,8 +787,8 @@ reason the maintainers strongly suspected no one actually used it. TCG introspection features -------------------------- -TCG trace-events (since 6.2) -'''''''''''''''''''''''''''' +TCG trace-events (removed in 7.0) +''''''''''''''''''''''''''''''''' The ability to add new TCG trace points had bit rotted and as the feature can be replicated with TCG plugins it was removed. If -- Gitee