From nobody Sun Dec 14 05:52:17 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1754569133; cv=none; d=zohomail.com; s=zohoarc; b=mau8hzGtfoB8sU+lKKOOACEjR+OqSd2IT2GfkBpkjO8Kcism54UWuXWlFXtbFOZuRLOWCCnmWP+k62BVnUY72b+ikBCzllnF79zYQOQOdIE4wCvI0fM8/3Eqbwz9N+gjiZdra/LYq0PIi9nyVlEobdgmXJwh8Xk92t8KS5wpT6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1754569133; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6fwcxpIPb3V9NZsGHn+2eEjG4MuVOP/inIAUUpIcvGI=; b=IbQHkr8iseqQty5BVLPCPYzU32elAH8e8V+YknLhmHpQh+Xhfm8eszegY/9DPavETAEaALFOL3gQVYRkD8DJuGqOFxLgobHbWk2tE90SKbv9t/MZS8U1x3HCRw10Ygi6RlEK3sR9yUXwxgTnEdKpLTTS7nrrrRc5f+feUneEIM0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1754569133172805.484687393388; Thu, 7 Aug 2025 05:18:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ujzRD-0007t1-1M; Thu, 07 Aug 2025 08:09:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujzQn-0007Rn-3b; Thu, 07 Aug 2025 08:09:15 -0400 Received: from mgamail.intel.com ([192.198.163.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujzQk-00054a-Bd; Thu, 07 Aug 2025 08:09:12 -0400 Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2025 05:09:07 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by orviesa009.jf.intel.com with ESMTP; 07 Aug 2025 05:09:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1754568550; x=1786104550; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I+BnrSmaOgS4QOTYt1Xg56BqMt16d9NeDnkZ1ZXGGos=; b=JTdWse8H1M48Nnjk1vXHS+9JmyxIEAn/oZO6xnuqgw3gqVAqafv2mFJ2 HorT7mQ5ZzzOtAn5IEb/9KqILAJo16PONO+4oo8WWrcr2mbGMaJ7Mf3Ws pahy/0mZ87uZ9zAInrfrXzOB9Qsf7xdWwkLCSnAR0wmeSWfIJmJZEWgZo GrihLz9KGd6Xw5J/nwar//AVUhoAHglq3hfGiguYxaekZxHMDoFVYdtHz a52KfxDOXnadsAY115OD/XVx23xeBRXX/IWeVjAbeQDupLIxAx/LG68/8 TBLbSpYMWkHbszIOrP8AMTnzOdC06nYCZdcucHLeIhHoRZWlVRolFdsTd g==; X-CSE-ConnectionGUID: my+/uoYAT/S+DA+k04NqAQ== X-CSE-MsgGUID: /92FSpEwTWy7xD9+YBNiOA== X-IronPort-AV: E=McAfee;i="6800,10657,11514"; a="57036705" X-IronPort-AV: E=Sophos;i="6.17,271,1747724400"; d="scan'208";a="57036705" X-CSE-ConnectionGUID: PcNirZzsQiSQjyHfgaY9pQ== X-CSE-MsgGUID: CORasR4+QHCEFVLsCCqYew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,271,1747724400"; d="scan'208";a="164701039" From: Zhao Liu To: Paolo Bonzini , Peter Xu , David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Junjie Mao Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org, Dapeng Mi , Chuanxiao Dong , Zhao Liu Subject: [RFC 02/26] rust/cargo: Add the support for vm-memory Date: Thu, 7 Aug 2025 20:30:03 +0800 Message-Id: <20250807123027.2910950-3-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250807123027.2910950-1-zhao1.liu@intel.com> References: <20250807123027.2910950-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.198.163.15; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1754569134065116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Zhao Liu --- rust/Cargo.lock | 52 ++++++++++++++++++++++++++++++++++++++++ rust/qemu-api/Cargo.toml | 11 +++++++++ 2 files changed, 63 insertions(+) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index b785c718f315..7aedae239f66 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -133,6 +133,7 @@ dependencies =3D [ "foreign", "libc", "qemu_api_macros", + "vm-memory", ] =20 [[package]] @@ -164,6 +165,26 @@ dependencies =3D [ "unicode-ident", ] =20 +[[package]] +name =3D "thiserror" +version =3D "1.0.65" +source =3D "registry+https://github.com/rust-lang/crates.io-index" +checksum =3D "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057= b3d5" +dependencies =3D [ + "thiserror-impl", +] + +[[package]] +name =3D "thiserror-impl" +version =3D "1.0.65" +source =3D "registry+https://github.com/rust-lang/crates.io-index" +checksum =3D "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f= 8602" +dependencies =3D [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name =3D "unicode-ident" version =3D "1.0.12" @@ -175,3 +196,34 @@ name =3D "version_check" version =3D "0.9.4" source =3D "registry+https://github.com/rust-lang/crates.io-index" checksum =3D "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e= 483f" + +[[package]] +name =3D "vm-memory" +version =3D "0.16.1" +source =3D "git+https://github.com/rust-vmm/vm-memory.git?rev=3D5eb996a060= d7ca3844cbd2f10b1d048c0c91942f#5eb996a060d7ca3844cbd2f10b1d048c0c91942f" +dependencies =3D [ + "thiserror", + "winapi", +] + +[[package]] +name =3D "winapi" +version =3D "0.3.9" +source =3D "registry+https://github.com/rust-lang/crates.io-index" +checksum =3D "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00= f419" +dependencies =3D [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name =3D "winapi-i686-pc-windows-gnu" +version =3D "0.4.0" +source =3D "registry+https://github.com/rust-lang/crates.io-index" +checksum =3D "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51= b7b6" + +[[package]] +name =3D "winapi-x86_64-pc-windows-gnu" +version =3D "0.4.0" +source =3D "registry+https://github.com/rust-lang/crates.io-index" +checksum =3D "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931= 183f" diff --git a/rust/qemu-api/Cargo.toml b/rust/qemu-api/Cargo.toml index db7000dee441..bbed3d2de514 100644 --- a/rust/qemu-api/Cargo.toml +++ b/rust/qemu-api/Cargo.toml @@ -19,6 +19,17 @@ anyhow =3D "~1.0" libc =3D "0.2.162" foreign =3D "~0.3.1" =20 +[dependencies.vm-memory] +# The latest v0.16.2 didn't contain Paolo's commit 5f59e29c3d30 +# ("guest_memory: let multiple regions slice one global bitmap"). +# Once a new release has that change, switch to crates.io. +git =3D "https://github.com/rust-vmm/vm-memory.git" +rev =3D "5eb996a060d7ca3844cbd2f10b1d048c0c91942f" +# Note "rawfd" (as the only default feature) is disabled by default in +# meson. It cause compilation failure on Windows and fortunately, we +# don't need it either. +default-features =3D false + [features] default =3D ["debug_cell"] allocator =3D [] --=20 2.34.1