From patchwork Tue Jul 2 05:01:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 809026 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43811wru; Mon, 1 Jul 2024 22:02:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVkVe6ZETb1DZ7fRDCmlg+x3OPew+d4kskwzGPTCq9WdvyFt3n11bO//nhyAeqnqPuOddcPPzAnkxnpxKDSyP4T X-Google-Smtp-Source: AGHT+IFZ0JSJP1Z+I/wZibu8r+Ctpgzr40tnGKSJM27Rd8xeIlG4S+bEH2vNagzUZwA8EaJXPbVr X-Received: by 2002:a05:620a:2681:b0:79d:7e9b:1cf with SMTP id af79cd13be357-79d7e9b06dfmr1030785985a.43.1719896558699; Mon, 01 Jul 2024 22:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896558; cv=none; d=google.com; s=arc-20160816; b=Awarxqi09aEV5f8BXdNCIhSvI7RYextfv1M7JaGK79p/YFFVukmeW6YhUtkOJgt/aY jD6iwLO3dpaY5EuCzYM1BjnRteaoXtfNPB+Pup+5Dna+F7inSroNa0JtYRiJDwQeZUSS iexa39//krv8K78+Rxb8b0WbvvVxpaGKr4KAhnh/6TArGYmD3NchCsmkumPYUynx47Qu wrbpquQBK0m85fyD5fSWwOown9cEqlIEExV+fAzJeXUmC3jJnPl5agn56UHBzaXD24dy 38GkeG5bW8taT9r+ws3wf1TIu4DmBy61mTKdt+xEZqOpgQ1kXQe/bo4M4dvmKNNdRxMA 94vQ== 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=XsG4HS0Hi0hbjd75KzsL4izJ2zeNMAGK2+0U8SqDHJE=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=Wshp1IoS16tUEIQStLVtgT3wD9yiTDGNGLATHMyEFIapwldq6W3W3SwWwTzykspVmY zgklrzxFgqN2DQpr0+mJnF20yc8RTWqPfTeiImtcjBPEqK8PmlmmnVfQih2Jl7abbY/k NF0S+HMnS7QKo2fOhEzuP9Ussivhqr2Tl/QRQx0qU3vuk6FDvbPMTCHuqWpUuaGZf1/O Tn7RIuEzt2tPMvhNZhtEjV6nNBVm8JCxCZgm4gKc77+VWTbW3UGDrYjudUIxQetYruzv FNMvykXCf6xK2KGY6Si8WGBbDm6Bx844S9++ViNW+8GzMufhHSOO3LqJbWo73wNvY+o8 kYDQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h4olOEi2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-79d7ea64a91si601913685a.84.2024.07.01.22.02.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=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=@linaro.org header.s=google header.b=h4olOEi2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOVeq-0007pe-JM; Tue, 02 Jul 2024 01:02:24 -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 1sOVen-0007nk-8N for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:21 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVel-0007CM-7d for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:21 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52cdc4d221eso4093391e87.3 for ; Mon, 01 Jul 2024 22:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896537; x=1720501337; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XsG4HS0Hi0hbjd75KzsL4izJ2zeNMAGK2+0U8SqDHJE=; b=h4olOEi2s7NrTYrxfv2roBL5GP+AXMUlXKIqpquobTt27UVLKa3rYjVV3/If7UVtND N3ay/UGFtkFT3PuHCjePJTwIUiHGTOtCWqFVk2C5Y9EVm37LqBiYv7gOgwBRwL5wEYlY upL1EkLEGDWTF8Y9LZrAZNZDWeu1fwphQ7SQcmtaa1d0XUUW+BXF+DIAPhBCJWeRUSte 6OMc4GOru+ko6ICuwTchrpvD3rPHKRqCrE0QYTzWtslyaNzeufmmBxNcqLLm5tAXAchV muhkDGjiBSR3opgq0zH7W92hFMwUJ0JxZEZnu94job+uA0qyWJn2lxBnCQbZViOQVWKk tEiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896537; x=1720501337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XsG4HS0Hi0hbjd75KzsL4izJ2zeNMAGK2+0U8SqDHJE=; b=usgN14hMh+RxUgO7TE0VU+jHuVL4a4QIHxZNnYyaT9YU/MYqxg05nuKSuMsc/3rz07 x2moR0Xf7PHPT3XleOX/PNY2ySzNPgtt4AQijnnPg9p3uKfBaF2QgkF8QfbM8Bobmpx1 wx4BKlCqt7Xv8e2QDeEKBK87iDXzXwEAGXwa74WhRTnLAhCdb2TOKhW+1WjPoU1ZH1Jh 4eRT0FQP7IUx3Y05MifMRLlCzsR2zUTzYg1SY0nIrf9tLApG05wGBvN+87LuvO0OpE4j NwXyOLtvbbYftzYpjt2CyIL9v3v+dovipFOK1R0HYMj/NRp15JZ3EWoMhxGNyJQIYS4M Yp3A== X-Gm-Message-State: AOJu0Yx9Jy7dE7zx7CnUzCDwebmSFd4cE0wmD4PAdozht7Lo1sXOTHsk Uk3sztvTh52/o2eXWi5QCBVstFUrE+wuQnx42i8hpnQj/hnuQQ+ohbbsxKFbSJzsMmQ0tqtAlkA P X-Received: by 2002:a05:6512:1108:b0:52c:d626:77aa with SMTP id 2adb3069b0e04-52e82731df2mr4709720e87.58.1719896537064; Mon, 01 Jul 2024 22:02:17 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36789d5ec1csm228250f8f.37.2024.07.01.22.02.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 10/22] include/hw: temporarily disable deletion of versioned machine types Date: Tue, 2 Jul 2024 07:01:00 +0200 Message-ID: <20240702050112.35907-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240702050112.35907-1-philmd@linaro.org> References: <20240702050112.35907-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=philmd@linaro.org; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé 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é Reviewed-by: Thomas Huth Message-ID: <20240620165742.1711389-10-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 187ed76646..ef6f18f2c1 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -686,11 +686,28 @@ struct MachineState { * suitable period of time has passed, it will cause * execution of the method to return, avoiding registration * of the machine + * + * 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)