From nobody Tue Feb 10 14:49:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589185291; cv=none; d=zohomail.com; s=zohoarc; b=l4Na+l9vswSE5KCPyJLNYCSLvBcp4RhkL6wJa5Um7B4dwYBN47BtS35/w9W52GR2bLutBk1JFlMOyr6Butg3AIcbXP5cZ0qQjwpfRoBweW+ze+XCPirmm0V7Q4OdlLVMqr9KBW/+s4CPjpuD4nbHsZOHjzyQrYyHWEtEhyqC59M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589185291; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tSfIOqlIt2t/ygoZKZ0BPDhjsEwlu4jVN7jfPQltXnc=; b=PB2bAyCZYfXbHtEiyBPKPEPJD7n0Er81IwHzSL9XQhpLR2bPNnfzA2POXHjOOUAUaODfCwlcsSun9BAPbCL/2Q0zOFSpTf2viQTs83bS76a0Z6Cuv2F5Dzuh0+sgYDNraOYRsR06qwl/pp0uoHccr0G1SLT19rN4gh2x3DN7KJM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589185291176590.7765248405146; Mon, 11 May 2020 01:21:31 -0700 (PDT) Received: from localhost ([::1]:37118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY3gn-0008WJ-Vk for importer@patchew.org; Mon, 11 May 2020 04:21:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY3dB-0003QJ-Bz for qemu-devel@nongnu.org; Mon, 11 May 2020 04:17:45 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:59872 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jY3dA-0002or-M1 for qemu-devel@nongnu.org; Mon, 11 May 2020 04:17:45 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-414-O3LEHLewMhmSy0bHXH57xg-1; Mon, 11 May 2020 04:17:42 -0400 Received: by mail-wm1-f71.google.com with SMTP id v23so5005554wmj.0 for ; Mon, 11 May 2020 01:17:42 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id o26sm14683656wro.83.2020.05.11.01.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 01:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589185064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tSfIOqlIt2t/ygoZKZ0BPDhjsEwlu4jVN7jfPQltXnc=; b=bgIqepewjKoKtB/l2ThdN0f9VKuExP1oZS0JaSyogxBAQQoHrhY62P4aWaxO9J4wlGQwbS Qujw8BC+JPIAKl5Ib1bQ7F1f7TlUbxDmRl8jqBS0q14KwOtpcfYQkSELy0X9Eyb1E9vUfj ikLtaiFCMhx1wyxwpmw/E6gWWR8Ls8I= X-MC-Unique: O3LEHLewMhmSy0bHXH57xg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tSfIOqlIt2t/ygoZKZ0BPDhjsEwlu4jVN7jfPQltXnc=; b=qrgfvR7Osz4I+OIcwxwAMVA4mWZ7V1ouRgu8Qi2UlpaDOQSlQU+J7sjlZj11q/b8RI oVYTO1K2hv1nhpBzKNwFRod15Cf9N/WK7IyAoPDSStwd6WLNhg6KESFDFFHuKa9A7kll TivMTRfHllhu03HAwB5bwUDtgzK2ooZbFqMjLT2A3tt+RNYyuB51tYVOxaeWMLQRGnfZ fwOAlRowu0bksbg4/8LAcuXONacEf9oOKfP6QqFePFpwV4Vn/i/kkZGCly+pU5/uBSjn oqP8qeyJPkwjrs01u1On7qqIUXDp+5eAg6ljJg2GKY9jnFB2mkb8rip1FiOxEovfxC/r OFTQ== X-Gm-Message-State: AGi0PuaN/DNBgd3jVKQZsPVlqUXnsu954GJ0SiyEN0iiJ4Qqu3Lon/pU yYcoM5boXxn6++h+3/xNFp73i6Be53WUwIQBL8+JmU3mLqQZGLdGH7pYF2cfUc6LhP/sULQ2Zj7 CMBhKjf0o3ZzPBVQ= X-Received: by 2002:a1c:4d17:: with SMTP id o23mr28919818wmh.47.1589185060982; Mon, 11 May 2020 01:17:40 -0700 (PDT) X-Google-Smtp-Source: APiQypLvrSVcCxsl5UqPYYZ+FqM70FTTVIzUWz3eyvyepS6ativy6YX0/sHoR4uJdH1WXxMBye/fUA== X-Received: by 2002:a1c:4d17:: with SMTP id o23mr28919798wmh.47.1589185060762; Mon, 11 May 2020 01:17:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 4/4] exec: Rename qemu_ram_writeback() as qemu_ram_msync() Date: Mon, 11 May 2020 10:17:19 +0200 Message-Id: <20200511081719.31641-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200511081719.31641-1-philmd@redhat.com> References: <20200511081719.31641-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" 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=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 03:10:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Beata Michalska , qemu-block@nongnu.org, Max Reitz , qemu-arm@nongnu.org, Stefan Hajnoczi , Keith Busch , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Rename qemu_ram_writeback() as qemu_ram_msync() to better match what it does. Suggested-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/ram_addr.h | 4 ++-- exec.c | 2 +- memory.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index a94809f89b..84817e19fa 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -136,12 +136,12 @@ void qemu_ram_free(RAMBlock *block); =20 int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp); =20 -void qemu_ram_writeback(RAMBlock *block, ram_addr_t start, ram_addr_t leng= th); +void qemu_ram_msync(RAMBlock *block, ram_addr_t start, ram_addr_t length); =20 /* Clear whole block of mem */ static inline void qemu_ram_block_writeback(RAMBlock *block) { - qemu_ram_writeback(block, 0, block->used_length); + qemu_ram_msync(block, 0, block->used_length); } =20 #define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1) diff --git a/exec.c b/exec.c index 2874bb5088..f5a8cdf370 100644 --- a/exec.c +++ b/exec.c @@ -2127,7 +2127,7 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsi= ze, Error **errp) * Otherwise no-op. * @Note: this is supposed to be a synchronous op. */ -void qemu_ram_writeback(RAMBlock *block, ram_addr_t start, ram_addr_t leng= th) +void qemu_ram_msync(RAMBlock *block, ram_addr_t start, ram_addr_t length) { /* The requested range should fit in within the block range */ g_assert((start + length) <=3D block->used_length); diff --git a/memory.c b/memory.c index 73534b26f4..5bfa1429df 100644 --- a/memory.c +++ b/memory.c @@ -2197,7 +2197,6 @@ void memory_region_ram_resize(MemoryRegion *mr, ram_a= ddr_t newsize, Error **errp qemu_ram_resize(mr->ram_block, newsize, errp); } =20 - void memory_region_sync(MemoryRegion *mr, hwaddr addr, hwaddr size) { /* @@ -2205,7 +2204,7 @@ void memory_region_sync(MemoryRegion *mr, hwaddr addr= , hwaddr size) * different types of memory regions */ if (mr->ram_block) { - qemu_ram_writeback(mr->ram_block, addr, size); + qemu_ram_msync(mr->ram_block, addr, size); } } =20 --=20 2.21.3