From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIEf0-0007fV-Hh for qemu-devel@nongnu.org; Sun, 30 Sep 2012 04:13:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIEez-0002k5-Lr for qemu-devel@nongnu.org; Sun, 30 Sep 2012 04:13:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIEez-0002jx-Ds for qemu-devel@nongnu.org; Sun, 30 Sep 2012 04:13:57 -0400 Message-ID: <5067FF3E.7040003@redhat.com> Date: Sun, 30 Sep 2012 10:13:50 +0200 From: Avi Kivity MIME-Version: 1.0 References: <50597D1F.3070607@redhat.com> <505991A2.6090709@siemens.com> <5059954A.50408@redhat.com> <50600F7B.5080106@redhat.com> <50602B0A.1020403@redhat.com> <50641976.3020405@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: Jan Kiszka , Marcelo Tosatti , "qemu-devel@nongnu.org" , Anthony Liguori , Paolo Bonzini On 09/29/2012 11:20 AM, liu ping fan wrote: > > Do we have iommus in qemu now, We do, but they're hacked into the scsi layer, see hw/sun4m_iommu.c. I don't know if it's a standalone iommu on real hardware or whether it is part of the HBA. > since there are no separate phys_maps > for real address and dev's virt address, and I think the iommu is only > needed by host, not guest, so need not emulated by qemu. Eventually we will emulate iommus for x86 too, so we need to consider them. > If no, we > can just reject the nested DMA, and the c_p_m_rw() can only be nested > once, so if introduce a wrapper for c_p_m_rw(), we can avoid > recursive big lock, right? Don't we need that for other reasons? If not, we can drop it for now. -- error compiling committee.c: too many arguments to function