diff options
author | Greg Hartman <ghartman@google.com> | 2018-07-13 21:06:41 -0700 |
---|---|---|
committer | Greg Hartman <ghartman@google.com> | 2018-07-13 21:38:24 -0700 |
commit | 1aa8407cee1f325cbae905f827e95caf8e49598c (patch) | |
tree | 9f9de94a2977dd77c29c6f915a4ec33216b29b06 | |
parent | 6acad7ccba01f94f075767c72f4d8de8335173f1 (diff) | |
download | cuttlefish_common-pie-qpr3-s1-release.tar.gz |
Send the shared memory window lastandroid-9.0.0_r47android-9.0.0_r46android-9.0.0_r45android-9.0.0_r44android-9.0.0_r43android-9.0.0_r42android-9.0.0_r41android-9.0.0_r40android-9.0.0_r39android-9.0.0_r38android-9.0.0_r37android-9.0.0_r36android-9.0.0_r35android-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31android-9.0.0_r30android-9.0.0_r22android-9.0.0_r21android-9.0.0_r20android-9.0.0_r19android-9.0.0_r16pie-qpr3-s1-releasepie-qpr3-releasepie-qpr3-b-releasepie-qpr2-releasepie-qpr1-s3-releasepie-qpr1-s2-releasepie-qpr1-s1-releasepie-qpr1-releasepie-dr1-devpie-b4s4-releasepie-b4s4-dev
This ensures that all of the interrupts are initialized before
Android begins to boot. ivshmem_common_realize calls ivshmem_recv_setup,
which exits only when it gets the shared memory window.
BUG: 111000656
Test: Boot completes, as does the e2e test
Test: Debian 1:2.12~rc3+dfsg-1
Test: Debian 1:2.11+dfsg-1
Test: vsoc-0.7pre4 image (1:2.8+dfsg-6+deb9u4)
Change-Id: I55d75e0b542aa96dcf7abc4a38226bc6305ac7fa
(cherry picked from commit 85df3121a694d9f5f9c03010f85ce1803fdaa606)
-rw-r--r-- | host/libs/ivserver/qemu_client.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/host/libs/ivserver/qemu_client.cc b/host/libs/ivserver/qemu_client.cc index c893f0f8..d584ccc2 100644 --- a/host/libs/ivserver/qemu_client.cc +++ b/host/libs/ivserver/qemu_client.cc @@ -63,15 +63,7 @@ bool QemuClient::PerformHandshake(const VSoCSharedMemory& shmem) { return false; } - // 3. The number -1, accompanied by the file descriptor for the shared - // memory. - if (!SendSocketInfo(kSharedMem, shmem.SharedMemFD())) { - LOG(ERROR) << "Failed to send Shared Memory socket: " - << client_socket_->StrError(); - return false; - } - - // 4. Connect notifications for existing other clients, if any. This is + // 3. Connect notifications for existing other clients, if any. This is // a peer ID (number between 0 and 65535 other than the client's ID), // repeated N times. Each repetition is accompanied by one file // descriptor. These are for interrupting the peer with that ID using @@ -86,7 +78,7 @@ bool QemuClient::PerformHandshake(const VSoCSharedMemory& shmem) { } } - // 5. Interrupt setup. This is the client's own ID, repeated N times. + // 4. Interrupt setup. This is the client's own ID, repeated N times. // Each repetition is accompanied by one file descriptor. These are // for receiving interrupts from peers using vector 0,..,N-1, in // order. If the client is configured for fewer vectors, it closes @@ -100,6 +92,15 @@ bool QemuClient::PerformHandshake(const VSoCSharedMemory& shmem) { } } + // 5. The number -1, accompanied by the file descriptor for the shared + // memory. + if (!SendSocketInfo(kSharedMem, shmem.SharedMemFD())) { + LOG(ERROR) << "Failed to send Shared Memory socket: " + << client_socket_->StrError(); + return false; + } + + LOG(INFO) << "QEmu handshake completed."; return true; } |