From nobody Sat Feb 7 15:29:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1531928861498669.1139862087138; Wed, 18 Jul 2018 08:47:41 -0700 (PDT) Received: from localhost ([::1]:37280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffog0-00088S-8K for importer@patchew.org; Wed, 18 Jul 2018 11:47:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffoal-0003Hp-Jn for qemu-devel@nongnu.org; Wed, 18 Jul 2018 11:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffoag-0000Gx-DP for qemu-devel@nongnu.org; Wed, 18 Jul 2018 11:42:15 -0400 Received: from relay.sw.ru ([185.231.240.75]:36354) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ffoag-0000FA-33 for qemu-devel@nongnu.org; Wed, 18 Jul 2018 11:42:10 -0400 Received: from vz-out.virtuozzo.com ([185.231.240.5] helo=dptest2.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from ) id 1ffoad-0006bu-Dy; Wed, 18 Jul 2018 18:42:07 +0300 From: Denis Plotnikov To: dgilbert@redhat.com, quintela@redhat.com, pbonzini@redhat.com Date: Wed, 18 Jul 2018 18:41:47 +0300 Message-Id: <20180718154200.26777-5-dplotnikov@virtuozzo.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180718154200.26777-1-dplotnikov@virtuozzo.com> References: <20180718154200.26777-1-dplotnikov@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v1 04/17] background snapshot: make a dedicated type for ram block list X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The type will be used later to hold a list of ram blocks which memory content to be used for the vm state saving when making a background snapshot. Signed-off-by: Denis Plotnikov --- include/exec/ramlist.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/exec/ramlist.h b/include/exec/ramlist.h index 2e2ac6cb99..e0231d3bec 100644 --- a/include/exec/ramlist.h +++ b/include/exec/ramlist.h @@ -44,11 +44,13 @@ typedef struct { unsigned long *blocks[]; } DirtyMemoryBlocks; =20 +typedef QLIST_HEAD(, RAMBlock) RamBlockList; + typedef struct RAMList { QemuMutex mutex; RAMBlock *mru_block; /* RCU-enabled, writes protected by the ramlist lock. */ - QLIST_HEAD(, RAMBlock) blocks; + RamBlockList blocks; DirtyMemoryBlocks *dirty_memory[DIRTY_MEMORY_NUM]; uint32_t version; QLIST_HEAD(, RAMBlockNotifier) ramblock_notifiers; --=20 2.17.0