[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PULL 35/40] spapr: extend the sPAPR IRQ backend for XICS
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PULL 35/40] spapr: extend the sPAPR IRQ backend for XICS migration |
Date: |
Fri, 4 Jan 2019 16:16:15 +1100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Jan 03, 2019 at 10:57:21PM +0100, Cédric Le Goater wrote:
> On 1/3/19 8:07 PM, Peter Maydell wrote:
> > On Fri, 21 Dec 2018 at 05:46, David Gibson <address@hidden> wrote:
> >>
> >> From: Cédric Le Goater <address@hidden>
> >>
> >> Introduce a new sPAPR IRQ handler to handle resend after migration
> >> when the machine is using a KVM XICS interrupt controller model.
> >>
> >> Signed-off-by: Cédric Le Goater <address@hidden>
> >> Reviewed-by: David Gibson <address@hidden>
> >> Signed-off-by: David Gibson <address@hidden>
> >
> >> @@ -1758,6 +1750,11 @@ static int spapr_post_load(void *opaque, int
> >> version_id)
> >> }
> >> }
> >>
> >> + err = spapr_irq_post_load(spapr, version_id);
> >> + if (err) {
> >> + return err;
> >> + }
> >> +
> >
> > Hi; this change causes Coverity to complain (CID 1398591) that
> > we're now overwriting the setting of err in the earlier
> > err = spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset);
> > without ever testing it. (We also do this in the existing
> > codepath that calls kvmppc_configure_v3_mmu().)
>
> yes. I suppose we have been missing something like :
>
> @@ -1754,6 +1754,9 @@ static int spapr_post_load(void *opaque,
> * value into the RTC device */
> if (version_id < 3) {
> err = spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset);
> + if (err) {
> + return err;
> + }
> }
>
> if (kvm_enabled() && spapr->patb_entry) {
Yeah, looks like it. Can you send a patch please?
>
>
> C.
>
> >
> > Should the call to spapr_rtc_import_offset() have its
> > own "if (err) do something" code, or should it simply
> > be ignoring its return value entirely, or something
> > more complicated ?
> >
> > thanks
> > -- PMM
> >
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature