From nobody Mon Sep 16 19:04:35 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=quarantine dis=none) header.from=akamai.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1706566995604868.7444118463264; Mon, 29 Jan 2024 14:23:15 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5098419F6; Mon, 29 Jan 2024 17:23:14 -0500 (EST) Received: from lists.libvirt.org.85.43.8.in-addr.arpa (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 34272185B; Mon, 29 Jan 2024 17:22:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id E6CDF19F6; Mon, 29 Jan 2024 17:21:56 -0500 (EST) Received: from mx0a-00190b01.pphosted.com (mx0a-00190b01.pphosted.com [67.231.149.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C89B7185B for ; Mon, 29 Jan 2024 17:21:55 -0500 (EST) Received: from pps.filterd (m0050095.ppops.net [127.0.0.1]) by m0050095.ppops.net-00190b01. (8.17.1.24/8.17.1.24) with ESMTP id 40TI7NLk022513; Mon, 29 Jan 2024 21:44:46 GMT Received: from prod-mail-ppoint1 (prod-mail-ppoint1.akamai.com [184.51.33.18] (may be forged)) by m0050095.ppops.net-00190b01. (PPS) with ESMTPS id 3vvt88bard-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Jan 2024 21:44:45 +0000 (GMT) Received: from pps.filterd (prod-mail-ppoint1.akamai.com [127.0.0.1]) by prod-mail-ppoint1.akamai.com (8.17.1.19/8.17.1.19) with ESMTP id 40TL5gpE013501; Mon, 29 Jan 2024 16:44:44 -0500 Received: from prod-mail-relay10.akamai.com ([172.27.118.251]) by prod-mail-ppoint1.akamai.com (PPS) with ESMTP id 3vvx22v4v8-1; Mon, 29 Jan 2024 16:44:44 -0500 Received: from bos-lhvcg5.bos01.corp.akamai.com (bos-lhvcg5.bos01.corp.akamai.com [172.28.221.19]) by prod-mail-relay10.akamai.com (Postfix) with ESMTP id 40FA364417; Mon, 29 Jan 2024 21:44:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 From: mgalaxy@akamai.com To: devel@lists.libvirt.org Subject: [PATCH 4/5] Support live migration between file-backed memory and anonymous memory. Date: Mon, 29 Jan 2024 16:43:56 -0500 Message-Id: <20240129214357.1281805-5-mgalaxy@akamai.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240129214357.1281805-1-mgalaxy@akamai.com> References: <20240129214357.1281805-1-mgalaxy@akamai.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-29_14,2024-01-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401290159 X-Proofpoint-ORIG-GUID: YdoBVtsC5uYLBLXrU3uFhjRy7N7CBaEV X-Proofpoint-GUID: YdoBVtsC5uYLBLXrU3uFhjRy7N7CBaEV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-29_14,2024-01-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 clxscore=1015 phishscore=0 spamscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401290160 Message-ID-Hash: QCGW6ZPKV7KPCQCT5DPNUJJECZUDMTEZ X-Message-ID-Hash: QCGW6ZPKV7KPCQCT5DPNUJJECZUDMTEZ X-MailFrom: mgalaxy@akamai.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: steven.sistare@oracle.com, johunt@akamai.com, cweng@akamai.com, bchaney@akamai.com, trakotoz@akamai.com, Michael Galaxy X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1706566997276100001 From: Michael Galaxy In our environment, we need to convert VMs into a live-update-comptabile configuration "on-the-fly" (via live migration). So, for this very specific case, this needs to work when PMEM is being enabled. QEMU does not have a problem with this at all, but we need to relax the rules here a bit. Signed-off-by: Michael Galaxy --- src/qemu/qemu_domain.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index de36641137..5f2058c58d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8520,11 +8520,25 @@ qemuDomainABIStabilityCheck(const virDomainDef *src, size_t i; =20 if (src->mem.source !=3D dst->mem.source) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memoryBacking source '%1$s' doesn't match= source memoryBacking source'%2$s'"), - virDomainMemorySourceTypeToString(dst->mem.source), - virDomainMemorySourceTypeToString(src->mem.source)); - return false; + /* + * The current use case for this is the live migration of live-update + * capable CPR guests mounted on PMEM devices at the host + * level (not in-guest PMEM). QEMU has no problem doing these kinds of + * live migrations between these two memory backends, so let them go thro= ugh. + * This allows us to "upgrade" guests from regular memory to file-backed + * memory seemlessly without taking them down. + */ + if (!((src->mem.source =3D=3D VIR_DOMAIN_MEMORY_SOURCE_NONE + && dst->mem.source =3D=3D VIR_DOMAIN_MEMORY_SOURCE_FILE) || + (src->mem.source =3D=3D VIR_DOMAIN_MEMORY_SOURCE_FILE + && dst->mem.source =3D=3D VIR_DOMAIN_MEMORY_SOURCE_NONE))) { + + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target memoryBacking source '%1$s' doesn't match source memor= yBacking source'%2$s'"), + virDomainMemorySourceTypeToString(dst->mem.source), + virDomainMemorySourceTypeToString(src->mem.source)); + return false; + } } =20 for (i =3D 0; i < src->nmems; i++) { --=20 2.25.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org