From patchwork Wed Feb 22 14:33:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 142501 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D9D15B6F98 for ; Thu, 23 Feb 2012 02:38:50 +1100 (EST) Received: from localhost ([::1]:56251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0DHX-00042L-5L for incoming@patchwork.ozlabs.org; Wed, 22 Feb 2012 09:34:59 -0500 Received: from eggs.gnu.org ([140.186.70.92]:47123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0DGu-0002e6-22 for qemu-devel@nongnu.org; Wed, 22 Feb 2012 09:34:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0DGk-0002MQ-Dg for qemu-devel@nongnu.org; Wed, 22 Feb 2012 09:34:19 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:64984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0DGk-0002M5-5w for qemu-devel@nongnu.org; Wed, 22 Feb 2012 09:34:10 -0500 Received: by mail-pw0-f45.google.com with SMTP id ro12so281162pbb.4 for ; Wed, 22 Feb 2012 06:34:09 -0800 (PST) Received-SPF: pass (google.com: domain of paolo.bonzini@gmail.com designates 10.68.226.170 as permitted sender) client-ip=10.68.226.170; Authentication-Results: mr.google.com; spf=pass (google.com: domain of paolo.bonzini@gmail.com designates 10.68.226.170 as permitted sender) smtp.mail=paolo.bonzini@gmail.com; dkim=pass header.i=paolo.bonzini@gmail.com Received: from mr.google.com ([10.68.226.170]) by 10.68.226.170 with SMTP id rt10mr2012621pbc.127.1329921249776 (num_hops = 1); Wed, 22 Feb 2012 06:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=K0QmixyE5G/4lSxgIWojKjYBIXfka3XLy70JqfNPVRE=; b=g8y7eEtnYdkpHHOzwvmAYkUx7OKmjdiPTOlqQ3GhvMWsgW+SxeIWRFVSyQ4XhJOhLr b52S/zfvwrgtis2VxueZkPMAEZxHqze0AGt2nX3pGVlL3nleqTdkaoHT2iFsp1X4hnON DXL3HtgkGisNNQWzG2Ewb4uoCSJVvzYpDyWqI= Received: by 10.68.226.170 with SMTP id rt10mr1720491pbc.127.1329921249724; Wed, 22 Feb 2012 06:34:09 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-182-16.ip50.fastwebnet.it. [93.34.182.16]) by mx.google.com with ESMTPS id q1sm19120759pbv.49.2012.02.22.06.34.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Feb 2012 06:34:08 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 22 Feb 2012 15:33:39 +0100 Message-Id: <1329921236-23461-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1329921236-23461-1-git-send-email-pbonzini@redhat.com> References: <1329921236-23461-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Subject: [Qemu-devel] [PATCH v4 01/18] dma-helpers: make QEMUSGList target independent X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org scsi-disk will manage scatter/gather list, but it does not create single entries so it remains target-independent. Make QEMUSGList available to it. Signed-off-by: Paolo Bonzini --- dma.h | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dma.h b/dma.h index a13209d..d50019b 100644 --- a/dma.h +++ b/dma.h @@ -17,6 +17,13 @@ typedef struct ScatterGatherEntry ScatterGatherEntry; +struct QEMUSGList { + ScatterGatherEntry *sg; + int nsg; + int nalloc; + size_t size; +}; + #if defined(TARGET_PHYS_ADDR_BITS) typedef target_phys_addr_t dma_addr_t; @@ -32,13 +39,6 @@ struct ScatterGatherEntry { dma_addr_t len; }; -struct QEMUSGList { - ScatterGatherEntry *sg; - int nsg; - int nalloc; - dma_addr_t size; -}; - void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint); void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len); void qemu_sglist_destroy(QEMUSGList *qsg);