summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/none/2895
blob: 3021c866d7e0c574c8ed298f25351774783d495f (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
graphic: 0.729
kernel: 0.717
arm: 0.672
performance: 0.646
debug: 0.521
peripherals: 0.478
device: 0.435
architecture: 0.419
files: 0.274
semantic: 0.240
vnc: 0.199
PID: 0.187
socket: 0.158
boot: 0.157
network: 0.135
user-level: 0.126
hypervisor: 0.123
x86: 0.123
register: 0.115
ppc: 0.111
mistranslation: 0.108
virtual: 0.094
i386: 0.083
permissions: 0.064
VMM: 0.052
risc-v: 0.049
TCG: 0.044
assembly: 0.041
KVM: 0.023

qemu-system-aarch64: Error: r = HV_BAD_ARGUMENT (0xfae94003, at ../target/arm/hvf/hvf.c:2259)
Description of problem:
When I launch a Linux guest in QEMU with `-accel hvf` + `-gdb "tcp::1234"`, and I try to debug the kernel with `lldb`, QEMU crashes with the following report:

```
qemu-system-aarch64: Error: r = HV_BAD_ARGUMENT (0xfae94003, at ../target/arm/hvf/hvf.c:2259)
```
Steps to reproduce:
1. Run QEMU with `-accel hvf` + `-gdb "tcp::1234"` and a custom kernel (`-kernel Image`)
2. Try to attach using `lldb vmlinux` + `(lldb) gdb-remote 1234`
Additional information:
Debugging QEMU I see the crash is due to the `cpu->accel->fd` file descriptor being `0`:

```
warning: qemu-system-aarch64 was compiled with optimization - stepping may behave oddly; variables may not be available.
frame #4: 0x00000001003dd24c qemu-system-aarch64`hvf_arch_update_guest_debug [inlined] hvf_put_guest_debug_registers(cpu=0x0000000158118000) at hvf.c:2259:9 [opt]
   2256     for (i = 0; i < max_hw_bps; i++) {
   2257         r = hv_vcpu_set_sys_reg(cpu->accel->fd, dbgbcr_regs[i],
   2258                                 env->cp15.dbgbcr[i]);
-> 2259         assert_hvf_ok(r);
   2260         r = hv_vcpu_set_sys_reg(cpu->accel->fd, dbgbvr_regs[i],
   2261                                 env->cp15.dbgbvr[i]);
   2262         assert_hvf_ok(r);
(lldb) print cpu->accel->fd
(hvf_vcpuid) 0
(lldb) print dbgbcr_regs[i]
(const uint16_t) 32773
(lldb) print env->cp15.dbgbcr[i]
(uint64_t) 480
```