qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PULL 08/14] spapr_pci/spapr_pci_vfio: Support Dynamic DM


From: David Gibson
Subject: Re: [Qemu-ppc] [PULL 08/14] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)
Date: Tue, 12 Jul 2016 15:20:21 +1000
User-agent: Mutt/1.6.1 (2016-04-27)

On Mon, Jul 11, 2016 at 04:21:29PM +0200, Paolo Bonzini wrote:
> 
> 
> On 05/07/2016 07:31, David Gibson wrote:
> >  
> > -    if (tcet && tcet->nb_table) {
> > -        spapr_tce_table_disable(tcet);
> > +        if (tcet && tcet->nb_table) {
> > +            spapr_tce_table_disable(tcet);
> > +        }
> >      }
> >  
> >      /* Register default 32bit DMA window */
> > +    tcet = spapr_tce_find_by_liobn(sphb->dma_liobn[0]);
> 
> Should the statement below be wrapped by "if (tcet)"?

Not really.  That lookup should never fail (if we didn't allocate the
tcet before we would have failed initialization).  An assert(tcet)
might be appropriate, but I don't know it's worth adding at this
stage.
 
> Paolo
> 
> >      spapr_tce_table_enable(tcet, SPAPR_TCE_PAGE_SHIFT, sphb->dma_win_addr,
> >                             sphb->dma_win_size >> SPAPR_TCE_PAGE_SHIFT)
> 

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]