summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/none/2304
blob: 7e57ab6c050b1c7254fda60cf1db0d199ff91f7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
graphic: 0.541
architecture: 0.508
performance: 0.381
ppc: 0.378
device: 0.366
hypervisor: 0.336
semantic: 0.331
network: 0.328
socket: 0.305
arm: 0.296
kernel: 0.262
PID: 0.231
permissions: 0.213
vnc: 0.208
user-level: 0.203
peripherals: 0.193
debug: 0.182
boot: 0.173
assembly: 0.171
risc-v: 0.161
register: 0.161
mistranslation: 0.154
TCG: 0.150
VMM: 0.118
x86: 0.105
files: 0.096
KVM: 0.088
i386: 0.086
virtual: 0.078

Disabling SVE via `-cpu max,sve=off` leaves SVE2 advertised by `getauxval`
Description of problem:
The documentation on https://qemu-project.gitlab.io/qemu/system/arm/cpu-features.html suggests that it should be possible to disable SVE support by passing `-cpu max,sve=off` on the command line, however this appears to only disable the SVE support advertised in the return value from `getauxval(AT_HWCAP)`. In particular it leaves SVE2 reported as enabled. This leaves the feature set advertised by `getauxval` in an inconsistent state since SVE is mandatory if SVE2 is available.

This may also affect other feature dependencies for example FEAT_SVE_BITPerm also requiring SVE2 to be available, I've not checked exhaustively.

For example, given the following code:

    #include <sys/auxv.h>
    #include <stdio.h>

    int main() {
      unsigned long hwcap = getauxval(AT_HWCAP);
      unsigned long hwcap2 = getauxval(AT_HWCAP2);

      if (hwcap & HWCAP_SVE) {
        printf("have sve!\n");
      } else {
        printf("don't have sve!\n");
      }
      if (hwcap2 & HWCAP2_SVE2) {
        printf("have sve2!\n");
      } else {
        printf("don't have sve2!\n");
      }
    }

We can observe the following:

    $ aarch64-linux-gnu-gcc test.c -static
    $ ../qemu-aarch64 -cpu max ./a.out
    have sve!
    have sve2!
    $ ../qemu-aarch64 -cpu max,sve=off ./a.out
    don't have sve!
    have sve2!

I don't believe that there is a `-cpu ...,sve2=off` option, so I would expect that disabling SVE also prevents SVE2 from being advertised as available.