From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation Date: Wed, 06 Jul 2011 10:39:57 +0200 Message-ID: <4E141F5D.6010609@redhat.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Stefan Haynoczi , kvm@vger.kernel.org, Alexander Graf To: Hannes Reinecke Return-path: Received: from mx1.redhat.com ([209.132.183.28]:15033 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751614Ab1GFIkK (ORCPT ); Wed, 6 Jul 2011 04:40:10 -0400 In-Reply-To: <4E13FECA.10101@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: 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