Skip to contentSkip to conversation

hax: unbreak accelerator cpu code after cpus.c split

PATCH Applied Claudio Fontana 3 participants 3 messages Oct 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hax: unbreak accelerator cpu code after cpus.c split

during my split of cpus.c, code line
"current_cpu = cpu"
was removed by mistake, causing hax to break.

This commit fixes the situation restoring it.

Fixes e92558e4bf8059ce4f0b310afe218802b72766bc
---
 target/i386/hax-cpus.c | 1 +
 1 file changed, 1 insertion(+)
target/i386/hax-cpus.c +1 -0
index 99770e590c..f72c85bd49 100644
@@ -38,6 +38,7 @@ static void *hax_cpu_thread_fn(void *arg)
     qemu_thread_get_self(cpu->thread);
 
     cpu->thread_id = qemu_get_thread_id();
+    current_cpu = cpu;
     hax_init_vcpu(cpu);
     cpu_thread_signal_created(cpu);
     qemu_guest_random_seed_thread_part2(cpu->random_seed);
Signature · 1 line
2.26.2
#1 lore raw
Quoted 19 lines · Claudio Fontana

during my split of cpus.c, code line
"current_cpu = cpu"
was removed by mistake, causing hax to break.

This commit fixes the situation restoring it.

Fixes e92558e4bf8059ce4f0b310afe218802b72766bc
---
 target/i386/hax-cpus.c | 1 +
 1 file changed, 1 insertion(+)
target/i386/hax-cpus.c +0 -0
index 99770e590c..f72c85bd49 100644

target/i386/hax-cpus.c static void *hax_cpu_thread_fn(void *arg) · line 44

Quoted 7 lines
target/i386/hax-cpus.c +1 -0
@@ -38,6 +38,7 @@ static void *hax_cpu_thread_fn(void *arg)
     qemu_thread_get_self(cpu->thread);
 
     cpu->thread_id = qemu_get_thread_id();
+    current_cpu = cpu;
     hax_init_vcpu(cpu);
     cpu_thread_signal_created(cpu);
     qemu_guest_random_seed_thread_part2(cpu->random_seed);

Queued, thanks.

Paolo

Reviewed-by on v1 1/1
#2 lore raw
In reply to Claudio Fontana
Quoted 10 lines · Claudio Fontana

during my split of cpus.c, code line
"current_cpu = cpu"
was removed by mistake, causing hax to break.

This commit fixes the situation restoring it.

Fixes e92558e4bf8059ce4f0b310afe218802b72766bc

---

Quoted 20 lines
 target/i386/hax-cpus.c | 1 +
 1 file changed, 1 insertion(+)
target/i386/hax-cpus.c +1 -1
index 99770e590c..f72c85bd49 100644
@@ -38,6 +38,7 @@ static void *hax_cpu_thread_fn(void *arg)
     qemu_thread_get_self(cpu->thread);
 
     cpu->thread_id = qemu_get_thread_id();
+    current_cpu = cpu;
     hax_init_vcpu(cpu);
     cpu_thread_signal_created(cpu);
     qemu_guest_random_seed_thread_part2(cpu->random_seed);
--

2.26.2