summary refs log tree commit diff stats
path: root/results/classifier/118/TCG-risc-v
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-16 16:59:00 +0000
committerChristian Krinitsin <mail@krinitsin.com>2025-06-16 16:59:33 +0000
commit9aba81d8eb048db908c94a3c40c25a5fde0caee6 (patch)
treeb765e7fb5e9a3c2143c68b0414e0055adb70e785 /results/classifier/118/TCG-risc-v
parentb89a938452613061c0f1f23e710281cf5c83cb29 (diff)
downloadqemu-analysis-9aba81d8eb048db908c94a3c40c25a5fde0caee6.tar.gz
qemu-analysis-9aba81d8eb048db908c94a3c40c25a5fde0caee6.zip
add 18th iteration of classifier
Diffstat (limited to 'results/classifier/118/TCG-risc-v')
-rw-r--r--results/classifier/118/TCG-risc-v/1926044180
-rw-r--r--results/classifier/118/TCG-risc-v/228661
-rw-r--r--results/classifier/118/TCG-risc-v/268399
3 files changed, 340 insertions, 0 deletions
diff --git a/results/classifier/118/TCG-risc-v/1926044 b/results/classifier/118/TCG-risc-v/1926044
new file mode 100644
index 000000000..70702152e
--- /dev/null
+++ b/results/classifier/118/TCG-risc-v/1926044
@@ -0,0 +1,180 @@
+TCG: 0.899
+graphic: 0.884
+virtual: 0.877
+risc-v: 0.873
+PID: 0.872
+register: 0.867
+user-level: 0.865
+peripherals: 0.859
+performance: 0.849
+vnc: 0.846
+arm: 0.844
+permissions: 0.832
+ppc: 0.825
+architecture: 0.824
+KVM: 0.822
+VMM: 0.808
+hypervisor: 0.807
+semantic: 0.807
+debug: 0.806
+x86: 0.805
+assembly: 0.802
+kernel: 0.790
+device: 0.782
+files: 0.768
+socket: 0.753
+network: 0.735
+boot: 0.734
+mistranslation: 0.667
+i386: 0.653
+--------------------
+TCG: 0.932
+arm: 0.825
+architecture: 0.270
+virtual: 0.169
+hypervisor: 0.164
+files: 0.082
+user-level: 0.040
+kernel: 0.027
+semantic: 0.021
+debug: 0.016
+PID: 0.011
+x86: 0.009
+performance: 0.007
+register: 0.006
+device: 0.006
+boot: 0.004
+permissions: 0.003
+peripherals: 0.002
+socket: 0.001
+VMM: 0.001
+graphic: 0.001
+assembly: 0.001
+network: 0.001
+ppc: 0.001
+risc-v: 0.001
+vnc: 0.001
+mistranslation: 0.001
+KVM: 0.000
+i386: 0.000
+
+QEMU-user doesn't report HWCAP2_MTE
+
+Reproducible on ffa090bc56e73e287a63261e70ac02c0970be61a
+
+Host Debian 5.10.24 x86_64 GNU
+
+Configured with "configure --disable-system --enable-linux-user --static"
+
+This one works and prints "OK" as expected:
+clang tests/tcg/aarch64/mte-3.c -target aarch64-linux-gnu  -fsanitize=memtag -march=armv8+memtag
+qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out && echo OK
+
+
+This one fails and print "0":
+cat mytest.c
+#include <stdio.h>
+#include <sys/auxv.h>
+
+#ifndef HWCAP2_MTE
+#define HWCAP2_MTE (1 << 18)
+#endif
+
+int main(int ac, char **av)
+{
+    printf("%d\n", (int)(getauxval(AT_HWCAP2) & HWCAP2_MTE));
+}
+
+
+clang mytest.c -target aarch64-linux-gnu  -fsanitize=memtag -march=armv8+memtag
+qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out
+
+Actually if we make it like this:
+
+#include <stdio.h>
+#include <sys/auxv.h>
+
+int main(int ac, char **av)
+{
+    for (int i = 0; i < 32; ++i)
+        if ((int)(getauxval(AT_HWCAP2) & (1 << i)))
+            printf("%d\n", i);
+}
+
+
+clang mytest.c -target aarch64-linux-gnu -fsanitize=memtag -march=armv8+memtag
+qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out
+
+I see only: HWCAP_FP HWCAP_CRC32 HWCAP_ATOMICS
+So no HWCAP2_BTI as well.
+
+Sorry, 0 7 8 should be "HWCAP2_DCPODP HWCAP2_FLAGM2 HWCAP2_FRINT"
+
+Yep, there's a whole bunch that have been missed.
+
+https://<email address hidden>/
+
+This has missed 6.0, but should be acceptable to roll into 6.0.1.
+
+Thanks for the quick fix!
+
+On Tue, Apr 27, 2021 at 2:55 PM Richard Henderson <
+<email address hidden>> wrote:
+
+>
+> https://<email address hidden>/
+>
+> This has missed 6.0, but should be acceptable to roll into 6.0.1.
+>
+> --
+> You received this bug notification because you are subscribed to the bug
+> report.
+> https://bugs.launchpad.net/bugs/1926044
+>
+> Title:
+>   QEMU-user doesn't report HWCAP2_MTE
+>
+> Status in QEMU:
+>   In Progress
+>
+> Bug description:
+>   Reproducible on ffa090bc56e73e287a63261e70ac02c0970be61a
+>
+>   Host Debian 5.10.24 x86_64 GNU
+>
+>   Configured with "configure --disable-system --enable-linux-user
+>   --static"
+>
+>   This one works and prints "OK" as expected:
+>   clang tests/tcg/aarch64/mte-3.c -target aarch64-linux-gnu
+> -fsanitize=memtag -march=armv8+memtag
+>   qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out && echo OK
+>
+>
+>   This one fails and print "0":
+>   cat mytest.c
+>   #include <stdio.h>
+>   #include <sys/auxv.h>
+>
+>   #ifndef HWCAP2_MTE
+>   #define HWCAP2_MTE (1 << 18)
+>   #endif
+>
+>   int main(int ac, char **av)
+>   {
+>       printf("%d\n", (int)(getauxval(AT_HWCAP2) & HWCAP2_MTE));
+>   }
+>
+>
+>   clang mytest.c -target aarch64-linux-gnu  -fsanitize=memtag
+> -march=armv8+memtag
+>   qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out
+>
+> To manage notifications about this bug go to:
+> https://bugs.launchpad.net/qemu/+bug/1926044/+subscriptions
+>
+
+
+Patch has been merged:
+https://gitlab.com/qemu-project/qemu/-/commit/68948d18224b93361e28
+
diff --git a/results/classifier/118/TCG-risc-v/2286 b/results/classifier/118/TCG-risc-v/2286
new file mode 100644
index 000000000..3f438310c
--- /dev/null
+++ b/results/classifier/118/TCG-risc-v/2286
@@ -0,0 +1,61 @@
+TCG: 0.984
+risc-v: 0.953
+device: 0.851
+mistranslation: 0.824
+semantic: 0.645
+architecture: 0.633
+performance: 0.627
+network: 0.610
+virtual: 0.376
+arm: 0.331
+graphic: 0.286
+peripherals: 0.284
+vnc: 0.263
+hypervisor: 0.226
+debug: 0.184
+register: 0.173
+socket: 0.157
+files: 0.145
+permissions: 0.144
+assembly: 0.128
+boot: 0.123
+i386: 0.118
+user-level: 0.103
+ppc: 0.099
+kernel: 0.085
+VMM: 0.069
+PID: 0.046
+x86: 0.012
+KVM: 0.004
+--------------------
+risc-v: 0.976
+TCG: 0.969
+virtual: 0.906
+architecture: 0.767
+hypervisor: 0.670
+assembly: 0.615
+debug: 0.592
+register: 0.092
+device: 0.084
+performance: 0.059
+peripherals: 0.034
+kernel: 0.021
+semantic: 0.015
+user-level: 0.014
+files: 0.013
+arm: 0.006
+boot: 0.004
+VMM: 0.002
+PID: 0.002
+mistranslation: 0.002
+graphic: 0.002
+network: 0.002
+socket: 0.002
+vnc: 0.001
+permissions: 0.001
+ppc: 0.000
+KVM: 0.000
+i386: 0.000
+x86: 0.000
+
+QEMU RISC-V TCG: amo insn fault does not throw AMO fault
diff --git a/results/classifier/118/TCG-risc-v/2683 b/results/classifier/118/TCG-risc-v/2683
new file mode 100644
index 000000000..02ccf91ac
--- /dev/null
+++ b/results/classifier/118/TCG-risc-v/2683
@@ -0,0 +1,99 @@
+TCG: 0.991
+risc-v: 0.945
+performance: 0.867
+architecture: 0.854
+ppc: 0.847
+graphic: 0.841
+semantic: 0.795
+PID: 0.759
+device: 0.758
+kernel: 0.737
+i386: 0.728
+mistranslation: 0.728
+user-level: 0.727
+register: 0.727
+network: 0.714
+peripherals: 0.706
+permissions: 0.706
+VMM: 0.702
+vnc: 0.685
+arm: 0.639
+x86: 0.635
+hypervisor: 0.634
+socket: 0.632
+KVM: 0.630
+assembly: 0.629
+debug: 0.602
+files: 0.573
+boot: 0.479
+virtual: 0.432
+--------------------
+TCG: 0.942
+risc-v: 0.533
+kernel: 0.316
+debug: 0.145
+semantic: 0.116
+performance: 0.104
+files: 0.070
+assembly: 0.039
+architecture: 0.025
+register: 0.024
+hypervisor: 0.019
+virtual: 0.014
+user-level: 0.007
+device: 0.005
+PID: 0.004
+boot: 0.004
+VMM: 0.003
+KVM: 0.002
+peripherals: 0.002
+permissions: 0.002
+network: 0.002
+socket: 0.002
+ppc: 0.002
+arm: 0.001
+vnc: 0.001
+x86: 0.001
+mistranslation: 0.001
+graphic: 0.001
+i386: 0.001
+
+TCG: probe_access() has inconsistent behavior
+Description of problem:
+In full-system mode, probe_access() will return NULL when the flag is TLB_MMIO.
+
+accel/tcg/cputlb.c: probe_access_internal()
+```
+    if (unlikely(flags & ~(TLB_WATCHPOINT | TLB_NOTDIRTY | TLB_CHECK_ALIGNED))
+        || (access_type != MMU_INST_FETCH && force_mmio)) {
+        *phost = NULL;
+        return TLB_MMIO;
+    }
+```
+But in linux-user mode, it will return correct address when the flag is TLB_MMIO.
+
+accel/tcg/user-exec.c: probe_access()
+```
+    return size ? g2h(env_cpu(env), addr) : NULL;
+```
+This will lead to some different behaviors, like cbo.zero in RISC-V.
+
+target/riscv/op_helper.c: helper_cbo_zero()
+```
+    mem = probe_write(env, address, cbozlen, mmu_idx, ra);
+
+    if (likely(mem)) {
+        memset(mem, 0, cbozlen);
+    } else {
+        for (int i = 0; i < cbozlen; i++) {
+            cpu_stb_mmuidx_ra(env, address + i, 0, mmu_idx, ra);
+        }
+    }
+```
+When the current instruction has memory callback by plugin:
+
+Full-system mode uses slow-path(cpu_stb_mmuidx_ra) and inject mem_cbs correctly.
+
+Linux-user mode uses fast-path(memset) and doesn't inject callbacks.
+
+To ensure consistent results, probe_access() should return NULL when the flag is TLB_MMIO in linux-user mode.