[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v1 for-2.11 2/3] s390x/tcg: fix DIAG 308 with >
From: |
Christian Borntraeger |
Subject: |
Re: [qemu-s390x] [PATCH v1 for-2.11 2/3] s390x/tcg: fix DIAG 308 with > 1 VCPU (single threaded TCG) |
Date: |
Thu, 16 Nov 2017 21:57:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
Please change the subject. In busy times I tend to ignore tcg patches.
This code is clearly kvm and tcg.
So what about "s390x/diag:" as prefix?
On 11/16/2017 06:05 PM, David Hildenbrand wrote:
> Currently, single threaded TCG with > 1 VCPU gets stuck during IPL, when
> the bios tries to switch to the loaded kernel via DIAG 308.
>
> pause_all_vcpus()/resume_all_vcpus() should not be called from a VCPU.
>
> And there is also no need for it. run_on_cpu() will make sure that the
> CPUs exit KVM/TCG, where they get stopped. Once stopped, they will no
> longer run.
>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
> target/s390x/diag.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/target/s390x/diag.c b/target/s390x/diag.c
> index dbbb9e886f..52bc348808 100644
> --- a/target/s390x/diag.c
> +++ b/target/s390x/diag.c
> @@ -27,7 +27,6 @@ static int modified_clear_reset(S390CPU *cpu)
> S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);
> CPUState *t;
>
> - pause_all_vcpus();
I did this to prevent a "still running CPU to restart an already stopped one".
Are we sure that this can not happen?
> cpu_synchronize_all_states();
> CPU_FOREACH(t) {
> run_on_cpu(t, s390_do_cpu_full_reset, RUN_ON_CPU_NULL);
> @@ -37,7 +36,6 @@ static int modified_clear_reset(S390CPU *cpu)
> s390_crypto_reset();
> scc->load_normal(CPU(cpu));
> cpu_synchronize_all_post_reset();
> - resume_all_vcpus();
> return 0;
> }
>
> @@ -53,7 +51,6 @@ static int load_normal_reset(S390CPU *cpu)
> S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);
> CPUState *t;
>
> - pause_all_vcpus();
> cpu_synchronize_all_states();
> CPU_FOREACH(t) {
> run_on_cpu(t, s390_do_cpu_reset, RUN_ON_CPU_NULL);
> @@ -63,7 +60,6 @@ static int load_normal_reset(S390CPU *cpu)
> scc->initial_cpu_reset(CPU(cpu));
> scc->load_normal(CPU(cpu));
> cpu_synchronize_all_post_reset();
> - resume_all_vcpus();
> return 0;
> }
>
Re: [qemu-s390x] [PATCH v1 for-2.11 0/3] s390x: fixes for SIGP and DIAG 308, Cornelia Huck, 2017/11/16