From nobody Mon Feb 9 05:06:57 2026 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.zohomail.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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 154326173598752.06561712204177; Mon, 26 Nov 2018 11:48:55 -0800 (PST) Received: from localhost ([::1]:38470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRMsI-0007FW-0V for importer@patchew.org; Mon, 26 Nov 2018 14:48:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRMkP-00081Q-4K for qemu-devel@nongnu.org; Mon, 26 Nov 2018 14:40:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRMkO-0004Ng-Ba for qemu-devel@nongnu.org; Mon, 26 Nov 2018 14:40:45 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:38096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRMkO-0004IV-5m for qemu-devel@nongnu.org; Mon, 26 Nov 2018 14:40:44 -0500 Received: by mail-wr1-x42a.google.com with SMTP id v13so16769491wrw.5 for ; Mon, 26 Nov 2018 11:40:44 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id s139sm2412468wmd.3.2018.11.26.11.40.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 11:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=mU0MKeFfb9e33fss5OcOobQzFrwrdtuT48mCJn41SXU=; b=L9lWZN24cnxfZ7tSpfnvzq3QyMTSXzobaMlw0ZmECK0GMU7FXtW9v5btwQl2bQwewp qb30KIzG7UBCmvtHZCBke8VmxEmJfKhkIcY0VWZx0yuQSEJWIaIRRiFfzSi6X2Z4ovUO 7O7vbgfSEeRCoJd4eOU9KfT9lFKB7ngLSQRiwuT39nsWliW9qBUf7wuqWLtBgPLJaNUH Lt2kmW2pLy85jsQOFH4YmKlHikQQJ437ULBrOCeL6gAE9UDunqLOOJi/MStiYI1iY1FA GOjExDkVi9VDeo6612x+VCC3WreWVHf4dV3wLEKXrztH4q5rnDjnipdZVOtj3zAlGdIp 5/JQ== 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:subject:date:message-id :in-reply-to:references; bh=mU0MKeFfb9e33fss5OcOobQzFrwrdtuT48mCJn41SXU=; b=a9BGtTe3QrgZOjJyXMY9197bdf8JsuLrkmp8divVDDjMBihd+jx2JcSgwdRPodHhm+ 5GFie52ixqCVJq/4ILofmnd6RxtVf70I4w3hac/nVpqI+kUN7Zgbz+QZW/YakWNKGBCX STKQe6R3anYoCtyXiIEp2bRgt9oOEg4zzBZTp5qREaT+vtLARd1ETp9IrDLrMJy2scFA Un79gKcbVzP9FMHmTm18Qg+ClV/NDW7/HYSptd2WZc9bppQe6BnSg/7SXqWlZxXyYUKz bKBAlBlTeR561057t3I+DjQIdcofttMSCexCEJZ3z7DtaMvYqXWalGFKj29IR4uchtMU 3IlA== X-Gm-Message-State: AA+aEWYf80vwEkgnz/wiB8l4ht2PdeYi1hpZzQf7lujkIvzlJq7RqIuw 8fnLXc1f+k5Yle+1ggs4mSK9yqkM X-Google-Smtp-Source: AFSGD/X2K5yI5fjSo8WUj4hZRphhTgwCZn+2sHBOSHpazBSEcnmG+3kIiaJlccsLU3MvtVdiU8AdLw== X-Received: by 2002:adf:f785:: with SMTP id q5mr26395006wrp.9.1543261242714; Mon, 26 Nov 2018 11:40:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 26 Nov 2018 20:40:24 +0100 Message-Id: <1543261235-2834-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1543261235-2834-1-git-send-email-pbonzini@redhat.com> References: <1543261235-2834-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a Subject: [Qemu-devel] [PULL 04/15] migration: savevm: consult migration blockers 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There is really no difference between live migration and savevm, except that savevm does not require bdrv_invalidate_cache to be implemented by all disks. However, it is unlikely that savevm is used with anything except qcow2 disks, so the penalty is small and worth the improvement in catching bad usage of savevm. Only one place was taking care of savevm when adding a migration blocker, and it can be removed. Signed-off-by: Paolo Bonzini --- migration/savevm.c | 4 ++++ target/i386/kvm.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index ef707b8..1c49776 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2455,6 +2455,10 @@ int save_snapshot(const char *name, Error **errp) struct tm tm; AioContext *aio_context; =20 + if (migration_is_blocked(errp)) { + return false; + } + if (!replay_can_snapshot()) { error_setg(errp, "Record/replay does not allow making snapshot " "right now. Try once more later."); diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 27dcca5..77e44b6 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1265,7 +1265,6 @@ int kvm_arch_init_vcpu(CPUState *cs) if (!env->user_tsc_khz) { if ((env->features[FEAT_8000_0007_EDX] & CPUID_APM_INVTSC) && invtsc_mig_blocker =3D=3D NULL) { - /* for migration */ error_setg(&invtsc_mig_blocker, "State blocked by non-migratable CPU device" " (invtsc flag)"); @@ -1275,8 +1274,6 @@ int kvm_arch_init_vcpu(CPUState *cs) error_free(invtsc_mig_blocker); return r; } - /* for savevm */ - vmstate_x86_cpu.unmigratable =3D 1; } } =20 --=20 1.8.3.1