From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18A4AC4338F for ; Tue, 24 Aug 2021 15:28:38 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C442861265 for ; Tue, 24 Aug 2021 15:28:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C442861265 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:58400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIYLt-00047j-0M for qemu-devel@archiver.kernel.org; Tue, 24 Aug 2021 11:28:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIYKo-0001wR-3I for qemu-devel@nongnu.org; Tue, 24 Aug 2021 11:27:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIYKl-0006g1-NT for qemu-devel@nongnu.org; Tue, 24 Aug 2021 11:27:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629818846; 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; bh=52/dwilpsB+kW1ac7Nh0FXeU5FkHbntdlPny76rN52k=; b=K3zjXHq8AVU3HH21IHsFB+8ojEGgMpXmEfg1uhhplk10Sz/ZtlGxqHR2FI9ShFcRzOIqvN NumX7G769MAwxYuUsQP+XvhcapOEiaUuo+zxlMC33fPBcbZGcFGHNyaywC2/JllXfF9R/N 346r83UTgkPxQkXl2YZ85CI4eZJxQrc= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-88-5WN36JwPMnmiuBpwlycERA-1; Tue, 24 Aug 2021 11:27:25 -0400 X-MC-Unique: 5WN36JwPMnmiuBpwlycERA-1 Received: by mail-qt1-f199.google.com with SMTP id q19-20020ac87353000000b0029a09eca2afso10739456qtp.21 for ; Tue, 24 Aug 2021 08:27:25 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=52/dwilpsB+kW1ac7Nh0FXeU5FkHbntdlPny76rN52k=; b=QSQdu1LcbfjmWWTydRTIDwGaOfZtxjv4FGiQ8hZAU8HhWAm8P+WlbQXcsFx9kea3jo oHSgXXg+24sBIoubaxO+ci7s/+wfB4RRiF0Gu1+ptH2V3pp/Up10i7+6zg1WCY2S9gid DPlcIHqdrvZGQCxm6gTwIRWvQT07P2qmi2DAAzkzwIFtfuwWPQiH99yplfvURttynnH+ c4XacKrhbJlnz81uz0dOuzMuCS6+UW6qkzANQo3Kr4+IGkhZQRwcSPm2Ei/3NrcCCBxH 5rPeVyrPHQuiZV9WZkTz820PCC5CDapMgKAOjp3FhglR3hgfDKfQrvyulbAStvK+OqZH zewQ== X-Gm-Message-State: AOAM533BrItQU9KMOi9FGqlAuW2UbeWEXpGPXtC78bR1NlKl4jrdryVu ohZDWs32n4ICFM9Y2BYj4KAYNJApjVl6/vz8LUCQVDbFxb8Ww8zkFSLHYgygVI/8CqeYQxny57j YIyct9JZA8z48Bi3VHB34F+aFWsBHn8g2gaPuxkhBx1gE1t9o4/Bt1bTrlPvH7r7O X-Received: by 2002:a0c:e2d1:: with SMTP id t17mr1332782qvl.56.1629818844416; Tue, 24 Aug 2021 08:27:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNDA3iKF/f03e8z80s85WTctkiBRmGrOFtZ6H5btJpYpvLhvZhwk2JfBSuwKKJIlenIQCBAg== X-Received: by 2002:a0c:e2d1:: with SMTP id t17mr1332746qvl.56.1629818844101; Tue, 24 Aug 2021 08:27:24 -0700 (PDT) Received: from t490s.phub.net.cable.rogers.com ([2607:fea8:56a3:500::d413]) by smtp.gmail.com with ESMTPSA id j127sm10939754qkf.20.2021.08.24.08.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 08:27:23 -0700 (PDT) From: Peter Xu To: qemu-devel@nongnu.org Subject: [PATCH 0/2] dump-guest-memory: Add blocker for migration Date: Tue, 24 Aug 2021 11:27:19 -0400 Message-Id: <20210824152721.79747-1-peterx@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.747, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Juan Quintela , "Dr . David Alan Gilbert" , peterx@redhat.com, Leonardo Bras Soares Passos , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Both dump-guest-memory and live migration have vm state cached internally. Allowing them to happen together means the vm state can be messed up. Simply block live migration for dump-guest-memory. One trivial thing to mention is we should still allow dump-guest-memory even if -only-migratable is specified, because that flag should majorly be used to guarantee not adding devices that will block migration by accident. Dump guest memory is not like that - it'll only block for the seconds when it's dumping. Thanks, Peter Xu (2): migration: Add migrate_add_blocker_internal() dump-guest-memory: Block live migration dump/dump.c | 20 +++++++++++++++----- include/migration/blocker.h | 16 ++++++++++++++++ include/sysemu/dump.h | 1 + migration/migration.c | 21 +++++++++++++-------- 4 files changed, 45 insertions(+), 13 deletions(-) -- 2.31.1