On Tue, Aug 26, 2014 at 06:16:51PM +1000, Alexey Kardashevskiy wrote: > On 08/26/2014 05:19 PM, David Gibson wrote: > > On Fri, Aug 15, 2014 at 08:12:33PM +1000, Alexey Kardashevskiy wrote: > >> This implements DDW for VFIO. Host kernel support is required for this. > >> > >> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> > >> --- > >> Changes: > >> v2: > >> * remove()/reset() callbacks use spapr_pci's ones > >> --- > >> hw/ppc/spapr_pci_vfio.c | 86 > >> +++++++++++++++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 86 insertions(+) > >> > >> diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c > >> index 11b4272..79df716 100644 > >> --- a/hw/ppc/spapr_pci_vfio.c > >> +++ b/hw/ppc/spapr_pci_vfio.c > >> @@ -71,6 +71,88 @@ static void spapr_phb_vfio_finish_realize(sPAPRPHBState > >> *sphb, Error **errp) > >> spapr_tce_get_iommu(tcet)); > >> > >> object_unref(OBJECT(tcet)); > >> + > >> + if (sphb->ddw_enabled) { > >> + sphb->ddw_enabled = !!(info.flags & > >> VFIO_IOMMU_SPAPR_TCE_FLAG_DDW); > > > > This overrides an explicit ddw= set by the user, which is a bit > > counter-intuitive. > > > For the user it is rather "try ddw when available" than "do ddw". This was > suggested by Alex Graf or I misunderstood his suggestion :)
Uh.. never mind. I misread this, not spotting the "if" :). -- 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
pgpO9byEvxjzr.pgp
Description: PGP signature