From: Jan Kiszka <[email protected]>

Easy to forget when looking at the code again.

Signed-off-by: Jan Kiszka <[email protected]>
---
 driver/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/driver/main.c b/driver/main.c
index 41552b74..01e9c049 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -572,6 +572,11 @@ static int jailhouse_cmd_enable(struct jailhouse_system 
__user *arg)

        header->online_cpus = num_online_cpus();

+       /*
+        * Cannot use wait=true here because all CPUs have to enter the
+        * hypervisor to start the handover while on_each_cpu holds the calling
+        * CPU back.
+        */
        atomic_set(&call_done, 0);
        on_each_cpu(enter_hypervisor, header, 0);
        while (atomic_read(&call_done) != num_online_cpus())
@@ -697,6 +702,7 @@ static int jailhouse_cmd_disable(void)
 #endif

        atomic_set(&call_done, 0);
+       /* See jailhouse_cmd_enable while wait=true does not work. */
        on_each_cpu(leave_hypervisor, NULL, 0);
        while (atomic_read(&call_done) != num_online_cpus())
                cpu_relax();
--
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/23f82ce47f923fc6cba5696513fc5cba86dc89db.1581770164.git.jan.kiszka%40web.de.

Reply via email to