Lines Matching refs:tce
78 static long kvmppc_rm_tce_to_ua(struct kvm *kvm, unsigned long tce, in kvmppc_rm_tce_to_ua() argument
81 unsigned long gfn = tce >> PAGE_SHIFT; in kvmppc_rm_tce_to_ua()
89 (tce & ~(PAGE_MASK | TCE_PCI_READ | TCE_PCI_WRITE)); in kvmppc_rm_tce_to_ua()
106 unsigned long tce) in kvmppc_rm_tce_validate() argument
108 unsigned long gpa = tce & ~(TCE_PCI_READ | TCE_PCI_WRITE); in kvmppc_rm_tce_validate()
109 enum dma_data_direction dir = iommu_tce_direction(tce); in kvmppc_rm_tce_validate()
120 if (kvmppc_rm_tce_to_ua(stt->kvm, tce, &ua, NULL)) in kvmppc_rm_tce_validate()
172 unsigned long idx, unsigned long tce) in kvmppc_rm_tce_put() argument
186 tbl[idx % TCES_PER_PAGE] = tce; in kvmppc_rm_tce_put()
387 unsigned long ioba, unsigned long tce) in kvmppc_rm_h_put_tce() argument
406 ret = kvmppc_rm_ioba_validate(stt, ioba, 1, tce == 0); in kvmppc_rm_h_put_tce()
410 ret = kvmppc_rm_tce_validate(stt, tce); in kvmppc_rm_h_put_tce()
414 dir = iommu_tce_direction(tce); in kvmppc_rm_h_put_tce()
415 if ((dir != DMA_NONE) && kvmppc_rm_tce_to_ua(vcpu->kvm, tce, &ua, NULL)) in kvmppc_rm_h_put_tce()
436 kvmppc_rm_tce_put(stt, entry, tce); in kvmppc_rm_h_put_tce()
558 unsigned long tce = be64_to_cpu(((u64 *)tces)[i]); in kvmppc_rm_h_put_tce_indirect() local
560 ret = kvmppc_rm_tce_validate(stt, tce); in kvmppc_rm_h_put_tce_indirect()
566 unsigned long tce = be64_to_cpu(((u64 *)tces)[i]); in kvmppc_rm_h_put_tce_indirect() local
569 if (kvmppc_rm_tce_to_ua(vcpu->kvm, tce, &ua, NULL)) { in kvmppc_rm_h_put_tce_indirect()
577 iommu_tce_direction(tce)); in kvmppc_rm_h_put_tce_indirect()
586 kvmppc_rm_tce_put(stt, entry + i, tce); in kvmppc_rm_h_put_tce_indirect()