Re: [PATCH] VMXNET3: Add support for virtual IOMMU

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

 



From: Andy King <acking@xxxxxxxxxx>
Date: Tue, 20 Aug 2013 10:33:32 -0700

> We can't just do virt_to_phys() on memory that we pass to the device and
> expect it to work in presence of a virtual IOMMU.  We need to add IOMMU
> mappings for such DMAs to work correctly.  Fix that with
> pci_alloc_consistent() where possible, or pci_map_single() where the
> mapping is short-lived or we don't control the allocation (netdev).
> 
> Also fix two small bugs:
> 1) use after free of rq->buf_info in vmxnet3_rq_destroy()
> 2) a cpu_to_le32() that should have been a cpu_to_le64()
> 
> Acked-by: George Zhang <georgezhang@xxxxxxxxxx>
> Acked-by: Aditya Sarwade <asarwade@xxxxxxxxxx>
> Signed-off-by: Andy King <acking@xxxxxxxxxx>

Please use dma_alloc_coherent() (or in fact dma_zalloc_coherent()),
dma_map_single() et al., because they are preferred and in particular
allow specification of GFP_* flags.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux