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
|
<think>
Okay, I'm trying to figure out whether this QEMU build issue is a user-mode or system-mode problem. Let me go through the details step by step.
The user is compiling QEMU from the master tree on an ARMv8 machine running Ubuntu 16.04. They successfully built QEMU using "make -j 64", but when they ran "make test", it failed in iov.c with an undefined reference to `buffer_is_zero`.
Looking at the error message:
- The failure is during the linking of the test_path binary.
- The function qemu_iovec_is_zero is referencing buffer_is_zero, which isn't defined.
I remember that QEMU has a set of helper functions for checking if memory regions are zero. On some architectures, these might be implemented with specific optimizations or intrinsics. For AArch64, perhaps there's an assembly implementation or a different function name used.
Wait, in iov.c, the function buffer_is_zero is called, but maybe on AArch64, it's defined elsewhere or has a different name. I think that QEMU might have architecture-specific implementations for certain functions to optimize performance. For example, x86 has specific optimizations, and perhaps AArch64 does too.
I should check the QEMU source code to see where buffer_is_zero is defined. If it's not present in util/iov.c or any other included files, that would explain the undefined reference error.
Looking through the code, I find that buffer_is_zero might be a helper function provided by the target architecture. So, if the build is targeting user-mode emulation, perhaps the necessary functions aren't being linked correctly. Alternatively, it could be a missing dependency in the build setup for AArch64.
Another thought: Maybe the tests/tcg directory isn't including all the necessary source files or libraries when building test_path. If buffer_is_zero is part of another module that's not being linked during this specific test build, that would cause this error.
In QEMU, user-mode emulation (like qemu-user) runs unprivileged and emulates a CPU, while system-mode (qemu-system) runs with higher privileges and emulates an entire machine. The tests in tcg are likely related to the TCG (Translation Cost Guard) which is part of the CPU emulation.
Given that the error is during a test build for TCG, it's probably related to user-mode emulation since TCG is used for both, but more directly tied to how instructions are translated and executed. The undefined reference suggests a missing function implementation specific to AArch64 in the test environment.
So, considering all this, I think the bug is related to user-mode because it's during the TCG tests which are part of the CPU emulation layer.
</think>
user
|