diff mbox

[PULL,0/7] ppc-for-2.10 queue 20170822

Message ID 329bff28-5804-2d39-7bd8-9336eaaf9d26@redhat.com
State New
Headers show

Commit Message

Laurent Vivier Aug. 22, 2017, 10:41 a.m. UTC
On 22/08/2017 11:53, Peter Maydell wrote:
> On 22 August 2017 at 10:43, Laurent Vivier <lvivier@redhat.com> wrote:
>> On 22/08/2017 11:34, Peter Maydell wrote:
>>> On 22 August 2017 at 05:24, David Gibson <david@gibson.dropbear.id.au> wrote:
>>>> The following changes since commit 1f296733876434118fd766cfef5eb6f29ecab6a8:
>>>>
>>>>   Update version for v2.10.0-rc3 release (2017-08-15 18:53:31 +0100)
>>>>
>>>> are available in the git repository at:
>>>>
>>>>   git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170822
>>>>
>>>> for you to fetch changes up to d3234e2851f1630c695c681beac1e87ac0881260:
>>>>
>>>>   hw/ppc/spapr_iommu: Fix crash when removing the "spapr-tce-table" device (2017-08-22 11:11:30 +1000)
>>>>
>>>> ----------------------------------------------------------------
>>>> ppc patch queue 2017-08-22
>>>>
>>>> Last minute ppc related fixes for qemu-2.10.  I'm not sure if these
>>>> are critical enough to prompt another rc, but I'm submitting them for
>>>> consideration.
>>>>
>>>> First, is Cornelia's fix for 480bc11e6 which meant "make check" would
>>>> always fail on a ppc host.  Tracking that down delayed submission of
>>>> the rest of these patches, sorry.
>>>>
>>>> The rest are all fairly important bugfixes for qemu crashes or guest
>>>> behaviour regression on ppc.  Patches 2-4 specifically are fixes for
>>>> regressions from qemu-2.9, caused by the compatibility mode and
>>>> hotplug handling cleanups for the pseries machine type.
>>>>
>>>> ----------------------------------------------------------------
>>>
>>> I get a make check failure on ppc64 Linux:
>>>
>>> TEST: tests/postcopy-test... (pid=12468)
>>>   /ppc64/postcopy:
>>> Broken pipe
>>> qemu-system-ppc64: RP: Received invalid message 0x0000 length 0x0000
>>> FAIL
>>> GTester: last random seed: R02Se5468e06f561627824306d95b0566d2b
>>> (pid=13011)
>>> FAIL: tests/postcopy-test

The problem is in:

bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
{
    CPUState *cs = CPU(cpu);

    if (cap_ppc_pvr_compat) {
        return false;
    }

    return !kvmppc_is_pr(cs->kvm_state);
}

It guesses !kvm pr means kvm_hv. That is not true, it can be TCG.

This fixes the problem for me:

[CC' Daniel]
Thanks,
Laurent

Comments

Peter Maydell Aug. 22, 2017, 10:52 a.m. UTC | #1
On 22 August 2017 at 11:41, Laurent Vivier <lvivier@redhat.com> wrote:
> On 22/08/2017 11:53, Peter Maydell wrote:
>> On 22 August 2017 at 10:43, Laurent Vivier <lvivier@redhat.com> wrote:
>>> On 22/08/2017 11:34, Peter Maydell wrote:
>>>> I get a make check failure on ppc64 Linux:
>>>>
>>>> TEST: tests/postcopy-test... (pid=12468)
>>>>   /ppc64/postcopy:
>>>> Broken pipe
>>>> qemu-system-ppc64: RP: Received invalid message 0x0000 length 0x0000
>>>> FAIL
>>>> GTester: last random seed: R02Se5468e06f561627824306d95b0566d2b
>>>> (pid=13011)
>>>> FAIL: tests/postcopy-test
>
> The problem is in:
>
> bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
> {
>     CPUState *cs = CPU(cpu);
>
>     if (cap_ppc_pvr_compat) {
>         return false;
>     }
>
>     return !kvmppc_is_pr(cs->kvm_state);
> }
>
> It guesses !kvm pr means kvm_hv. That is not true, it can be TCG.
>
> This fixes the problem for me:
> --- a/target/ppc/kvm.c
> +++ b/target/ppc/kvm.c
> @@ -2817,5 +2817,5 @@ bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
>          return false;
>      }
>
> -    return !kvmppc_is_pr(cs->kvm_state);
> +    return kvm_enabled() && !kvmppc_is_pr(cs->kvm_state);
>  }

Yep, fixes the failure for me too. David, can you respin your
pull request, please?

