Lines Matching refs:tce

333 static long kvmppc_tce_to_ua(struct kvm *kvm, unsigned long tce,  in kvmppc_tce_to_ua()  argument
336 unsigned long gfn = tce >> PAGE_SHIFT; in kvmppc_tce_to_ua()
344 (tce & ~(PAGE_MASK | TCE_PCI_READ | TCE_PCI_WRITE)); in kvmppc_tce_to_ua()
350 unsigned long tce) in kvmppc_tce_validate() argument
352 unsigned long gpa = tce & ~(TCE_PCI_READ | TCE_PCI_WRITE); in kvmppc_tce_validate()
353 enum dma_data_direction dir = iommu_tce_direction(tce); in kvmppc_tce_validate()
364 if (kvmppc_tce_to_ua(stt->kvm, tce, &ua)) in kvmppc_tce_validate()
389 unsigned long idx, unsigned long tce) in kvmppc_tce_put() argument
401 if (!tce) in kvmppc_tce_put()
410 tbl[idx % TCES_PER_PAGE] = tce; in kvmppc_tce_put()
541 unsigned long ioba, unsigned long tce) in kvmppc_h_put_tce() argument
562 ret = kvmppc_tce_validate(stt, tce); in kvmppc_h_put_tce()
566 dir = iommu_tce_direction(tce); in kvmppc_h_put_tce()
568 if ((dir != DMA_NONE) && kvmppc_tce_to_ua(vcpu->kvm, tce, &ua)) { in kvmppc_h_put_tce()
591 kvmppc_tce_put(stt, entry, tce); in kvmppc_h_put_tce()
608 u64 tce; in kvmppc_h_put_tce_indirect() local
638 if (get_user(tce, tces + i)) { in kvmppc_h_put_tce_indirect()
642 tce = be64_to_cpu(tce); in kvmppc_h_put_tce_indirect()
644 ret = kvmppc_tce_validate(stt, tce); in kvmppc_h_put_tce_indirect()
660 if (get_user(tce, tces + i)) { in kvmppc_h_put_tce_indirect()
664 tce = be64_to_cpu(tce); in kvmppc_h_put_tce_indirect()
666 if (kvmppc_tce_to_ua(vcpu->kvm, tce, &ua)) { in kvmppc_h_put_tce_indirect()
674 iommu_tce_direction(tce)); in kvmppc_h_put_tce_indirect()
683 kvmppc_tce_put(stt, entry + i, tce); in kvmppc_h_put_tce_indirect()