diff mbox series

hax: unbreak accelerator cpu code after cpus.c split

Message ID 20201016080032.13914-1-cfontana@suse.de
State New
Headers show
Series hax: unbreak accelerator cpu code after cpus.c split | expand

Commit Message

Claudio Fontana Oct. 16, 2020, 8 a.m. UTC
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.

Reported-by: Volker Rümelin <vr_qemu@t-online.de>
Fixes: e92558e4bf8059ce4f0b310afe218802b72766bc
Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
 target/i386/hax-cpus.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Paolo Bonzini Oct. 16, 2020, 8:08 a.m. UTC | #1
On 16/10/20 10:00, Claudio Fontana wrote:
> 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.
> 
> Reported-by: Volker Rümelin <vr_qemu@t-online.de>
> Fixes: e92558e4bf8059ce4f0b310afe218802b72766bc
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> ---
>  target/i386/hax-cpus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/i386/hax-cpus.c b/target/i386/hax-cpus.c
> index 99770e590c..f72c85bd49 100644
> --- a/target/i386/hax-cpus.c
> +++ b/target/i386/hax-cpus.c
> @@ -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
Philippe Mathieu-Daudé Oct. 16, 2020, 8:23 a.m. UTC | #2
Le ven. 16 oct. 2020 10:03, Claudio Fontana <cfontana@suse.de> a écrit :

> 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.
>
> Reported-by: Volker Rümelin <vr_qemu@t-online.de>
> Fixes: e92558e4bf8059ce4f0b310afe218802b72766bc
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

---
>  target/i386/hax-cpus.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/target/i386/hax-cpus.c b/target/i386/hax-cpus.c
> index 99770e590c..f72c85bd49 100644
> --- a/target/i386/hax-cpus.c
> +++ b/target/i386/hax-cpus.c
> @@ -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
>
>
>
<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 16 oct. 2020 10:03, Claudio Fontana &lt;<a href="mailto:cfontana@suse.de">cfontana@suse.de</a>&gt; a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">during my split of cpus.c, code line<br>
&quot;current_cpu = cpu&quot;<br>
was removed by mistake, causing hax to break.<br>
<br>
This commit fixes the situation restoring it.<br>
<br>
Reported-by: Volker Rümelin &lt;<a href="mailto:vr_qemu@t-online.de" target="_blank" rel="noreferrer">vr_qemu@t-online.de</a>&gt;<br>
Fixes: e92558e4bf8059ce4f0b310afe218802b72766bc<br>
Signed-off-by: Claudio Fontana &lt;<a href="mailto:cfontana@suse.de" target="_blank" rel="noreferrer">cfontana@suse.de</a>&gt;<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Reviewed-by: Philippe Mathieu-Daudé &lt;<a href="mailto:f4bug@amsat.org">f4bug@amsat.org</a>&gt;<br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 target/i386/hax-cpus.c | 1 +<br>
 1 file changed, 1 insertion(+)<br>
<br>
diff --git a/target/i386/hax-cpus.c b/target/i386/hax-cpus.c<br>
index 99770e590c..f72c85bd49 100644<br>
--- a/target/i386/hax-cpus.c<br>
+++ b/target/i386/hax-cpus.c<br>
@@ -38,6 +38,7 @@ static void *hax_cpu_thread_fn(void *arg)<br>
     qemu_thread_get_self(cpu-&gt;thread);<br>
<br>
     cpu-&gt;thread_id = qemu_get_thread_id();<br>
+    current_cpu = cpu;<br>
     hax_init_vcpu(cpu);<br>
     cpu_thread_signal_created(cpu);<br>
     qemu_guest_random_seed_thread_part2(cpu-&gt;random_seed);<br>
-- <br>
2.26.2<br>
<br>
<br>
</blockquote></div></div></div>
diff mbox series

Patch

diff --git a/target/i386/hax-cpus.c b/target/i386/hax-cpus.c
index 99770e590c..f72c85bd49 100644
--- a/target/i386/hax-cpus.c
+++ b/target/i386/hax-cpus.c
@@ -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);