From nobody Mon Feb 9 05:18:57 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=1588103077; cv=none; d=zohomail.com; s=zohoarc; b=Xvszt5y6WktvZRVG3t2X1S7yIgdOxUakqd8ZCYPS95+RiapKJ6ioeQRkX9S80aSLuNn2QKByafUuBadJmzhRlD4E82GdFBL3NP2YCgwaiMwgjVMiRX+00ewUlzolDqtSVhCF686RfXySps+Xs7NuqSeIvGeV/oXP1d55tC1St2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588103077; 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=8Lnbg1QoqysmcI1QpHi4Ugfwik3iNp8wG0u4WHFvFYc=; b=EmucdJZ7s7jYTqU+G1kZgpzzTdi2zbZMvz9L80gw/VznckhPeZf8KZ1RperYCYGRW099BCG9Au/MZqceCBF8hHpZvle6XonEeEMbV8AcNuI9HutY7Q7MBCumRXFefM2ZA3zd85KORIxyIlu2UTek94nXAOseNxVHvA67Fu6O2hg= 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 1588103077015418.59051642261954; Tue, 28 Apr 2020 12:44:37 -0700 (PDT) Received: from localhost ([::1]:47682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTW9h-00083e-02 for importer@patchew.org; Tue, 28 Apr 2020 15:44:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33548) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTW8n-0006to-U2 for qemu-devel@nongnu.org; Tue, 28 Apr 2020 15:43:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTW8m-0007Do-H1 for qemu-devel@nongnu.org; Tue, 28 Apr 2020 15:43:37 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29549 helo=us-smtp-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 1jTW8m-0007BJ-36 for qemu-devel@nongnu.org; Tue, 28 Apr 2020 15:43:36 -0400 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-mBaXvpenPy-Dquclno1caQ-1; Tue, 28 Apr 2020 15:43:33 -0400 Received: by mail-qv1-f72.google.com with SMTP id 65so23744198qva.17 for ; Tue, 28 Apr 2020 12:43:33 -0700 (PDT) Received: from xz-x1.hitronhub.home ([2607:9880:19c0:32::2]) by smtp.gmail.com with ESMTPSA id l24sm14239691qtp.8.2020.04.28.12.43.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 12:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588103015; 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=8Lnbg1QoqysmcI1QpHi4Ugfwik3iNp8wG0u4WHFvFYc=; b=NVX1LhUcqPOlq3T5g9w68K2eu8pav1V0jMy/ROS9aGHR7W2FhgYheG/N5Gp7HMLt2VyC72 5lloSIo+z2zV3D+BjaBLznxPecl2m+mKmDGc+V+8ksPDyNsTo85U0g8Rdy7RRC62UWMicv Bbbbjhooad62oleIvaGEdJlmbLiFLHs= X-MC-Unique: mBaXvpenPy-Dquclno1caQ-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=IbXTrIQrGmJBwtzshAWiRUJozp+LdTeq7bHKm90eFnE=; b=NPF6RTAA+QQMOndGttS08SojAbC92WkwN1H5gtiB5eBa7AcI0j1WaLpz1NVdF+qoS6 sdbj33DJhWa15IFrdcrqT/WR3aIgSNrZ7HTmMBB4t01sbiwly6DwTdLhQ1jFX3hSkF4b qE7Now3j7eO1Pj+4WN+Ft4gzubM8jiB22kdPa5YDtVdNmMSQxu547TbaDTIyOxBqMdY3 eQopIrRe/dX8d1BBhCQFfXYNE/JVKf+ozKc8NcVkgIPKPPCjSsB90ZJu6zeOPoD8qQ3G r/M/jayqdcwNQ+TidzyfMENNHXf3UJIJeNxU7gZJ6X9gedX4ozauRHqTkhgfweDhyT1u ns9w== X-Gm-Message-State: AGi0Puabe6ezmjm4ayP7mfs5OD/7oJqqvW1ejMR5rSHCJ88T6ZaW34V7 rSxDQngjZfmb5Pr9kNhM3uq9wPuN7VavX83Gz8xhzHliAuFDhsYVAh4uE7cJLNvyYoLQ+3wEzZc gA63kGyHaTg9v6gM= X-Received: by 2002:ac8:f23:: with SMTP id e32mr30727050qtk.368.1588103012182; Tue, 28 Apr 2020 12:43:32 -0700 (PDT) X-Google-Smtp-Source: APiQypKJICGBvNYz1WYnmC8J1Reoa6vGgFHzA2cmnkiX4vno/3BqnrCHcZ2g9Iwr/u81OvrzkA63sQ== X-Received: by 2002:ac8:f23:: with SMTP id e32mr30726982qtk.368.1588103011459; Tue, 28 Apr 2020 12:43:31 -0700 (PDT) From: Peter Xu To: qemu-devel@nongnu.org Subject: [PATCH RFC 4/4] kvm: No need to sync dirty bitmap before memslot removal any more Date: Tue, 28 Apr 2020 15:42:19 -0400 Message-Id: <20200428194219.10963-5-peterx@redhat.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200428194219.10963-1-peterx@redhat.com> References: <20200428194219.10963-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=207.211.31.120; envelope-from=peterx@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/28 04:15:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Paolo Bonzini , Tian Kevin , "Dr . David Alan Gilbert" , peterx@redhat.com, Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" With the system reset dirty sync in qemu_system_reset(), we should be able = to drop this operation now. After all it doesn't really fix the problem clean= ly because logically we could still have a race [1]. [1] https://lore.kernel.org/qemu-devel/20200327150425.GJ422390@xz-x1/ Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 439a4efe52..e1c87fa4e1 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -1061,9 +1061,6 @@ static void kvm_set_phys_mem(KVMMemoryListener *kml, if (!mem) { goto out; } - if (mem->flags & KVM_MEM_LOG_DIRTY_PAGES) { - kvm_physical_sync_dirty_bitmap(kml, section); - } =20 /* unregister the slot */ g_free(mem->dirty_bmap); --=20 2.24.1