From nobody Thu Nov 6 08:30:59 2025 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.zoho.com; dkim=fail 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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497524390649820.7758604223085; Thu, 15 Jun 2017 03:59:50 -0700 (PDT) Received: from localhost ([::1]:53151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLSVB-0005mw-Bu for importer@patchew.org; Thu, 15 Jun 2017 06:59:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLSOv-0008B0-68 for qemu-devel@nongnu.org; Thu, 15 Jun 2017 06:53:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLSOs-0007US-Au for qemu-devel@nongnu.org; Thu, 15 Jun 2017 06:53:21 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:34313) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLSOs-0007U5-4L for qemu-devel@nongnu.org; Thu, 15 Jun 2017 06:53:18 -0400 Received: by mail-wr0-x242.google.com with SMTP id y25so545047wrd.1 for ; Thu, 15 Jun 2017 03:53:17 -0700 (PDT) Received: from 640k.lan (94-39-191-51.adsl-ull.clienti.tiscali.it. [94.39.191.51]) by smtp.gmail.com with ESMTPSA id f21sm3258597wra.5.2017.06.15.03.53.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 03:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lNCFO5tRZeezConEoCfC131tFKxRB5IzjUZWoTDFnlM=; b=dlAozYUd3dm7sgMwXw+nktpODZbLU72Jz1NQq/H/q0b4BB1R65kwWqhHXkHp2vKSQ2 VjSF+x99RQXyJJ1oeTPnOESCZ5VAgIWRQGMaZgQrHF9akNDt8NS5dYREBWFF9vTwWOU/ JyKVL1AJteXiHAiIkPBKRlfIjqNmi7gIlb/ZyA7sj6VrNeo0YfAycGeqjN6xuoW4/+ih oyCh6YTwzFseCx3PPOck4d8/0KIZAOlHVsjbMrWjcsle+SVJQOaGOTOKXwfo6jRptMyT c0EUEtPsA2qI6be0fHvYCNlI99H4Qlut7SJtWoIL160sZfC8XHJi93kml57K5F1f+zdD esAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lNCFO5tRZeezConEoCfC131tFKxRB5IzjUZWoTDFnlM=; b=mpikwyDv6CxEJ7Q+rGqA1gqjAFX7Ih0J6ukyR/Cb9oQMh1p/TNY18cVpHYgzakkNF+ AOZMh6kZz5So1SyBC3A/6WuvpZYdv9Je/u70LhfJnz032R305WIiYeucXP8vzmh6CBJn Jq6fQI9EX1UmUck8xocFGzMstkkZgKvy+Xkd+H3FwZjLF+3tXYgI/rhIPXuU/b8368Hb /0IsXklK/eaiF6JCXxorAHOQ+MYUppxD0/ZOCrLFVW+BSK8v+xJTzmXytIiww6JrQJqL TqbOG51Dwm84GrfEtFzTEgNolizVmUbQOfVOZOd+t2XnsJJl8NACB6H2IHasDURvHZiM ytbQ== X-Gm-Message-State: AKS2vOzLkY/KZ3o/XoccEHGV/skPElXxq87vJU0wCNME1GUEZzQYlUEW geQXmzZ0qCcTvoJ1wqg= X-Received: by 10.28.68.134 with SMTP id r128mr3156273wma.114.1497523996884; Thu, 15 Jun 2017 03:53:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 15 Jun 2017 12:52:26 +0200 Message-Id: <1497523981-38449-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1497523981-38449-1-git-send-email-pbonzini@redhat.com> References: <1497523981-38449-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PULL 06/41] memory: remove memory_region_set_fd 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau Now unnecessary since ivshmem uses memory_region_init_ram_from_fd. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20170602141229.15326-7-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 11 ----------- memory.c | 10 ---------- 2 files changed, 21 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 51a54c9..37f8e78 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -825,17 +825,6 @@ static inline bool memory_region_is_rom(MemoryRegion *= mr) int memory_region_get_fd(MemoryRegion *mr); =20 /** - * memory_region_set_fd: Mark a RAM memory region as backed by a - * file descriptor. - * - * This function is typically used after memory_region_init_ram_ptr(). - * - * @mr: the memory region being queried. - * @fd: the file descriptor that backs @mr. - */ -void memory_region_set_fd(MemoryRegion *mr, int fd); - -/** * memory_region_from_host: Convert a pointer into a RAM memory region * and an offset within it. * diff --git a/memory.c b/memory.c index b2ace20..e08fa0a 100644 --- a/memory.c +++ b/memory.c @@ -1851,16 +1851,6 @@ int memory_region_get_fd(MemoryRegion *mr) return fd; } =20 -void memory_region_set_fd(MemoryRegion *mr, int fd) -{ - rcu_read_lock(); - while (mr->alias) { - mr =3D mr->alias; - } - mr->ram_block->fd =3D fd; - rcu_read_unlock(); -} - void *memory_region_get_ram_ptr(MemoryRegion *mr) { void *ptr; --=20 1.8.3.1