From nobody Wed Oct 30 22:13:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=reject dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1722422231249200.13058707105642; Wed, 31 Jul 2024 03:37:11 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0D85F13B0; Wed, 31 Jul 2024 06:37:10 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id DE8FB1375; Wed, 31 Jul 2024 06:36:53 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7A4491369; Wed, 31 Jul 2024 06:36:50 -0400 (EDT) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 0C0CA135F for ; Wed, 31 Jul 2024 06:36:50 -0400 (EDT) Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46VA1L61017482 for ; Wed, 31 Jul 2024 10:36:49 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 40qk54g2dj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 31 Jul 2024 10:36:49 +0000 (GMT) Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 46VAamAO012016 for ; Wed, 31 Jul 2024 10:36:49 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 40qk54g2dg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jul 2024 10:36:48 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 46V9YXil011151; Wed, 31 Jul 2024 10:36:48 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 40ncqmtvwa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jul 2024 10:36:48 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 46VAairC41222420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Jul 2024 10:36:46 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E5D3820067; Wed, 31 Jul 2024 10:36:43 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB5B12004F; Wed, 31 Jul 2024 10:36:43 +0000 (GMT) Received: from fiuczyvm.. (unknown [9.171.197.205]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 31 Jul 2024 10:36:43 +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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:content-transfer-encoding :mime-version; s=pp1; bh=07i3EUmXkIoqEvAdNdFnLBjeeuq4IKz0Al5KgQj LjT8=; b=OpubgnaQRDAMn/4BNQQSsX1JXMWd71WocZKoI5BMhlvlahcfoRb9/uB p8kQp7NiHN6JsGiqawBy2Hx579oTf5sNtVwKzQsbSdYqTcUjS1G2K4Az6VNbjPy4 zaEGVhM8ERpHiDQHv7lG8BJEdm7VkdfWbwWbm9x5y7i1PXf8oFAQvvQoJ8qAD5lu Vrit/kljfGUp1Cm7UCjwqHmrKUyVbPFtb6R/zCyCbD8Ku0LPGscjpDgPjZpuG6wF VtOrlOnt1mDbIbib8UbgNNlWeXJkegN6O1cCyI+iXVMUgx/EBa9ZRx1LUr3e/Rhj zhxmOewvMC51vjJgnJdj4P90jb9K6Sg== From: Boris Fiuczynski To: devel@lists.libvirt.org Subject: [PATCH] qemu_domain: tolerate ACPI feature on S390 Date: Wed, 31 Jul 2024 12:36:43 +0200 Message-ID: <20240731103643.147005-1-fiuczy@linux.ibm.com> X-Mailer: git-send-email 2.45.1 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: U1FNrJQeXeiehFYoHzBMVJDeq3xg3hm4 X-Proofpoint-ORIG-GUID: 3KjDGAD9f6vwNbcDvok4mCrYYWgu31t4 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-31_07,2024-07-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 mlxlogscore=999 malwarescore=0 impostorscore=0 mlxscore=0 clxscore=1015 bulkscore=0 adultscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2407310077 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ECRTABHUISCP2ZT7FVLJUD5WVJS3QGKB X-Message-ID-Hash: ECRTABHUISCP2ZT7FVLJUD5WVJS3QGKB X-MailFrom: fiuczy@linux.ibm.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: pkrempa@redhat.com 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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1722422233250116600 Content-Type: text/plain; charset="utf-8" Migrations of S390 domains from hosts with QEMU supporting ACPI and a libvirt version prior 9.1.0 fail when the destination host runs a QEMU not supporting ACPI and a libvirt version 9.1.0 or older. Actually S390 never supported ACPI but domains were allowed to have the feature ACPI enabled and it was silently tolerated. To allow migration from libvirt versions prior 9.1.0 which allowed the ACPI feature to be used on S390 tolerate ACPI by setting it to absent if specified and QEMU does not support it. Resolves: https://issues.redhat.com/browse/RHEL-49516 Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 198ab99aef..fbc336ac66 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4499,6 +4499,16 @@ qemuDomainDefEnableDefaultFeatures(virDomainDef *def, * capabilities, we still want to enable this */ def->features[VIR_DOMAIN_FEATURE_GIC] =3D VIR_TRISTATE_SWITCH_ON; } + + /* To support migration from libvirt versions prio 9.1.0 which allowed + * the ACPI feature to be used on S390 tolerate ACPI by setting it to + * absent if specified and QEMU does not support it */ + if (ARCH_IS_S390(def->os.arch) && + def->features[VIR_DOMAIN_FEATURE_ACPI] !=3D VIR_TRISTATE_SWITCH_AB= SENT && + virQEMUCapsMachineSupportsACPI(qemuCaps, def->virtType, def->os.ma= chine) =3D=3D VIR_TRISTATE_BOOL_NO) { + VIR_DEBUG("Tolerate ACPI on S390 by removing the ACPI feature"); + def->features[VIR_DOMAIN_FEATURE_ACPI] =3D VIR_TRISTATE_SWITCH_ABS= ENT; + } } =20 =20 --=20 2.45.0