[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 08/14] spapr_pci/spapr_pci_vfio: Support Dynamic
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [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
signature.asc
Description: PGP signature
- [Qemu-devel] [PULL 04/14] spapr_iommu: Realloc guest visible TCE table when starting/stopping listening, (continued)
- [Qemu-devel] [PULL 04/14] spapr_iommu: Realloc guest visible TCE table when starting/stopping listening, David Gibson, 2016/07/05
- [Qemu-devel] [PULL 07/14] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2), David Gibson, 2016/07/05
- [Qemu-devel] [PULL 02/14] spapr: Ensure thread0 of CPU core is always realized first, David Gibson, 2016/07/05
- [Qemu-devel] [PULL 12/14] target-ppc: Return page shift from PTEG search, David Gibson, 2016/07/05
- [Qemu-devel] [PULL 14/14] ppc/hash64: Fix support for LPCR:ISL, David Gibson, 2016/07/05
- [Qemu-devel] [PULL 11/14] target-ppc: Simplify HPTE matching, David Gibson, 2016/07/05
- [Qemu-devel] [PULL 08/14] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW), David Gibson, 2016/07/05
- [Qemu-devel] [PULL 05/14] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2), David Gibson, 2016/07/05
- [Qemu-devel] [PULL 09/14] ppc: simplify ppc_hash64_hpte_page_shift_noslb(), David Gibson, 2016/07/05
- [Qemu-devel] [PULL 06/14] vfio: Add host side DMA window capabilities, David Gibson, 2016/07/05
- [Qemu-devel] [PULL 13/14] ppc/hash64: Add proper real mode translation support, David Gibson, 2016/07/05
- Re: [Qemu-devel] [PULL 00/14] ppc-for-2.7 queue 20160705 (v2), Peter Maydell, 2016/07/05