From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEpLz-00043G-IB for qemu-devel@nongnu.org; Sun, 19 Jun 2016 22:54:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEpLv-0002r0-FR for qemu-devel@nongnu.org; Sun, 19 Jun 2016 22:54:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEpLv-0002qw-9q for qemu-devel@nongnu.org; Sun, 19 Jun 2016 22:54:19 -0400 References: <1466245444-24258-1-git-send-email-karahmed@amazon.de> From: Jason Wang Message-ID: <57675AD6.6020504@redhat.com> Date: Mon, 20 Jun 2016 10:54:14 +0800 MIME-Version: 1.0 In-Reply-To: <1466245444-24258-1-git-send-email-karahmed@amazon.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: KarimAllah Ahmed , qemu-devel@nongnu.org Cc: Dmitry Fleytman , Anthony Liguori On 2016=E5=B9=B406=E6=9C=8818=E6=97=A5 18:24, KarimAllah Ahmed wrote: > When a PCI device lives behind an IOMMU, it should use 'pci_dma_*' fami= ly of > functions when any transfer from/to guest memory is required while > 'cpu_physical_memory_*' family of functions completely bypass any MMU/I= OMMU in > the system. > > vmxnet3 was exclusively using 'cpu_physical_memory_*' family of functio= ns which > works fine with the default QEMU setup where IOMMU is not enabled but f= ails > miserably when IOMMU is enabled. This commit converts all such instance= s in > favor of 'pci_dma_*' > > Cc: Dmitry Fleytman > Cc: Jason Wang > Cc:qemu-devel@nongnu.org > Cc: Anthony Liguori > Signed-off-by: KarimAllah Ahmed > --- > hw/net/vmware_utils.h | 55 +++++++------ > hw/net/vmxnet3.c | 207 +++++++++++++++++++++++++++-------------= --------- > hw/net/vmxnet_tx_pkt.c | 19 ++--- > hw/net/vmxnet_tx_pkt.h | 8 +- > 4 files changed, 161 insertions(+), 128 deletions(-) Thanks for the patch, but could you pls rebase this on top of master?