thanks
-- PMM
Daniel Henrique Barboza Aug. 22, 2017, 12:31 p.m. UTC | #2
On 08/22/2017 07:52 AM, Peter Maydell wrote:
> On 22 August 2017 at 11:41, Laurent Vivier <lvivier@redhat.com> wrote:
>> On 22/08/2017 11:53, Peter Maydell wrote:
>>> On 22 August 2017 at 10:43, Laurent Vivier <lvivier@redhat.com> wrote:
>>>> On 22/08/2017 11:34, Peter Maydell wrote:
>>>>> I get a make check failure on ppc64 Linux:
>>>>>
>>>>> TEST: tests/postcopy-test... (pid=12468)
>>>>>    /ppc64/postcopy:
>>>>> Broken pipe
>>>>> qemu-system-ppc64: RP: Received invalid message 0x0000 length 0x0000
>>>>> FAIL
>>>>> GTester: last random seed: R02Se5468e06f561627824306d95b0566d2b
>>>>> (pid=13011)
>>>>> FAIL: tests/postcopy-test
>> The problem is in:
>>
>> bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
>> {
>>      CPUState *cs = CPU(cpu);
>>
>>      if (cap_ppc_pvr_compat) {
>>          return false;
>>      }
>>
>>      return !kvmppc_is_pr(cs->kvm_state);
>> }
>>
>> It guesses !kvm pr means kvm_hv. That is not true, it can be TCG.
>>
>> This fixes the problem for me:
>> --- a/target/ppc/kvm.c
>> +++ b/target/ppc/kvm.c
>> @@ -2817,5 +2817,5 @@ bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
>>           return false;
>>       }
>>
>> -    return !kvmppc_is_pr(cs->kvm_state);
>> +    return kvm_enabled() && !kvmppc_is_pr(cs->kvm_state);
>>   }

Good catch. I forgot to cover/test TCG scenarios with this patch and 
this bug
flew under the radar completely :(

> Yep, fixes the failure for me too. David, can you respin your
> pull request, please?

I've send a v2 of the patch including Laurent's fix too. Feel free to 
use the v2 or
amend it on top of the existing v1, whatever is easier.


Thanks,

Daniel

>
> thanks
> -- PMM
>
David Gibson Aug. 23, 2017, 12:34 a.m. UTC | #3
On Tue, Aug 22, 2017 at 11:52:00AM +0100, Peter Maydell wrote:
> On 22 August 2017 at 11:41, Laurent Vivier <lvivier@redhat.com> wrote:
> > On 22/08/2017 11:53, Peter Maydell wrote:
> >> On 22 August 2017 at 10:43, Laurent Vivier <lvivier@redhat.com> wrote:
> >>> On 22/08/2017 11:34, Peter Maydell wrote:
> >>>> I get a make check failure on ppc64 Linux:
> >>>>
> >>>> TEST: tests/postcopy-test... (pid=12468)
> >>>>   /ppc64/postcopy:
> >>>> Broken pipe
> >>>> qemu-system-ppc64: RP: Received invalid message 0x0000 length 0x0000
> >>>> FAIL
> >>>> GTester: last random seed: R02Se5468e06f561627824306d95b0566d2b
> >>>> (pid=13011)
> >>>> FAIL: tests/postcopy-test
> >
> > The problem is in:
> >
> > bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
> > {
> >     CPUState *cs = CPU(cpu);
> >
> >     if (cap_ppc_pvr_compat) {
> >         return false;
> >     }
> >
> >     return !kvmppc_is_pr(cs->kvm_state);
> > }
> >
> > It guesses !kvm pr means kvm_hv. That is not true, it can be TCG.
> >
> > This fixes the problem for me:
> > --- a/target/ppc/kvm.c
> > +++ b/target/ppc/kvm.c
> > @@ -2817,5 +2817,5 @@ bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
> >          return false;
> >      }
> >
> > -    return !kvmppc_is_pr(cs->kvm_state);
> > +    return kvm_enabled() && !kvmppc_is_pr(cs->kvm_state);
> >  }
> 
> Yep, fixes the failure for me too. David, can you respin your
> pull request, please?

Done.  In the interests of getting it out quickly, I haven't done the
full usual set of tests, though I have done a make check on a ppc host
both with and without KVM available.  A tweaked version of the fix
above is the only change, so I'm hoping the testing round on the
previous pullreq should suffice.
diff mbox

Patch

--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2817,5 +2817,5 @@  bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu)
         return false;
     }

-    return !kvmppc_is_pr(cs->kvm_state);
+    return kvm_enabled() && !kvmppc_is_pr(cs->kvm_state);
 }