aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2024-09-12 10:47:53 +0200
committerAlexander Potapenko <glider@google.com>2024-09-25 09:05:57 +0000
commit0c119dd1f389a9d739e24184e8bdafc62d32fb97 (patch)
tree28502904072bfab0470081f3f90daccdfc5f7bf3 /executor
parent46547111bb3121d3c61f7bd2725008c540291bab (diff)
executor: arm64: accept cpu id in guest_main()
Use the cpu id to choose the SYZOS API commands to be executed by this particular CPU.
Diffstat (limited to 'executor')
-rw-r--r--executor/common_kvm_arm64_syzos.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/common_kvm_arm64_syzos.h b/executor/common_kvm_arm64_syzos.h
index 0f11a7b00..ebfed175c 100644
--- a/executor/common_kvm_arm64_syzos.h
+++ b/executor/common_kvm_arm64_syzos.h
@@ -79,9 +79,9 @@ typedef enum {
// Main guest function that performs necessary setup and passes the control to the user-provided
// payload.
-GUEST_CODE static void guest_main(uint64 size)
+GUEST_CODE static void guest_main(uint64 size, uint64 cpu)
{
- uint64 addr = ARM64_ADDR_USER_CODE;
+ uint64 addr = ARM64_ADDR_USER_CODE + cpu * 0x1000;
while (size >= sizeof(struct api_call_header)) {
struct api_call_header* cmd = (struct api_call_header*)addr;