From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeNeT-0007UY-3c for qemu-devel@nongnu.org; Wed, 06 Jul 2011 04:40:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeNeS-0002z4-53 for qemu-devel@nongnu.org; Wed, 06 Jul 2011 04:40:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeNeR-0002yN-S9 for qemu-devel@nongnu.org; Wed, 06 Jul 2011 04:40:08 -0400 Message-ID: <4E141F5D.6010609@redhat.com> Date: Wed, 06 Jul 2011 10:39:57 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1309863815-28236-1-git-send-email-hare@suse.de> <1309863815-28236-2-git-send-email-hare@suse.de> <1309863815-28236-3-git-send-email-hare@suse.de> <1309863815-28236-4-git-send-email-hare@suse.de> <1309863815-28236-5-git-send-email-hare@suse.de> <1309863815-28236-6-git-send-email-hare@suse.de> <4E13FECA.10101@suse.de> In-Reply-To: <4E13FECA.10101@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: Stefan Hajnoczi , Alexander Graf , qemu-devel@nongnu.org, kvm@vger.kernel.org, Stefan Haynoczi On 07/06/2011 08:20 AM, Hannes Reinecke wrote: >> >> We cannot map control structures from guest memory and treating them >> as valid request state later on. >> > Yes, I've been working on that one already. > What I'll be doing is to read in the sge count during 'map_sgl' and > store this value internally (in ->iov_cnt). And during unmap I'll be > using this value instead of the frame-provided one. > > That way we'll be checking the sge_count field only once when we slurp > in the entire frame. Note the flags too. Perhaps it's easier to simply copy the entire frame header... Paolo