Received: by 2002:a17:906:a205:b0:a52:4db9:938b with SMTP id r5csp645489ejy; Wed, 1 May 2024 11:33:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtzuw00Od/jm6kCd7NnsR8LIEhiP2Fo8W+t0EnxEEha2yMSFONuu/FpyDD7qha4rgfHSQ4BobEXGn6y38tfMIlLBBfEKMO X-Google-Smtp-Source: AGHT+IGRVHXnV9ZtFaO+r9cLPI4rRyWyjsFR7KMeMnLmPZeY2w7uIt4OYX9dKY773evsitarWF3O X-Received: by 2002:a05:622a:11c9:b0:43c:7444:d69c with SMTP id n9-20020a05622a11c900b0043c7444d69cmr3839735qtk.20.1714588427920; Wed, 01 May 2024 11:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714588427; cv=none; d=google.com; s=arc-20160816; b=ip2VS6GfcqoVkQ7FxZ+vlCxApBUdmTxkhlmuBYR5DAPjVnSWd3QEKP4xILYB6grlR+ FQyVPbaDyrbkE6aQlz9EkRr+deC+VelzL3RWYXTEd3eN2X7+2yXAd8jNcvYwm4llg1ZL u42//SUu5mRILRAzRphGZMIR03tQpo0yaUB8TfiTLw+QzQjK4cJWdZtHVQzz8m4ju/wq fNsUCdhHLWWGrYHo8hoik2/kmouxTF7Spyp5lJP8kQvvXH5/cvvwGWo6JflZ4eyCNCC0 7ZFgTJR1OxLV4H/OCjG2S2waVvCtS1SixbVecHO/M2O/qfzIHoH9cMGZ44DQPjliZaKU ZZKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=51PhOxKstr+7jPXShqzPTAd2+/6hX1EMNZeg4zocuws=; fh=+wZQXfkGrDFf08DRkV04g4pIKND0uH82z0Y2PgLJFoY=; b=tv7D87/IvVHYCeirNjOqZaeOUfem7j6MlCJRC5L2DWQ1uN5xe+GcGeW0mC7SEoy2h1 tnfDb5X5d7klB5Ojwkn3C4Cm6Zjd+d3ZVMRRqMysgg6O0v76LhNuSF42u5Xcbky1mt9P wfU21Wmzvh0BejBit/8D/yR3FxivhC0OnrKZZSVjNZRCl7dwtqttNqC4KyBl74RcY6Fz 84PUtRtOij68wEQMG3+SXQx9ThaYgIYQi+DrZ3ZItZdKP38nU4SO3NzwhYdvUu5YX6Ek LM4HurabEnRo0piCPIbCjz4v2APzUUugKs4ezYR7FVrJe/lmjj49XyNJ8BtCCa3q48Xe nFWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xc2naGBy; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bb5-20020a05622a1b0500b0043ad8617ee9si8454387qtb.792.2024.05.01.11.33.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 May 2024 11:33:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xc2naGBy; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2EiD-0007os-RM; Wed, 01 May 2024 14:29:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2EiB-0007aw-T3 for qemu-arm@nongnu.org; Wed, 01 May 2024 14:29:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2Ei9-0003Rh-5M for qemu-arm@nongnu.org; Wed, 01 May 2024 14:29:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714588184; 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=51PhOxKstr+7jPXShqzPTAd2+/6hX1EMNZeg4zocuws=; b=Xc2naGByFKQpB3yGVQFz9SrzM2L2Ca04od1Yjps1Xlcaj5SQhnB2OzB9olGG8FuaE/NYyW tsF4cTfcNDdrooDLWGMzgDvl5YrCFKy2yU8FL3/YLRLLgvsz9h7I495nPPVHrsZYwZ9DIz k5zBdaD9+r5gjhGQAmFTUysWMgZoG2w= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-8JKz4Z3gO1eUAlJNRoh1nA-1; Wed, 01 May 2024 14:29:40 -0400 X-MC-Unique: 8JKz4Z3gO1eUAlJNRoh1nA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 89B523C02747; Wed, 1 May 2024 18:29:39 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.121]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD4E0AC69; Wed, 1 May 2024 18:29:29 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Peter Maydell , Nicholas Piggin , Richard Henderson , Yanan Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Halil Pasic , Laurent Vivier , qemu-arm@nongnu.org, Daniel Henrique Barboza , Eduardo Habkost , qemu-ppc@nongnu.org, David Gibson , Ilya Leoshkevich , Eric Farman , Christian Borntraeger , "Michael S. Tsirkin" , Paolo Bonzini , Marcel Apfelbaum , David Hildenbrand , qemu-s390x@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 09/14] hw: temporarily disable deletion of versioned machine types Date: Wed, 1 May 2024 19:27:54 +0100 Message-ID: <20240501182759.2934195-10-berrange@redhat.com> In-Reply-To: <20240501182759.2934195-1-berrange@redhat.com> References: <20240501182759.2934195-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.897, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: 2BnmSjOELdSy The new deprecation and deletion policy for versioned machine types is being introduced in QEMU 9.1.0. Under the new policy a number of old machine types (any prior to 2.12) would be liable for immediate deletion which would be a violation of our historical deprecation and removal policy Thus automatic deletions (by skipping QOM registration) are temporarily gated on existance of the env variable "QEMU_DELETE_MACHINES" / QEMU version number >= 10.1.0. This allows opt-in testing of the automatic deletion logic, while activating it fully in QEMU >= 10.1.0. This whole commit should be reverted in the 10.1.0 dev cycle or shortly thereafter. Signed-off-by: Daniel P. Berrangé --- include/hw/boards.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 48b6c98c77..d6214007ce 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -657,10 +657,28 @@ struct MachineState { } \ } while (0) +/* + * The new deprecation and deletion policy for versioned + * machine types was introduced in QEMU 9.1.0. + * + * Under the new policy a number of old machine types (any + * prior to 2.12) would be liable for immediate deletion + * which would be a violation of our historical deprecation + * and removal policy + * + * Thus deletions are temporarily gated on existance of + * the env variable "QEMU_DELETE_MACHINES" / QEMU version + * number >= 10.1.0. This gate can be deleted in the 10.1.0 + * dev cycle + */ #define MACHINE_VER_DELETION(...) \ do { \ if (MACHINE_VER_SHOULD_DELETE(__VA_ARGS__)) { \ - return; \ + if (getenv("QEMU_DELETE_MACHINES") || \ + QEMU_VERSION_MAJOR > 10 || (QEMU_VERSION_MAJOR == 10 && \ + QEMU_VERSION_MINOR >= 1)) { \ + return; \ + } \ } \ } while (0) -- 2.43.0