From patchwork Tue Jul 2 05:00:51 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: 809021 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43662wru; Mon, 1 Jul 2024 22:02:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX0JZ0HIkLaI91U0kwW86YETgyNp7+mx5wG4zW8Sxjj05jQNWoO1xwHKMfta18mt6VyCKS2ikTOgnu2DM8XvtFm X-Google-Smtp-Source: AGHT+IFuWBXZMbzKp6LFVsNEN1afk4cVi1pEQPDE7vgVDCud/6UCTsUO6bcE594a9+BoQyiQgQvC X-Received: by 2002:a05:622a:cb:b0:446:44ad:5707 with SMTP id d75a77b69052e-44662e3dc77mr101117081cf.37.1719896536125; Mon, 01 Jul 2024 22:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896536; cv=none; d=google.com; s=arc-20160816; b=fxfZojaTjH5QNp1TlKmxIJ3IBQn53UKG7M+XTiY/i+r+4LdVqTGqMRkwdNIdZBYWaB GWW2GLhtp47gEQoTIep1tcOB5P7zNT4yd00nJWQbZxwgR3Qq3OQ3D3ljkH8uLqP29BJv INjusJUoI4fnj4oPQ644sfJ4182YIVccpF/yiyqBNZH5WJWdNvJgBTBDslHjci3Uxps0 n1lp3SePVATR21HXCRWsAflBuo98mnDO3EE++uMgs6RBYaDBAY90sV/RM4abIJXztXP4 F/ir5FEwktD/z0QQjRIMex5ZjnZkZi0PqijDaUhb8HXrvcS1GJh2DFnXbIKV1DulIfPb gGWQ== 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=kNKO1Dq0uSgK+6l6HOZ90VqhRhaEia6DOkXUixOotHw=; fh=eFS6vSC+n5Q38dEuvGRTESJclzM5sXqBqvEWXxzZjtk=; b=tMH/aTdabSvS42KvJ+CBaDXTNjjbs5FomhC9EZ+Wn1xhnKHEW9k0kZkmrFmVfLj+g4 rNxV0rU3SlIRQAOIxzM4bVkmsT/aXeTTCkNfnjOD7VddTp7+HxjpLpXdUDc2ovD646nw CeJWM67tfAgZLyqE7S7iOrrMtcyGUG7XCF/Zuu4hTR0XIkxT+uTgj9ilQdqFqFcOCJFD PnmE4WuVmuBlnpEGhLblYPsZ5Zo8Oinyu2jiJZjluCnXofHVbUL4vfGR6EoyqvnIsv5M 1kc+IWwrW2aiHObU7lT97lDUrdNVBdg6vpMDv4+tQ2BZ1wFC87Q/bfjYm5NJJtXDXcB5 oZZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q9F2yLHS; 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 d75a77b69052e-446512cc555si93820981cf.59.2024.07.01.22.02.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:16 -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=q9F2yLHS; 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 1sOVe2-0007A1-OU; Tue, 02 Jul 2024 01:01:34 -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 1sOVdy-00079D-Qv for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:31 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVdr-0005Zn-5i for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:27 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42565cdf99cso32996175e9.3 for ; Mon, 01 Jul 2024 22:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896481; x=1720501281; 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=kNKO1Dq0uSgK+6l6HOZ90VqhRhaEia6DOkXUixOotHw=; b=q9F2yLHSaEcC39f1lcM0HdqRThvluXSqhPfK5yurwQa2snPb/Uxnd+MPWbeDlGvfiE T6W5EjGsZP29u20vRxRR9AfNdBdHYCVfbPAbEJ9K/UNnfwBBA5JTnYGt2bE41Upu+roR WwGRYxuxguiUVtzeoz5gOK3aPPHXVgEtDoy1gBR3zJbx0P5hPFtU6cGH0ajM9ydOeJPm uCNQlOgS8oSCm73J89n62jwilat9ntBZCwkDjfbeGflUH+OEsB95cYtz6zhmgrOEpNYY bTyp0QzqQkKDG+KlSZS2thHkJkyu2lXwopqIkgv7L3jbkk+Ey1yghqlnzgdH/Pk23hi6 sExw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896481; x=1720501281; 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=kNKO1Dq0uSgK+6l6HOZ90VqhRhaEia6DOkXUixOotHw=; b=VtX/zhEFonTJYy42+kODyjZuv+P2g9LBaRXGIv8Rk7qds7N2iFLnwmo3nDJyIDDtqG ZiynQIqhCwdrKiwj6eN5ne/u2sYpBGjZcy5vHb12kmslWd+VKbiFdqmjOjCM7BsMRR+j GOIcpajlwGV0I7zJn+oPI583qyVBmhV3uTHrQGQVZ/Uf+xwxeWkwDt1euoofdZnaC/Vv afecc2EO+FaRUbyVqY0CGqnV5FPRtrWUP2oeBbcoHiBFCtIuupgNLg1IltN39cm/MyOV BeaFc/0fSGWGjimydmVugvBGnfW6m9c3sqIMH0U4itOxUscWRuvunWrqvwIrBc/Wujio MqIg== X-Gm-Message-State: AOJu0YwwOlv4eL+eSTS8/g15Zl9lb1MiVE1tPIH416+v3jlH4NQ6rIwl vW8XA40MCeasdw/ql3osoktwU0wa7ZZ45PI/K7R6JL8+r9tSEgp5ycefmpKzSe20jkpTiRrt2bh y X-Received: by 2002:a05:600c:1ca9:b0:425:7a6b:4e88 with SMTP id 5b1f17b1804b1-4257a6b5073mr51750135e9.30.1719896481266; Mon, 01 Jul 2024 22:01:21 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af5b626sm178454315e9.15.2024.07.01.22.01.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:01:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Oleg Sviridov , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Subject: [PULL 01/22] hw/net/spapr: prevent potential NULL dereference Date: Tue, 2 Jul 2024 07:00:51 +0200 Message-ID: <20240702050112.35907-2-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::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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: Oleg Sviridov Pointer, returned from function 'spapr_vio_find_by_reg', may be NULL and is dereferenced immediately after. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Oleg Sviridov Message-ID: <20240531073636.3779559-1-oleg.sviridov@red-soft.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/net/spapr_llan.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index ecb30b7c76..8af33d91b6 100644 --- a/hw/net/spapr_llan.c +++ b/hw/net/spapr_llan.c @@ -770,6 +770,12 @@ static target_ulong h_change_logical_lan_mac(PowerPCCPU *cpu, SpaprVioVlan *dev = VIO_SPAPR_VLAN_DEVICE(sdev); int i; + if (!dev) { + hcall_dprintf("H_CHANGE_LOGICAL_LAN_MAC called when " + "no NIC is present\n"); + return H_PARAMETER; + } + for (i = 0; i < ETH_ALEN; i++) { dev->nicconf.macaddr.a[ETH_ALEN - i - 1] = macaddr & 0xff; macaddr >>= 8; From patchwork Tue Jul 2 05:00:52 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: 809033 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44038wru; Mon, 1 Jul 2024 22:03:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUHyPkYo3qh3m5PLP0P7Cm00WW4jTBMOuquFyHx/6WT1OCWYP53xxLPNBNBth1r67smScXMwabKroSQwugTuMfj X-Google-Smtp-Source: AGHT+IHO6grQp3pD8bKdok0xWCHlGyUZHeeQzfGkhebqxaHhAhWYoNBixuga3jwThrTfvimO8IfL X-Received: by 2002:a05:6214:248e:b0:6af:2344:5811 with SMTP id 6a1803df08f44-6b5b71b6e5fmr119125326d6.55.1719896606298; Mon, 01 Jul 2024 22:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896606; cv=none; d=google.com; s=arc-20160816; b=Qot0pczx5YERN/WzxM8Dm6BBMYGcsOSl8dRG3r9VyWhM8/IzCOuKw4x+Y1pi2aFGKC G8XvtCb4ew/XhVW/ONc5sgx2oGbma+4DHmXUlpHlNF+DQiIenVUpA5kXDiG+zZqbsaEA phvNsLnCi0i75sIqwJY9xTgTW/oJmPNJy/dTdvlXWG6Fw7a51dlXRk3Wzi2bTJdDABrL 12FCrbBxlCKQ0CeaWAPz5UvHwuXyUQfwzWcIPGnnTsOd/52P6sDUOs45koK36xp9a2pW cBqSvcA6sFwVVQ5bMHnMtTK8wbnojJ2pewMcVvCQn+aORpNtzBsafSMhzWo2pcPXzeoe 6Igw== 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=CImu6gnFSvQkVYqxGUzc3+u9J6fqWPW8HcbEc7YmhgM=; fh=+5+G9kZVA/Ilv1ZB+Om0NAwY9D8Ah17StSE3F3w5Awc=; b=MmN6R4eYVFQeDR3t9MxKV0ldPvSZl9G7bbIC12kzampjoxV4IJO9IwhYcSSpGuZYwB G6604SSITqaslVcPMLnD9Nk4wX8wDtGxGvfNfhyo2wHjNEH75Qy3/1jlAFvWSRgOi8Fl 9eui+6/7qhjtjpssdev+LHvV0jqtBU6sHF9VxXW3iqAQTx0VTFTwNtjmMcUrjbQss14C 3nydNwRgJfz9tnaqrt6CYpp1BWFrp1GNmTeO1JlBAXV01G/VGzn2BeznURZJhqTsmYaA Wrwi8x4eOxQRjOBXQxzHIL+kr1g+bf6NYc0EkzoZAqMA9fOhUzhifMtbkvlIvpSVEBUo UuZw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CJTa0iSD; 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 6a1803df08f44-6b59e3633c0si96464996d6.98.2024.07.01.22.03.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:26 -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=CJTa0iSD; 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 1sOVe7-0007Bg-BX; Tue, 02 Jul 2024 01:01:39 -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 1sOVe1-0007A8-GE for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:33 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVdy-00061m-JN for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:33 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-36743abace4so3057973f8f.1 for ; Mon, 01 Jul 2024 22:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896487; x=1720501287; 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=CImu6gnFSvQkVYqxGUzc3+u9J6fqWPW8HcbEc7YmhgM=; b=CJTa0iSDGZdbr2eRLioMveNG1wIhHZBw+fXQpGCXB8ZMr/CpFY9NBDQ+a2PIIGqHXz ePHBdsIi4OM2jj6QPQ+Bxy8XzZfMAnzgOYkUsr/otmnV+hfCLicnVsjCiQ2iOgjmcgQM bQqYRGp/BDqUBHxWdmyIWc1CGQrXsuGorwpE1sJdcC4v6nXE0LJlqgyykSlCDYfewXyQ Td228KtO2Oj2109pu0UE+bEnba7dg1d7w6A697Yve+7U0Y4bomumisc+r75aLBeTOEU8 +iRhL/BtrbkKgP8JM0rM8Fc3KnXoSwTosWpnBSOnVXAJKv12vkCX8Ba2oNOpy0FLuRjW l/ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896487; x=1720501287; 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=CImu6gnFSvQkVYqxGUzc3+u9J6fqWPW8HcbEc7YmhgM=; b=pH6AU4egxBWwlgV8PzEOw4RLi01UCOMgCgOWm/t1dzMpR975Ia9H7JPAX3ErY/J+jz m6aSrcTLA7Z2so2lvXorO15hXR3JLRzCqTLtCcYRsKx6bs6ofpey2PNjwopoQdR4pQzL tQLSwwEVl6grlF/+XpA1oufpaOoANSU3NC3HQuvPKaUdIRAccniZ0xyT2/GPHGI/9nks xA7rw5luYaP27zM/Js+oJZXoctIHJd2or2684qAGxGYeolln+FulidX8Nu28y4xLkYWq iyLcAseL9QHRmqGBf1z4AO+EzDuAosSXI2ZUbItB8jetQdD7gRf2mbGOGSXAYcpcgvOW +MwA== X-Gm-Message-State: AOJu0YxenM3geXVjCj0bNTpckP/A0HOf/b8Bb6lrUc14/AGaSERwPp9S H+dTi3ft2R6eLPW+BXyM78kYuBz6YoL3YDomK8eH1WRu5RgilzreAqS3mRQPnb1snxfjnv/DyPb k X-Received: by 2002:a05:6000:1f8e:b0:366:e09c:56be with SMTP id ffacd0b85a97d-36760a63050mr11121075f8f.6.1719896487437; Mon, 01 Jul 2024 22:01:27 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a112a54sm11958811f8f.115.2024.07.01.22.01.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:01:27 -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 , Eric Blake , =?utf-8?q?P?= =?utf-8?q?hilippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/22] include/hw: add helpers for defining versioned machine types Date: Tue, 2 Jul 2024 07:00:52 +0200 Message-ID: <20240702050112.35907-3-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::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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 various targets which define versioned machine types have a bunch of obfuscated macro code for defining unique function and variable names using string concatenation. This adds a couple of helpers to improve the clarity of such code macro. Reviewed-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé Message-ID: <20240620165742.1711389-2-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 185 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 73ad319d7d..d5ad712585 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -413,6 +413,191 @@ struct MachineState { struct NumaState *numa_state; }; +/* + * The macros which follow are intended to facilitate the + * definition of versioned machine types, using a somewhat + * similar pattern across targets. + * + * For example, a macro that can be used to define versioned + * 'virt' machine types would look like: + * + * #define DEFINE_VIRT_MACHINE_IMPL(latest, ...) \ + * static void MACHINE_VER_SYM(class_init, virt, __VA_ARGS__)( \ + * ObjectClass *oc, \ + * void *data) \ + * { \ + * MachineClass *mc = MACHINE_CLASS(oc); \ + * MACHINE_VER_SYM(options, virt, __VA_ARGS__)(mc); \ + * mc->desc = "QEMU " MACHINE_VER_STR(__VA_ARGS__) " Virtual Machine"; \ + * if (latest) { \ + * mc->alias = "virt"; \ + * } \ + * } \ + * static const TypeInfo MACHINE_VER_SYM(info, virt, __VA_ARGS__) = { \ + * .name = MACHINE_VER_TYPE_NAME("virt", __VA_ARGS__), \ + * .parent = TYPE_VIRT_MACHINE, \ + * .class_init = MACHINE_VER_SYM(class_init, virt, __VA_ARGS__), \ + * }; \ + * static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ + * { \ + * type_register_static(&MACHINE_VER_SYM(info, virt, __VA_ARGS__)); \ + * } \ + * type_init(MACHINE_VER_SYM(register, virt, __VA_ARGS__)); + * + * Following this, one (or more) helpers can be added for + * whichever scenarios need to be catered for with a machine: + * + * // Normal 2 digit, marked as latest e.g. 'virt-9.0' + * #define DEFINE_VIRT_MACHINE_LATEST(major, minor) \ + * DEFINE_VIRT_MACHINE_IMPL(true, major, minor) + * + * // Normal 2 digit e.g. 'virt-9.0' + * #define DEFINE_VIRT_MACHINE(major, minor) \ + * DEFINE_VIRT_MACHINE_IMPL(false, major, minor) + * + * // Bugfix 3 digit e.g. 'virt-9.0.1' + * #define DEFINE_VIRT_MACHINE_BUGFIX(major, minor, micro) \ + * DEFINE_VIRT_MACHINE_IMPL(false, major, minor, micro) + * + * // Tagged 2 digit e.g. 'virt-9.0-extra' + * #define DEFINE_VIRT_MACHINE_TAGGED(major, minor, tag) \ + * DEFINE_VIRT_MACHINE_IMPL(false, major, minor, _, tag) + * + * // Tagged bugfix 2 digit e.g. 'virt-9.0.1-extra' + * #define DEFINE_VIRT_MACHINE_TAGGED(major, minor, micro, tag) \ + * DEFINE_VIRT_MACHINE_IMPL(false, major, minor, micro, _, tag) + */ + +/* + * Helper for dispatching different macros based on how + * many __VA_ARGS__ are passed. Supports 1 to 5 variadic + * arguments, with the called target able to be prefixed + * with 0 or more fixed arguments too. To be called thus: + * + * _MACHINE_VER_PICK(__VA_ARGS, + * MACRO_MATCHING_5_ARGS, + * MACRO_MATCHING_4_ARGS, + * MACRO_MATCHING_3_ARGS, + * MACRO_MATCHING_2_ARGS, + * MACRO_MATCHING_1_ARG) (FIXED-ARG-1, + * ..., + * FIXED-ARG-N, + * __VA_ARGS__) + */ +#define _MACHINE_VER_PICK(x1, x2, x3, x4, x5, x6, ...) x6 + +/* + * Construct a human targeted machine version string. + * + * Can be invoked with various signatures + * + * MACHINE_VER_STR(sym, prefix, major, minor) + * MACHINE_VER_STR(sym, prefix, major, minor, micro) + * MACHINE_VER_STR(sym, prefix, major, minor, _, tag) + * MACHINE_VER_STR(sym, prefix, major, minor, micro, _, tag) + * + * Respectively emitting symbols with the format + * + * "{major}.{minor}" + * "{major}.{minor}-{tag}" + * "{major}.{minor}.{micro}" + * "{major}.{minor}.{micro}-{tag}" + */ +#define _MACHINE_VER_STR2(major, minor) \ + #major "." #minor + +#define _MACHINE_VER_STR3(major, minor, micro) \ + #major "." #minor "." #micro + +#define _MACHINE_VER_STR4(major, minor, _unused_, tag) \ + #major "." #minor "-" #tag + +#define _MACHINE_VER_STR5(major, minor, micro, _unused_, tag) \ + #major "." #minor "." #micro "-" #tag + +#define MACHINE_VER_STR(...) \ + _MACHINE_VER_PICK(__VA_ARGS__, \ + _MACHINE_VER_STR5, \ + _MACHINE_VER_STR4, \ + _MACHINE_VER_STR3, \ + _MACHINE_VER_STR2) (__VA_ARGS__) + + +/* + * Construct a QAPI type name for a versioned machine + * type + * + * Can be invoked with various signatures + * + * MACHINE_VER_TYPE_NAME(prefix, major, minor) + * MACHINE_VER_TYPE_NAME(prefix, major, minor, micro) + * MACHINE_VER_TYPE_NAME(prefix, major, minor, _, tag) + * MACHINE_VER_TYPE_NAME(prefix, major, minor, micro, _, tag) + * + * Respectively emitting symbols with the format + * + * "{prefix}-{major}.{minor}" + * "{prefix}-{major}.{minor}.{micro}" + * "{prefix}-{major}.{minor}-{tag}" + * "{prefix}-{major}.{minor}.{micro}-{tag}" + */ +#define _MACHINE_VER_TYPE_NAME2(prefix, major, minor) \ + prefix "-" #major "." #minor TYPE_MACHINE_SUFFIX + +#define _MACHINE_VER_TYPE_NAME3(prefix, major, minor, micro) \ + prefix "-" #major "." #minor "." #micro TYPE_MACHINE_SUFFIX + +#define _MACHINE_VER_TYPE_NAME4(prefix, major, minor, _unused_, tag) \ + prefix "-" #major "." #minor "-" #tag TYPE_MACHINE_SUFFIX + +#define _MACHINE_VER_TYPE_NAME5(prefix, major, minor, micro, _unused_, tag) \ + prefix "-" #major "." #minor "." #micro "-" #tag TYPE_MACHINE_SUFFIX + +#define MACHINE_VER_TYPE_NAME(prefix, ...) \ + _MACHINE_VER_PICK(__VA_ARGS__, \ + _MACHINE_VER_TYPE_NAME5, \ + _MACHINE_VER_TYPE_NAME4, \ + _MACHINE_VER_TYPE_NAME3, \ + _MACHINE_VER_TYPE_NAME2) (prefix, __VA_ARGS__) + +/* + * Construct a name for a versioned machine type that is + * suitable for use as a C symbol (function/variable/etc). + * + * Can be invoked with various signatures + * + * MACHINE_VER_SYM(sym, prefix, major, minor) + * MACHINE_VER_SYM(sym, prefix, major, minor, micro) + * MACHINE_VER_SYM(sym, prefix, major, minor, _, tag) + * MACHINE_VER_SYM(sym, prefix, major, minor, micro, _, tag) + * + * Respectively emitting symbols with the format + * + * {prefix}_machine_{major}_{minor}_{sym} + * {prefix}_machine_{major}_{minor}_{micro}_{sym} + * {prefix}_machine_{major}_{minor}_{tag}_{sym} + * {prefix}_machine_{major}_{minor}_{micro}_{tag}_{sym} + */ +#define _MACHINE_VER_SYM2(sym, prefix, major, minor) \ + prefix ## _machine_ ## major ## _ ## minor ## _ ## sym + +#define _MACHINE_VER_SYM3(sym, prefix, major, minor, micro) \ + prefix ## _machine_ ## major ## _ ## minor ## _ ## micro ## _ ## sym + +#define _MACHINE_VER_SYM4(sym, prefix, major, minor, _unused_, tag) \ + prefix ## _machine_ ## major ## _ ## minor ## _ ## tag ## _ ## sym + +#define _MACHINE_VER_SYM5(sym, prefix, major, minor, micro, _unused_, tag) \ + prefix ## _machine_ ## major ## _ ## minor ## _ ## micro ## _ ## tag ## _ ## sym + +#define MACHINE_VER_SYM(sym, prefix, ...) \ + _MACHINE_VER_PICK(__VA_ARGS__, \ + _MACHINE_VER_SYM5, \ + _MACHINE_VER_SYM4, \ + _MACHINE_VER_SYM3, \ + _MACHINE_VER_SYM2) (sym, prefix, __VA_ARGS__) + + #define DEFINE_MACHINE(namestr, machine_initfn) \ static void machine_initfn##_class_init(ObjectClass *oc, void *data) \ { \ From patchwork Tue Jul 2 05:00:53 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: 809025 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43786wru; Mon, 1 Jul 2024 22:02:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUCKyvRcmrkM5yBW6tX5CTuaj/5ObUkddrFVwhrOnmryQabtsMpDDdePOuvps7MGWnr4TjErTXW0Hf2kTtFa4sC X-Google-Smtp-Source: AGHT+IFoP7Paqzd3/9GazhO23lD9jOiVQP8VlLXfxXkiCC1SmPstxaTJVt7MAE99htjnbBXbEJJr X-Received: by 2002:a05:6214:5090:b0:6b5:61:53a9 with SMTP id 6a1803df08f44-6b5b70b263dmr68984626d6.28.1719896554016; Mon, 01 Jul 2024 22:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896553; cv=none; d=google.com; s=arc-20160816; b=Mk/njgq1aDeUEhM17ejV8sx8TIKdAYQrrDZWq74QD8uh/1ERh94G1LMV+Jb8n6i2+g 6y1uQNpOtNgYvDiIGmNvUG+bvwlfERWz2ara5FEKrqQSW8MJKscmaUJdLhwjgpeDlfuD ufduw5BS+nnz9fi6VAuQHZ+axMbmjjDXn5hUQpWWi8oAD1BhwGAEk4JpOpGO6ZHlxyQ5 uTAupMJJ+scHEWwN47bPBlUbIiNG4SsG3ewA7/zURVDuxhyAyHvRfWt6K71AiakO2ZDq Fewrdoa9N6gI8/cv5blM9oHBBqqHRXlzvzSuIKhmadg1PLCr/VA43Q1oc5AS0P5SzR9L s/qQ== 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=ojuMSOD3mJ6z5l/dHTXyuiUf8CYGwAbSuIgUM0ljX7g=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=MvXL9B3BumBrvBam7W0mADoHHMJxvGc2/CgW/l4QUdJp/VWZM3XkSevgVrb2pUIBKI KJ2USJ4dnKMQELAxaKYZBH+I2m6HDlndtdSdYHZ+S1Q6k5E3qU6nKCAo/FozB57CjSTK XA7xwW4F2Dv2rhDWnChzOkWrL/c3CzT+FxPkMOY5CCMv15zbMzcmVrWOlVtKospyHtJw 6IBSzJaVrqC4AKiADoYyzJXpW24RZy8fNsYuSXVTqp4itr+N0e9YPWnv/SXOTdHkvDEh Q/vMtveAVjrYvH8pZ2us5rOGUaBpd843kQTic7FqujL01AgrGnvimciw2gKu0zm/NmJI 2CQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gH2Kv6GV; 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 6a1803df08f44-6b59e622ccasi96683706d6.593.2024.07.01.22.02.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:33 -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=gH2Kv6GV; 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 1sOVeS-0007Ix-V0; Tue, 02 Jul 2024 01:02:02 -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 1sOVeQ-0007Ic-MH for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:58 -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 1sOVeO-00070K-Ue for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:58 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52cdfb69724so4660797e87.1 for ; Mon, 01 Jul 2024 22:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896515; x=1720501315; 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=ojuMSOD3mJ6z5l/dHTXyuiUf8CYGwAbSuIgUM0ljX7g=; b=gH2Kv6GVBmyBUo1pg2skAixpDRIvTjbeLtLtha2JP7ldtjj0bnHcpdyK8xHC3xutdC 0YJ9tposCWfnWCPAluzT+rqy3I39tJcRxRqKP5yjCeF+8783ONYtj8JPl8noL/WHzH8o gMCzEIdJEWKhm23URhK5di/vm8IC4ZdpraOVijCoPL5bwVVOYU5fsZ13fCA22gAVX7H/ UTzRZYMdmJngU6XUUdhXJtJ2FK3neuDL9ALzrKVH+JAJHckDd/xCSN2PjEg43XzzSpZm ApSNuThLREb4g704TQ2rnELYS+kw7ti52a9kW4zV/EiWUGE9LkOt9CHz1S7W1+wmXpRs rUhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896515; x=1720501315; 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=ojuMSOD3mJ6z5l/dHTXyuiUf8CYGwAbSuIgUM0ljX7g=; b=EVK886pTR4LWBrmvVKeaqFXnuJ97shjmQRd1KX2P5SV0fSEdTYAAvzDJbT0Q9z1Uu8 TOPnVvwmDeSXzu063uH+N9Qdruz/eV6r3FbRZ/awEoRzPQntHdizygkHntLp3Yqfi4nq oZVV5O33WCir0hrlUSJFffvYdBMXTeeMP0hHL1awDgJikgZVRjrhdHEpoSi6twncx1sm lfqE3RLxIYl36cTp9FwG1sf4YUwbR6dzmtwDgNdw101liAC5+pD5gYbVMeTD9pB02Koz z9YZ2mXg4SpEBRypUNd04aGKKvzye7gBr7/skoNmW2rLQMHwvbGUAg1S45uMNnT6ybmx IsDQ== X-Gm-Message-State: AOJu0YwtjAiNTqu41qI19RLXJngroHeQh8sGUCSmYyp1oovCWVUbgWgg 9rvIR5JAxCNJPOAVADmNVvBLcLBOjq/8mwxbKCsDHydMeSdJ85doNlm+q0n0Cp3C30hvzQvAYqr b X-Received: by 2002:a05:651c:244:b0:2ee:7255:5032 with SMTP id 38308e7fff4ca-2ee72555309mr15962701fa.34.1719896493894; Mon, 01 Jul 2024 22:01:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4257bc89832sm109373675e9.42.2024.07.01.22.01.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:01:32 -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 03/22] hw/arm: convert 'virt' machine definitions to use new macros Date: Tue, 2 Jul 2024 07:00:53 +0200 Message-ID: <20240702050112.35907-4-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é This changes the DEFINE_VIRT_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-3-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 0784ee7f46..08990b9abe 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -101,33 +101,35 @@ static void arm_virt_compat_set(MachineClass *mc) arm_virt_compat_len); } -#define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \ - static void virt_##major##_##minor##_class_init(ObjectClass *oc, \ - void *data) \ +#define DEFINE_VIRT_MACHINE_IMPL(latest, ...) \ + static void MACHINE_VER_SYM(class_init, virt, __VA_ARGS__)( \ + ObjectClass *oc, \ + void *data) \ { \ MachineClass *mc = MACHINE_CLASS(oc); \ arm_virt_compat_set(mc); \ - virt_machine_##major##_##minor##_options(mc); \ - mc->desc = "QEMU " # major "." # minor " ARM Virtual Machine"; \ + MACHINE_VER_SYM(options, virt, __VA_ARGS__)(mc); \ + mc->desc = "QEMU " MACHINE_VER_STR(__VA_ARGS__) " ARM Virtual Machine"; \ if (latest) { \ mc->alias = "virt"; \ } \ } \ - static const TypeInfo machvirt_##major##_##minor##_info = { \ - .name = MACHINE_TYPE_NAME("virt-" # major "." # minor), \ - .parent = TYPE_VIRT_MACHINE, \ - .class_init = virt_##major##_##minor##_class_init, \ - }; \ - static void machvirt_machine_##major##_##minor##_init(void) \ + static const TypeInfo MACHINE_VER_SYM(info, virt, __VA_ARGS__) = \ { \ - type_register_static(&machvirt_##major##_##minor##_info); \ + .name = MACHINE_VER_TYPE_NAME("virt", __VA_ARGS__), \ + .parent = TYPE_VIRT_MACHINE, \ + .class_init = MACHINE_VER_SYM(class_init, virt, __VA_ARGS__), \ + }; \ + static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ + { \ + type_register_static(&MACHINE_VER_SYM(info, virt, __VA_ARGS__)); \ } \ - type_init(machvirt_machine_##major##_##minor##_init); + type_init(MACHINE_VER_SYM(register, virt, __VA_ARGS__)); #define DEFINE_VIRT_MACHINE_AS_LATEST(major, minor) \ - DEFINE_VIRT_MACHINE_LATEST(major, minor, true) + DEFINE_VIRT_MACHINE_IMPL(true, major, minor) #define DEFINE_VIRT_MACHINE(major, minor) \ - DEFINE_VIRT_MACHINE_LATEST(major, minor, false) + DEFINE_VIRT_MACHINE_IMPL(false, major, minor) /* Number of external interrupt lines to configure the GIC with */ From patchwork Tue Jul 2 05:00:54 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: 809024 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43717wru; Mon, 1 Jul 2024 22:02:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLhjw2HuDRlQkboShczobaDbcY2e39UhHpW8PVwBd3ELKIxashfe/qFo/vJQTrsAI92qaL+jQ2uCtf1fCuYoSI X-Google-Smtp-Source: AGHT+IHDEO+wo6XVMcKKGhYUkyi2isyqg9be4Jf0KzABxnElqDGbE4Mj+B+5q+cWfzTimYLKWVKG X-Received: by 2002:a05:620a:134c:b0:79d:560e:7eeb with SMTP id af79cd13be357-79d7ba17b16mr907119185a.43.1719896545139; Mon, 01 Jul 2024 22:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896545; cv=none; d=google.com; s=arc-20160816; b=JpTgm5tlvmPgVoEkncR09yw1C0tyx1WRZfaCICeSLFwbhMsLf1AhoXUKBbjFoIJ80w xdGBCgJS3fIWO+t9oU+AyQJhg6/pi4fYYc7QyPcMpH5Kt+cbbDH7zDSzMovurxXNI4U/ sNF+Ff1okqY+L8WXmJ9+zg9xQ3vVNBt3LL5C4kOHuxb3hlB5CT1eHrNKMr+ZnBQWh+tQ Uoa8OP2hDj5w+fnNtiEdJiULlCcsHIXiTiMjSPIbE7mQYTcYY86ZqDtZLSVuu3bBSO+u kmp2C5OaFW97CxvvfJW+lOxS9+cwZNymiQtaYkzQr6087YAjAVyy83lNadZ/r/0cpKS8 +KnA== 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=y0vVUZjdAMW7HsHuqmfd1tmncJKZdQ/oTZ2omBZVrOo=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=ZgNC/M5C+E9tWLrIbC3V6q4gBdh7S42tELkXbYYBiSMFv8yLzJwRGHlWz8VdRKXYkr ssvzoSUcCyDMOYyg6QQtqtAQY+71EJBTYyEMxzRX/Kds7Mt8IeNAzDBvfkDAnCPQ8Za2 agAcBUaX5FEgw5wG382fkhRu28JwurUlUY58kfyFMcsZiYAKlvAvHWbNskS/pQuI3IKU Wez3JhcUg7TBQI8+1FQtSJFo7EAZPU39m6N4XG4m9uG5Mpk2Sc/qsDBe41ZygHETHTGU AK1yld9As0r7WaXZdB86FqOo/PbbapRF/pKxLKPNldVJM+6dcesokf7WpRdSHepIiUAg 0HLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yPikcMYt; 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-79d692f05c6si1050465685a.337.2024.07.01.22.02.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:25 -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=yPikcMYt; 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 1sOVeG-0007G7-A0; Tue, 02 Jul 2024 01:01:48 -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 1sOVeF-0007Fg-2U for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:47 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVeB-0006LC-0Z for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:46 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-363bd55bcc2so2007035f8f.2 for ; Mon, 01 Jul 2024 22:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896500; x=1720501300; 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=y0vVUZjdAMW7HsHuqmfd1tmncJKZdQ/oTZ2omBZVrOo=; b=yPikcMYtGKssUb/NsdZ1mBuqJxMc0sKY9SsujIhB/5EA3NDQa79cChrh/MzQL+99La lugdTX3wKlBiHjA+AOYPMicEgLmhhV13+qEcUE2upCqEquXkBj6K50vmfHtzDXFRhgNk 0qnxMJaUHH2iRc1I/Pvqfhkh//s19MygZOSZM/XJa0ljPZjOlEv4jvY+STXzMCDgPwXB rpWJNhj4/cS5xJnk78stIW2k53+0T89ow5cGVGu50QLE5FvGau+oXuPq0t2+FP1aKLSN KbcroijCkbhWaEWS7uxLYjBoJMvmwqcvZ87BJrlxDoICyl3xpXNPyl07HmD2ODlj1p8J Z76A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896500; x=1720501300; 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=y0vVUZjdAMW7HsHuqmfd1tmncJKZdQ/oTZ2omBZVrOo=; b=czN8COy58tjlxu+xbXV40sExff2XLcyS6MetnbQpBesaYngqTN2QVwitTV6RKxpQAU MsNI7QbPmpJbWU7PDn2z8WVLQy8yb97O2B0rKQ/GgvZuIyE7Ex2aUbb46ImOP++T0MTq gG9eMIJ1flCEmDDrFkGIHrrSVfMxwSVXmT3l5X7zpIWoR9QmoMXTGkInmC4CoQERzBq+ sQMqHxTrJKcLj9TXWw8qv3YyCrgwoG8xC3/iI7JeG9k11y6MmbKNBPyPV9yJ58cwS7Io a0thaJsiaNw7CvE3lrSXIW67P9gIu3E8gceJLFeyzLZQp3v7e5n7J8cSiOubSiMeiI41 Rggw== X-Gm-Message-State: AOJu0Yy7Gf+E2rCKPsqZ+DgL8hZPhjZJJ0EvyYtWoe2eOe9KTxmhbSkj CDDBQTKKtIiSJRdflQ+QFsRd4m0MeseghibD+nDD1cguypmGkoWLgtOxaVekqLjTcapT30uTzoP r X-Received: by 2002:a5d:45ca:0:b0:35f:ed0:9582 with SMTP id ffacd0b85a97d-367756a9285mr4907420f8f.16.1719896499987; Mon, 01 Jul 2024 22:01:39 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a1108b0sm11914511f8f.114.2024.07.01.22.01.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:01:39 -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 04/22] hw/s390x: convert 'ccw' machine definitions to use new macros Date: Tue, 2 Jul 2024 07:00:54 +0200 Message-ID: <20240702050112.35907-5-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::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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é This changes the DEFINE_CCW_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number twice in two different formats in the calls to DEFINE_CCW_MACHINE. A DEFINE_CCW_MACHINE_AS_LATEST helper is added so that it is not required to pass 'false' for every single historical machine type. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-4-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/s390-virtio-ccw.c | 100 ++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 45 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index cd063f8b64..380e9e2e5b 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -15,6 +15,7 @@ #include "qapi/error.h" #include "exec/ram_addr.h" #include "exec/confidential-guest-support.h" +#include "hw/boards.h" #include "hw/s390x/s390-virtio-hcall.h" #include "hw/s390x/sclp.h" #include "hw/s390x/s390_flic.h" @@ -817,35 +818,44 @@ static const TypeInfo ccw_machine_info = { }, }; -#define DEFINE_CCW_MACHINE(suffix, verstr, latest) \ - static void ccw_machine_##suffix##_class_init(ObjectClass *oc, \ - void *data) \ +#define DEFINE_CCW_MACHINE_IMPL(latest, ...) \ + static void MACHINE_VER_SYM(class_init, ccw, __VA_ARGS__)( \ + ObjectClass *oc, \ + void *data) \ { \ MachineClass *mc = MACHINE_CLASS(oc); \ - ccw_machine_##suffix##_class_options(mc); \ - mc->desc = "Virtual s390x machine (version " verstr ")"; \ + MACHINE_VER_SYM(class_options, ccw, __VA_ARGS__)(mc); \ + mc->desc = "Virtual s390x machine (version " MACHINE_VER_STR(__VA_ARGS__) ")"; \ if (latest) { \ mc->alias = "s390-ccw-virtio"; \ mc->is_default = true; \ } \ } \ - static void ccw_machine_##suffix##_instance_init(Object *obj) \ + static void MACHINE_VER_SYM(instance_init, ccw, __VA_ARGS__)(Object *obj) \ { \ MachineState *machine = MACHINE(obj); \ - current_mc = S390_CCW_MACHINE_CLASS(MACHINE_GET_CLASS(machine)); \ - ccw_machine_##suffix##_instance_options(machine); \ + current_mc = S390_CCW_MACHINE_CLASS(MACHINE_GET_CLASS(machine)); \ + MACHINE_VER_SYM(instance_options, ccw, __VA_ARGS__)(machine); \ } \ - static const TypeInfo ccw_machine_##suffix##_info = { \ - .name = MACHINE_TYPE_NAME("s390-ccw-virtio-" verstr), \ - .parent = TYPE_S390_CCW_MACHINE, \ - .class_init = ccw_machine_##suffix##_class_init, \ - .instance_init = ccw_machine_##suffix##_instance_init, \ - }; \ - static void ccw_machine_register_##suffix(void) \ + static const TypeInfo MACHINE_VER_SYM(info, ccw, __VA_ARGS__) = \ { \ - type_register_static(&ccw_machine_##suffix##_info); \ + .name = MACHINE_VER_TYPE_NAME("s390-ccw-virtio", __VA_ARGS__), \ + .parent = TYPE_S390_CCW_MACHINE, \ + .class_init = MACHINE_VER_SYM(class_init, ccw, __VA_ARGS__), \ + .instance_init = MACHINE_VER_SYM(instance_init, ccw, __VA_ARGS__), \ + }; \ + static void MACHINE_VER_SYM(register, ccw, __VA_ARGS__)(void) \ + { \ + type_register_static(&MACHINE_VER_SYM(info, ccw, __VA_ARGS__)); \ } \ - type_init(ccw_machine_register_##suffix) + type_init(MACHINE_VER_SYM(register, ccw, __VA_ARGS__)) + +#define DEFINE_CCW_MACHINE_AS_LATEST(major, minor) \ + DEFINE_CCW_MACHINE_IMPL(true, major, minor) + +#define DEFINE_CCW_MACHINE(major, minor) \ + DEFINE_CCW_MACHINE_IMPL(false, major, minor) + static void ccw_machine_9_1_instance_options(MachineState *machine) { @@ -854,7 +864,7 @@ static void ccw_machine_9_1_instance_options(MachineState *machine) static void ccw_machine_9_1_class_options(MachineClass *mc) { } -DEFINE_CCW_MACHINE(9_1, "9.1", true); +DEFINE_CCW_MACHINE_AS_LATEST(9, 1); static void ccw_machine_9_0_instance_options(MachineState *machine) { @@ -866,7 +876,7 @@ static void ccw_machine_9_0_class_options(MachineClass *mc) ccw_machine_9_1_class_options(mc); compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len); } -DEFINE_CCW_MACHINE(9_0, "9.0", false); +DEFINE_CCW_MACHINE(9, 0); static void ccw_machine_8_2_instance_options(MachineState *machine) { @@ -878,7 +888,7 @@ static void ccw_machine_8_2_class_options(MachineClass *mc) ccw_machine_9_0_class_options(mc); compat_props_add(mc->compat_props, hw_compat_8_2, hw_compat_8_2_len); } -DEFINE_CCW_MACHINE(8_2, "8.2", false); +DEFINE_CCW_MACHINE(8, 2); static void ccw_machine_8_1_instance_options(MachineState *machine) { @@ -892,7 +902,7 @@ static void ccw_machine_8_1_class_options(MachineClass *mc) mc->smp_props.drawers_supported = false; mc->smp_props.books_supported = false; } -DEFINE_CCW_MACHINE(8_1, "8.1", false); +DEFINE_CCW_MACHINE(8, 1); static void ccw_machine_8_0_instance_options(MachineState *machine) { @@ -904,7 +914,7 @@ static void ccw_machine_8_0_class_options(MachineClass *mc) ccw_machine_8_1_class_options(mc); compat_props_add(mc->compat_props, hw_compat_8_0, hw_compat_8_0_len); } -DEFINE_CCW_MACHINE(8_0, "8.0", false); +DEFINE_CCW_MACHINE(8, 0); static void ccw_machine_7_2_instance_options(MachineState *machine) { @@ -916,7 +926,7 @@ static void ccw_machine_7_2_class_options(MachineClass *mc) ccw_machine_8_0_class_options(mc); compat_props_add(mc->compat_props, hw_compat_7_2, hw_compat_7_2_len); } -DEFINE_CCW_MACHINE(7_2, "7.2", false); +DEFINE_CCW_MACHINE(7, 2); static void ccw_machine_7_1_instance_options(MachineState *machine) { @@ -940,7 +950,7 @@ static void ccw_machine_7_1_class_options(MachineClass *mc) compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); s390mc->max_threads = S390_MAX_CPUS; } -DEFINE_CCW_MACHINE(7_1, "7.1", false); +DEFINE_CCW_MACHINE(7, 1); static void ccw_machine_7_0_instance_options(MachineState *machine) { @@ -955,7 +965,7 @@ static void ccw_machine_7_0_class_options(MachineClass *mc) ccw_machine_7_1_class_options(mc); compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len); } -DEFINE_CCW_MACHINE(7_0, "7.0", false); +DEFINE_CCW_MACHINE(7, 0); static void ccw_machine_6_2_instance_options(MachineState *machine) { @@ -970,7 +980,7 @@ static void ccw_machine_6_2_class_options(MachineClass *mc) ccw_machine_7_0_class_options(mc); compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len); } -DEFINE_CCW_MACHINE(6_2, "6.2", false); +DEFINE_CCW_MACHINE(6, 2); static void ccw_machine_6_1_instance_options(MachineState *machine) { @@ -988,7 +998,7 @@ static void ccw_machine_6_1_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len); mc->smp_props.prefer_sockets = true; } -DEFINE_CCW_MACHINE(6_1, "6.1", false); +DEFINE_CCW_MACHINE(6, 1); static void ccw_machine_6_0_instance_options(MachineState *machine) { @@ -1003,7 +1013,7 @@ static void ccw_machine_6_0_class_options(MachineClass *mc) ccw_machine_6_1_class_options(mc); compat_props_add(mc->compat_props, hw_compat_6_0, hw_compat_6_0_len); } -DEFINE_CCW_MACHINE(6_0, "6.0", false); +DEFINE_CCW_MACHINE(6, 0); static void ccw_machine_5_2_instance_options(MachineState *machine) { @@ -1015,7 +1025,7 @@ static void ccw_machine_5_2_class_options(MachineClass *mc) ccw_machine_6_0_class_options(mc); compat_props_add(mc->compat_props, hw_compat_5_2, hw_compat_5_2_len); } -DEFINE_CCW_MACHINE(5_2, "5.2", false); +DEFINE_CCW_MACHINE(5, 2); static void ccw_machine_5_1_instance_options(MachineState *machine) { @@ -1027,7 +1037,7 @@ static void ccw_machine_5_1_class_options(MachineClass *mc) ccw_machine_5_2_class_options(mc); compat_props_add(mc->compat_props, hw_compat_5_1, hw_compat_5_1_len); } -DEFINE_CCW_MACHINE(5_1, "5.1", false); +DEFINE_CCW_MACHINE(5, 1); static void ccw_machine_5_0_instance_options(MachineState *machine) { @@ -1039,7 +1049,7 @@ static void ccw_machine_5_0_class_options(MachineClass *mc) ccw_machine_5_1_class_options(mc); compat_props_add(mc->compat_props, hw_compat_5_0, hw_compat_5_0_len); } -DEFINE_CCW_MACHINE(5_0, "5.0", false); +DEFINE_CCW_MACHINE(5, 0); static void ccw_machine_4_2_instance_options(MachineState *machine) { @@ -1052,7 +1062,7 @@ static void ccw_machine_4_2_class_options(MachineClass *mc) mc->fixup_ram_size = s390_fixup_ram_size; compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len); } -DEFINE_CCW_MACHINE(4_2, "4.2", false); +DEFINE_CCW_MACHINE(4, 2); static void ccw_machine_4_1_instance_options(MachineState *machine) { @@ -1066,7 +1076,7 @@ static void ccw_machine_4_1_class_options(MachineClass *mc) ccw_machine_4_2_class_options(mc); compat_props_add(mc->compat_props, hw_compat_4_1, hw_compat_4_1_len); } -DEFINE_CCW_MACHINE(4_1, "4.1", false); +DEFINE_CCW_MACHINE(4, 1); static void ccw_machine_4_0_instance_options(MachineState *machine) { @@ -1080,7 +1090,7 @@ static void ccw_machine_4_0_class_options(MachineClass *mc) ccw_machine_4_1_class_options(mc); compat_props_add(mc->compat_props, hw_compat_4_0, hw_compat_4_0_len); } -DEFINE_CCW_MACHINE(4_0, "4.0", false); +DEFINE_CCW_MACHINE(4, 0); static void ccw_machine_3_1_instance_options(MachineState *machine) { @@ -1096,7 +1106,7 @@ static void ccw_machine_3_1_class_options(MachineClass *mc) ccw_machine_4_0_class_options(mc); compat_props_add(mc->compat_props, hw_compat_3_1, hw_compat_3_1_len); } -DEFINE_CCW_MACHINE(3_1, "3.1", false); +DEFINE_CCW_MACHINE(3, 1); static void ccw_machine_3_0_instance_options(MachineState *machine) { @@ -1111,7 +1121,7 @@ static void ccw_machine_3_0_class_options(MachineClass *mc) ccw_machine_3_1_class_options(mc); compat_props_add(mc->compat_props, hw_compat_3_0, hw_compat_3_0_len); } -DEFINE_CCW_MACHINE(3_0, "3.0", false); +DEFINE_CCW_MACHINE(3, 0); static void ccw_machine_2_12_instance_options(MachineState *machine) { @@ -1125,7 +1135,7 @@ static void ccw_machine_2_12_class_options(MachineClass *mc) ccw_machine_3_0_class_options(mc); compat_props_add(mc->compat_props, hw_compat_2_12, hw_compat_2_12_len); } -DEFINE_CCW_MACHINE(2_12, "2.12", false); +DEFINE_CCW_MACHINE(2, 12); #ifdef CONFIG_S390X_LEGACY_CPUS @@ -1148,7 +1158,7 @@ static void ccw_machine_2_11_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_11, hw_compat_2_11_len); compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_CCW_MACHINE(2_11, "2.11", false); +DEFINE_CCW_MACHINE(2, 11); static void ccw_machine_2_10_instance_options(MachineState *machine) { @@ -1160,7 +1170,7 @@ static void ccw_machine_2_10_class_options(MachineClass *mc) ccw_machine_2_11_class_options(mc); compat_props_add(mc->compat_props, hw_compat_2_10, hw_compat_2_10_len); } -DEFINE_CCW_MACHINE(2_10, "2.10", false); +DEFINE_CCW_MACHINE(2, 10); static void ccw_machine_2_9_instance_options(MachineState *machine) { @@ -1184,7 +1194,7 @@ static void ccw_machine_2_9_class_options(MachineClass *mc) compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); css_migration_enabled = false; } -DEFINE_CCW_MACHINE(2_9, "2.9", false); +DEFINE_CCW_MACHINE(2, 9); static void ccw_machine_2_8_instance_options(MachineState *machine) { @@ -1201,7 +1211,7 @@ static void ccw_machine_2_8_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_8, hw_compat_2_8_len); compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_CCW_MACHINE(2_8, "2.8", false); +DEFINE_CCW_MACHINE(2, 8); static void ccw_machine_2_7_instance_options(MachineState *machine) { @@ -1216,7 +1226,7 @@ static void ccw_machine_2_7_class_options(MachineClass *mc) ccw_machine_2_8_class_options(mc); compat_props_add(mc->compat_props, hw_compat_2_7, hw_compat_2_7_len); } -DEFINE_CCW_MACHINE(2_7, "2.7", false); +DEFINE_CCW_MACHINE(2, 7); static void ccw_machine_2_6_instance_options(MachineState *machine) { @@ -1236,7 +1246,7 @@ static void ccw_machine_2_6_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_6, hw_compat_2_6_len); compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_CCW_MACHINE(2_6, "2.6", false); +DEFINE_CCW_MACHINE(2, 6); static void ccw_machine_2_5_instance_options(MachineState *machine) { @@ -1248,7 +1258,7 @@ static void ccw_machine_2_5_class_options(MachineClass *mc) ccw_machine_2_6_class_options(mc); compat_props_add(mc->compat_props, hw_compat_2_5, hw_compat_2_5_len); } -DEFINE_CCW_MACHINE(2_5, "2.5", false); +DEFINE_CCW_MACHINE(2, 5); static void ccw_machine_2_4_instance_options(MachineState *machine) { @@ -1273,7 +1283,7 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_4, hw_compat_2_4_len); compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_CCW_MACHINE(2_4, "2.4", false); +DEFINE_CCW_MACHINE(2, 4); #endif From patchwork Tue Jul 2 05:00:55 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: 809036 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44087wru; Mon, 1 Jul 2024 22:03:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVDtmSArLlqQ0JB382KpgV8M6Ii3TBKDKF3iWMAGPlgmWJp9zs/P0tQCt269RKLuacJFMGDtn4jUi4SpC1gYnaF X-Google-Smtp-Source: AGHT+IGEWDkfJYsNDVra+nN7F2EKO4rtMS2bCPkFt3trZadsyC6ArNxFE6HsGhkYs2LrU3lW3qVe X-Received: by 2002:a05:6214:29e3:b0:6b2:b5c1:72dc with SMTP id 6a1803df08f44-6b5b7185e82mr81632866d6.54.1719896615549; Mon, 01 Jul 2024 22:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896615; cv=none; d=google.com; s=arc-20160816; b=jvwhmUt4l/kOzgepUhvxJJAXmErfYes7eMxzOVqZzuNj+djQeM2QSbzVhtG3O8sViC 8KGexNK0gTvQtsG1FxG1bZ0FuLwdag3M2KIBpITkesW2wZ0bOqK8hsNmAi6GOSxDUuhQ eDnNquLnHWtk4C7zdaq/X7y8wH4rMWnJVN8m/+KiHBm5clXjbZ9OV6lKoVYqE6wENvuG xa0VoqAXDm84NIOlPRqhJkSmh87HEu4EEDNKORR8YBw7zKisCpZ1JSYocx2GHMaKxlIJ +IMfnyfgcO4+CTquwEoDikXYs46Nh7/YtOkAVH/RJyExpz8MehFYz/oCB0dKcysXthc8 NmOA== 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=pioOxQHXqtuS3GWzOlUVjKUrOs3kssZvNj/hFMkYvgQ=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=Od8Qn+4wUIIFJwO/ssjXVbaLkxS3gN0pTegUIQWTVpc6dmgRHSokEoSaN1/TH/sEfC qr4EfCNJUnBRQz68F7Rrr4KrV8Ue25w5Mns2GOS+a56X7WwpO3NJFRmRStK0tc94hXYz AqqduJIQpnIqmqsh3CiDB1HIOgR0auVEDHBT1hXSixl2bww7fl9ZY0k+1cJpnmBQZNzC IwC4vzTkhhoXjt1Y1gGGMGCG4VTQmSO+woPCKhzezr71ONyFt5/ymuKhdktsgIUcXVer kP9iSyU5Dr1QaimY/FPFczu1CeCHOFtEL1reMMXAY9d1M5SmXMHsxhEFDoRlfyFljcuB WThQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j41Vx1WA; 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 6a1803df08f44-6b59e606807si94091446d6.453.2024.07.01.22.03.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:35 -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=j41Vx1WA; 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 1sOVeN-0007Ho-Ih; Tue, 02 Jul 2024 01:01:55 -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 1sOVeJ-0007HL-M2 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:53 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVeG-0006QC-QI for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:50 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2e72224c395so42091251fa.3 for ; Mon, 01 Jul 2024 22:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896506; x=1720501306; 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=pioOxQHXqtuS3GWzOlUVjKUrOs3kssZvNj/hFMkYvgQ=; b=j41Vx1WAahxDirYnRwF8CTebPfHmRCKb68zjGYCnhUyN0Rm511mZ0HWjXHKEMgmNts Dga3JTjg15nXKlXqtlKtAW8Ec9CmA9XD4hg+7qvfjz4fd9rAAgBUjRBBArn1xavKtnuN FcqANJS/Z/n/UlPS/eitpJU1zDJlo2kO08wKkKwZavitTv801LXzsv9wc7sDuavhubZJ O7N4AbVswPTD1h7kXpM0dO6+9HsbWVeW4WMT4S99Uxqnu30cDDZkWNfhH+RMhoea/cqI L1VXBfwHXqWr0WVmN5iSOmxocd1GW5d/dO/L9+qI3G4B/9niMVSKfpwfHxz1AqJsVP4J OLkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896506; x=1720501306; 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=pioOxQHXqtuS3GWzOlUVjKUrOs3kssZvNj/hFMkYvgQ=; b=i+Km4gmNhD45Jw7+6P9qXsxXxA7FUl91ONdHRiY8iEBZ0hh4pme/yS9avSe1oX5v0C PtZ97fVmECGD3w7GuJNYgv7ozdgSljWCrPc9KjH4tkdLK/jitAPbNTD8qmysCY9CQ2hB Beb5k8hHZp79eCwY15sSNGaeQdSOzUBZV64GgCkg0o55xhQXI54GS91J0rI+n8O7j6RN gz3Xyj/G3uifQyd7fsVyJgWEtkAUJvL0toI6mErL02NYqMFuU9dEr2H2+cNMejxGTWS4 o2FEWbsPZk6dqVriSCq0qDB9TGFn+gbw0Cj7pMK5LIDcHf4z0x3TmJ8LTnRXqjiC8LFz SK+w== X-Gm-Message-State: AOJu0YyeyLOjj3psdO8yEVCFdDVcNGHDyzi/nZy97N9bA1RhGj14WRA4 cgDKw4wpu3CqCZba+m3OaceiobcXuRRaTmrBMBRSbWl+eu/js1YkcUpXUN3f8ZgbnX/ZhyqrjTF 8 X-Received: by 2002:a2e:6d12:0:b0:2ec:95:d6fe with SMTP id 38308e7fff4ca-2ee5e36eecfmr42345691fa.24.1719896506200; Mon, 01 Jul 2024 22:01:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b097bcbsm180484155e9.35.2024.07.01.22.01.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:01:45 -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 05/22] hw/ppc: convert 'spapr' machine definitions to use new macros Date: Tue, 2 Jul 2024 07:00:55 +0200 Message-ID: <20240702050112.35907-6-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::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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é This changes the DEFINE_SPAPR_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number twice in two different formats in the calls to DEFINE_SPAPR_MACHINE. A DEFINE_SPAPR_MACHINE_AS_LATEST helper is added so that it is not required to pass 'false' for every single historical machine type. Due to the odd-ball '2.12-sxxm' machine type version, this commit introduces a DEFINE_SPAPR_MACHINE_TAGGED helper to allow defining of "tagged" machine types which have a string suffix. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Message-ID: <20240620165742.1711389-5-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr.c | 97 +++++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 44 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a9908545e6..2785b6b303 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4804,26 +4804,35 @@ static void spapr_machine_latest_class_options(MachineClass *mc) mc->is_default = true; } -#define DEFINE_SPAPR_MACHINE(suffix, verstr, latest) \ - static void spapr_machine_##suffix##_class_init(ObjectClass *oc, \ - void *data) \ +#define DEFINE_SPAPR_MACHINE_IMPL(latest, ...) \ + static void MACHINE_VER_SYM(class_init, spapr, __VA_ARGS__)( \ + ObjectClass *oc, \ + void *data) \ { \ MachineClass *mc = MACHINE_CLASS(oc); \ - spapr_machine_##suffix##_class_options(mc); \ + MACHINE_VER_SYM(class_options, spapr, __VA_ARGS__)(mc); \ if (latest) { \ spapr_machine_latest_class_options(mc); \ } \ } \ - static const TypeInfo spapr_machine_##suffix##_info = { \ - .name = MACHINE_TYPE_NAME("pseries-" verstr), \ - .parent = TYPE_SPAPR_MACHINE, \ - .class_init = spapr_machine_##suffix##_class_init, \ - }; \ - static void spapr_machine_register_##suffix(void) \ + static const TypeInfo MACHINE_VER_SYM(info, spapr, __VA_ARGS__) = \ { \ - type_register(&spapr_machine_##suffix##_info); \ + .name = MACHINE_VER_TYPE_NAME("pseries", __VA_ARGS__), \ + .parent = TYPE_SPAPR_MACHINE, \ + .class_init = MACHINE_VER_SYM(class_init, spapr, __VA_ARGS__), \ + }; \ + static void MACHINE_VER_SYM(register, spapr, __VA_ARGS__)(void) \ + { \ + type_register(&MACHINE_VER_SYM(info, spapr, __VA_ARGS__)); \ } \ - type_init(spapr_machine_register_##suffix) + type_init(MACHINE_VER_SYM(register, spapr, __VA_ARGS__)) + +#define DEFINE_SPAPR_MACHINE_AS_LATEST(major, minor) \ + DEFINE_SPAPR_MACHINE_IMPL(true, major, minor) +#define DEFINE_SPAPR_MACHINE(major, minor) \ + DEFINE_SPAPR_MACHINE_IMPL(false, major, minor) +#define DEFINE_SPAPR_MACHINE_TAGGED(major, minor, tag) \ + DEFINE_SPAPR_MACHINE_IMPL(false, major, minor, _, tag) /* * pseries-9.1 @@ -4833,7 +4842,7 @@ static void spapr_machine_9_1_class_options(MachineClass *mc) /* Defaults for the latest behaviour inherited from the base class */ } -DEFINE_SPAPR_MACHINE(9_1, "9.1", true); +DEFINE_SPAPR_MACHINE_AS_LATEST(9, 1); /* * pseries-9.0 @@ -4844,7 +4853,7 @@ static void spapr_machine_9_0_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len); } -DEFINE_SPAPR_MACHINE(9_0, "9.0", false); +DEFINE_SPAPR_MACHINE(9, 0); /* * pseries-8.2 @@ -4855,7 +4864,7 @@ static void spapr_machine_8_2_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_8_2, hw_compat_8_2_len); } -DEFINE_SPAPR_MACHINE(8_2, "8.2", false); +DEFINE_SPAPR_MACHINE(8, 2); /* * pseries-8.1 @@ -4866,7 +4875,7 @@ static void spapr_machine_8_1_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_8_1, hw_compat_8_1_len); } -DEFINE_SPAPR_MACHINE(8_1, "8.1", false); +DEFINE_SPAPR_MACHINE(8, 1); /* * pseries-8.0 @@ -4877,7 +4886,7 @@ static void spapr_machine_8_0_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_8_0, hw_compat_8_0_len); } -DEFINE_SPAPR_MACHINE(8_0, "8.0", false); +DEFINE_SPAPR_MACHINE(8, 0); /* * pseries-7.2 @@ -4888,7 +4897,7 @@ static void spapr_machine_7_2_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_7_2, hw_compat_7_2_len); } -DEFINE_SPAPR_MACHINE(7_2, "7.2", false); +DEFINE_SPAPR_MACHINE(7, 2); /* * pseries-7.1 @@ -4899,7 +4908,7 @@ static void spapr_machine_7_1_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_7_1, hw_compat_7_1_len); } -DEFINE_SPAPR_MACHINE(7_1, "7.1", false); +DEFINE_SPAPR_MACHINE(7, 1); /* * pseries-7.0 @@ -4910,7 +4919,7 @@ static void spapr_machine_7_0_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len); } -DEFINE_SPAPR_MACHINE(7_0, "7.0", false); +DEFINE_SPAPR_MACHINE(7, 0); /* * pseries-6.2 @@ -4921,7 +4930,7 @@ static void spapr_machine_6_2_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len); } -DEFINE_SPAPR_MACHINE(6_2, "6.2", false); +DEFINE_SPAPR_MACHINE(6, 2); /* * pseries-6.1 @@ -4936,7 +4945,7 @@ static void spapr_machine_6_1_class_options(MachineClass *mc) mc->smp_props.prefer_sockets = true; } -DEFINE_SPAPR_MACHINE(6_1, "6.1", false); +DEFINE_SPAPR_MACHINE(6, 1); /* * pseries-6.0 @@ -4947,7 +4956,7 @@ static void spapr_machine_6_0_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_6_0, hw_compat_6_0_len); } -DEFINE_SPAPR_MACHINE(6_0, "6.0", false); +DEFINE_SPAPR_MACHINE(6, 0); /* * pseries-5.2 @@ -4958,7 +4967,7 @@ static void spapr_machine_5_2_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_5_2, hw_compat_5_2_len); } -DEFINE_SPAPR_MACHINE(5_2, "5.2", false); +DEFINE_SPAPR_MACHINE(5, 2); /* * pseries-5.1 @@ -4972,7 +4981,7 @@ static void spapr_machine_5_1_class_options(MachineClass *mc) smc->pre_5_2_numa_associativity = true; } -DEFINE_SPAPR_MACHINE(5_1, "5.1", false); +DEFINE_SPAPR_MACHINE(5, 1); /* * pseries-5.0 @@ -4991,7 +5000,7 @@ static void spapr_machine_5_0_class_options(MachineClass *mc) smc->pre_5_1_assoc_refpoints = true; } -DEFINE_SPAPR_MACHINE(5_0, "5.0", false); +DEFINE_SPAPR_MACHINE(5, 0); /* * pseries-4.2 @@ -5008,7 +5017,7 @@ static void spapr_machine_4_2_class_options(MachineClass *mc) mc->nvdimm_supported = false; } -DEFINE_SPAPR_MACHINE(4_2, "4.2", false); +DEFINE_SPAPR_MACHINE(4, 2); /* * pseries-4.1 @@ -5028,7 +5037,7 @@ static void spapr_machine_4_1_class_options(MachineClass *mc) compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_SPAPR_MACHINE(4_1, "4.1", false); +DEFINE_SPAPR_MACHINE(4, 1); /* * pseries-4.0 @@ -5055,7 +5064,7 @@ static void spapr_machine_4_0_class_options(MachineClass *mc) smc->pre_4_1_migration = true; } -DEFINE_SPAPR_MACHINE(4_0, "4.0", false); +DEFINE_SPAPR_MACHINE(4, 0); /* * pseries-3.1 @@ -5077,7 +5086,7 @@ static void spapr_machine_3_1_class_options(MachineClass *mc) smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF; } -DEFINE_SPAPR_MACHINE(3_1, "3.1", false); +DEFINE_SPAPR_MACHINE(3, 1); /* * pseries-3.0 @@ -5095,7 +5104,7 @@ static void spapr_machine_3_0_class_options(MachineClass *mc) smc->irq = &spapr_irq_xics_legacy; } -DEFINE_SPAPR_MACHINE(3_0, "3.0", false); +DEFINE_SPAPR_MACHINE(3, 0); /* * pseries-2.12 @@ -5120,7 +5129,7 @@ static void spapr_machine_2_12_class_options(MachineClass *mc) smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 0; } -DEFINE_SPAPR_MACHINE(2_12, "2.12", false); +DEFINE_SPAPR_MACHINE(2, 12); static void spapr_machine_2_12_sxxm_class_options(MachineClass *mc) { @@ -5132,7 +5141,7 @@ static void spapr_machine_2_12_sxxm_class_options(MachineClass *mc) smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_FIXED_CCD; } -DEFINE_SPAPR_MACHINE(2_12_sxxm, "2.12-sxxm", false); +DEFINE_SPAPR_MACHINE_TAGGED(2, 12, sxxm); /* * pseries-2.11 @@ -5148,7 +5157,7 @@ static void spapr_machine_2_11_class_options(MachineClass *mc) mc->deprecation_reason = "old and not maintained - use a 2.12+ version"; } -DEFINE_SPAPR_MACHINE(2_11, "2.11", false); +DEFINE_SPAPR_MACHINE(2, 11); /* * pseries-2.10 @@ -5160,7 +5169,7 @@ static void spapr_machine_2_10_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_10, hw_compat_2_10_len); } -DEFINE_SPAPR_MACHINE(2_10, "2.10", false); +DEFINE_SPAPR_MACHINE(2, 10); /* * pseries-2.9 @@ -5180,7 +5189,7 @@ static void spapr_machine_2_9_class_options(MachineClass *mc) smc->resize_hpt_default = SPAPR_RESIZE_HPT_DISABLED; } -DEFINE_SPAPR_MACHINE(2_9, "2.9", false); +DEFINE_SPAPR_MACHINE(2, 9); /* * pseries-2.8 @@ -5198,7 +5207,7 @@ static void spapr_machine_2_8_class_options(MachineClass *mc) mc->numa_mem_align_shift = 23; } -DEFINE_SPAPR_MACHINE(2_8, "2.8", false); +DEFINE_SPAPR_MACHINE(2, 8); /* * pseries-2.7 @@ -5273,7 +5282,7 @@ static void spapr_machine_2_7_class_options(MachineClass *mc) smc->phb_placement = phb_placement_2_7; } -DEFINE_SPAPR_MACHINE(2_7, "2.7", false); +DEFINE_SPAPR_MACHINE(2, 7); /* * pseries-2.6 @@ -5291,7 +5300,7 @@ static void spapr_machine_2_6_class_options(MachineClass *mc) compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_SPAPR_MACHINE(2_6, "2.6", false); +DEFINE_SPAPR_MACHINE(2, 6); /* * pseries-2.5 @@ -5310,7 +5319,7 @@ static void spapr_machine_2_5_class_options(MachineClass *mc) compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_SPAPR_MACHINE(2_5, "2.5", false); +DEFINE_SPAPR_MACHINE(2, 5); /* * pseries-2.4 @@ -5325,7 +5334,7 @@ static void spapr_machine_2_4_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_4, hw_compat_2_4_len); } -DEFINE_SPAPR_MACHINE(2_4, "2.4", false); +DEFINE_SPAPR_MACHINE(2, 4); /* * pseries-2.3 @@ -5340,7 +5349,7 @@ static void spapr_machine_2_3_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_3, hw_compat_2_3_len); compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } -DEFINE_SPAPR_MACHINE(2_3, "2.3", false); +DEFINE_SPAPR_MACHINE(2, 3); /* * pseries-2.2 @@ -5357,7 +5366,7 @@ static void spapr_machine_2_2_class_options(MachineClass *mc) compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); mc->default_machine_opts = "modern-hotplug-events=off,suppress-vmdesc=on"; } -DEFINE_SPAPR_MACHINE(2_2, "2.2", false); +DEFINE_SPAPR_MACHINE(2, 2); /* * pseries-2.1 @@ -5368,7 +5377,7 @@ static void spapr_machine_2_1_class_options(MachineClass *mc) spapr_machine_2_2_class_options(mc); compat_props_add(mc->compat_props, hw_compat_2_1, hw_compat_2_1_len); } -DEFINE_SPAPR_MACHINE(2_1, "2.1", false); +DEFINE_SPAPR_MACHINE(2, 1); static void spapr_machine_register_types(void) { From patchwork Tue Jul 2 05:00:56 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: 809023 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43675wru; Mon, 1 Jul 2024 22:02:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUdVfuKhXkHB3E8z774pEuNnjlFXJn8UEUHerDsEBVbNqW1pBbPh1tdy458wn/0nMFO48BR3KhAY5DFOvYLE9+4 X-Google-Smtp-Source: AGHT+IGGpHPj6OlSV3g5xisztb/OgmdsMf/roSDIoZjh14G+sa/eadw9JXgZXFp6+C+27W/S9Ooq X-Received: by 2002:ad4:5942:0:b0:6b0:7ea7:4189 with SMTP id 6a1803df08f44-6b5b71486afmr73721886d6.42.1719896537711; Mon, 01 Jul 2024 22:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896537; cv=none; d=google.com; s=arc-20160816; b=ZaSDSi7Rl9R6bJzgAlck2smEbmu6Bzpnk1JN0u2UB0XR/rl4hA8PzaX+O6sIcI8KE0 Q8D8ys5LWBrPiOw0+BW2/Ueuj5ebX+eI6oSy0T41MWxGuanN/rv8Q549H6M/vcQPae2Z 19JR8q0HwJ0nOk72ninBqqRGjZjzVBp+1tz0n9Wujy5QdGJpI/sYcS9heCbr0QbelsLD qA+jCZoOPqa4U7jtJoxElm5I7eHy4hjCgE+I5VnMqMEJskFoUn7ESwVFoA8nKaBoIqoI 8o3kG3OpI5XUDnRzG25DZxzsCPhnkPs8VLsO5SAVy4pfbfxEYzvc0HvqZN/aDGwSxrPB 1OCQ== 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=yjoCJaWMopGjgFAzmTclEaniscPXZHqfmSK68jrTLyM=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=DK4/DHxdDpfMc7yuZlgRqJWscwP8qb75OJf2c5U+zmKHHe8xh5jUuN0/v54S1GYMVA k9bJ9rN+3Eubkgvwrx8kjZmeJxWtazgfdE6TJz/h1YVreay7oSmeG0+46DXeYHl69FkT 1VwKmDYgdskiEKujV6UFxwHwsNSiRYdxd1ZvAOnJzXWRHBoiIqoN5GyfOKGsRyUqads+ uNW7iOtcS8EueGIuLbv3YQVqjhlBMRkZ4ex5MO+gZ/oMy/04MTJ3wxAl1GiDtstW9Vye hFOFSxCGORZOSJx+2KuI/MYNOJPGQLZIAcvqiqha2FbtmWWyNIhWHVE1T6Cyot2dS5Ch azeQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tC7dyutb; 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 6a1803df08f44-6b59e36c258si96970916d6.149.2024.07.01.22.02.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:17 -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=tC7dyutb; 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-0007Ib-ND; Tue, 02 Jul 2024 01:01:58 -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-0007Hq-Qa for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:55 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVeL-0006mY-VL for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:01:55 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-356c4e926a3so2165123f8f.1 for ; Mon, 01 Jul 2024 22:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896512; x=1720501312; 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=yjoCJaWMopGjgFAzmTclEaniscPXZHqfmSK68jrTLyM=; b=tC7dyutbH5JHqfsRbdsPQY5DIzUZhaVwxcovDr6/gtlronkHa0guRwqBzeI/ze6YR+ EgE69iMhfO3Y/t8vRrkB+Orqlo7Vx0LFjxnE0mfcEb+UtWVjRmtkFNjPOm09fsl47yJy 47e25ig+m3xRa+v4D7/MATMTJMZnSFO1BWynsVhkDpL2NRDG0LmUTSFS5uimsWv6iB00 HMzysAedDTaZ+mnioIzJQP7YFYjtUJYbga8OOvd4k8EvjiGGUw2ImBhnHoPDoyjuNx6l ktpGt87OyY//ljzzGUQudFiahCeyH1qJ/ymTgoDIhVRvVfSN/5mPBELDn0A56YGhELxn PqrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896512; x=1720501312; 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=yjoCJaWMopGjgFAzmTclEaniscPXZHqfmSK68jrTLyM=; b=X5o7a3ekLe21bl8/0LewguQKBBonzbk5neWiFpkMHCSiIfXpzoVOLAVxBXbv8YXLNv MAGh7JLxGIGdY0mDkCngZoHaSW5y/1REhFKJ4Jreij0avEFlxVegRfN5z9A9kG+3pfIV QMYW6KLQQOLlD5BZDcg2RECQhbvL7pLuusdEoJznmik8TTwXvtK0GzOn9F2fgmb16UmB ewCS2csAP63sJnEXl1uJneGHW7V3zw1A6+Iv5CgPm6v2chy23yeOXcJ7j9SoMxBxKgQ1 RfTBd+U/45amFwOJ/g/STfS/AISXPcYQfPyHu1OswVA8QwrqnmRCCOUPoOmUEz1siYCq KQuw== X-Gm-Message-State: AOJu0Yx++MvDKy7Rqe4EhAY0HklU2cH05V53el+uHsNHpcvSc9I+QZY2 iGVxhhLwpeDAwhSv9sTcaLJ4WuahpwBPMUwYzBxvGp/pVXO/Ob/xao9W1MpGRCW9IxRdMu6usbE U X-Received: by 2002:a5d:6c66:0:b0:366:e991:b9ac with SMTP id ffacd0b85a97d-367756a3423mr4193492f8f.14.1719896512188; Mon, 01 Jul 2024 22:01:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0e141esm11844150f8f.58.2024.07.01.22.01.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:01:51 -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 06/22] hw/m68k: convert 'virt' machine definitions to use new macros Date: Tue, 2 Jul 2024 07:00:56 +0200 Message-ID: <20240702050112.35907-7-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::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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é This changes the DEFINE_VIRT_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. A DEFINE_VIRT_MACHINE_AS_LATEST helper is added so that it is not required to pass 'false' for every single historical machine type. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-6-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/m68k/virt.c | 55 ++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index 09bc9bdfef..cd6ee692f7 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -335,99 +335,106 @@ static void virt_machine_register_types(void) type_init(virt_machine_register_types) -#define DEFINE_VIRT_MACHINE(major, minor, latest) \ - static void virt_##major##_##minor##_class_init(ObjectClass *oc, \ - void *data) \ +#define DEFINE_VIRT_MACHINE_IMPL(latest, ...) \ + static void MACHINE_VER_SYM(class_init, virt, __VA_ARGS__)( \ + ObjectClass *oc, \ + void *data) \ { \ MachineClass *mc = MACHINE_CLASS(oc); \ - virt_machine_##major##_##minor##_options(mc); \ - mc->desc = "QEMU " # major "." # minor " M68K Virtual Machine"; \ + MACHINE_VER_SYM(options, virt, __VA_ARGS__)(mc); \ + mc->desc = "QEMU " MACHINE_VER_STR(__VA_ARGS__) " M68K Virtual Machine"; \ if (latest) { \ mc->alias = "virt"; \ } \ } \ - static const TypeInfo machvirt_##major##_##minor##_info = { \ - .name = MACHINE_TYPE_NAME("virt-" # major "." # minor), \ - .parent = MACHINE_TYPE_NAME("virt"), \ - .class_init = virt_##major##_##minor##_class_init, \ - }; \ - static void machvirt_machine_##major##_##minor##_init(void) \ + static const TypeInfo MACHINE_VER_SYM(info, virt, __VA_ARGS__) = \ { \ - type_register_static(&machvirt_##major##_##minor##_info); \ + .name = MACHINE_VER_TYPE_NAME("virt", __VA_ARGS__), \ + .parent = MACHINE_TYPE_NAME("virt"), \ + .class_init = MACHINE_VER_SYM(class_init, virt, __VA_ARGS__), \ + }; \ + static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ + { \ + type_register_static(&MACHINE_VER_SYM(info, virt, __VA_ARGS__)); \ } \ - type_init(machvirt_machine_##major##_##minor##_init); + type_init(MACHINE_VER_SYM(register, virt, __VA_ARGS__)); + +#define DEFINE_VIRT_MACHINE_AS_LATEST(major, minor) \ + DEFINE_VIRT_MACHINE_IMPL(true, major, minor) +#define DEFINE_VIRT_MACHINE(major, minor) \ + DEFINE_VIRT_MACHINE_IMPL(false, major, minor) static void virt_machine_9_1_options(MachineClass *mc) { } -DEFINE_VIRT_MACHINE(9, 1, true) +DEFINE_VIRT_MACHINE_AS_LATEST(9, 1) static void virt_machine_9_0_options(MachineClass *mc) { virt_machine_9_1_options(mc); compat_props_add(mc->compat_props, hw_compat_9_0, hw_compat_9_0_len); } -DEFINE_VIRT_MACHINE(9, 0, false) +DEFINE_VIRT_MACHINE(9, 0) static void virt_machine_8_2_options(MachineClass *mc) { virt_machine_9_0_options(mc); compat_props_add(mc->compat_props, hw_compat_8_2, hw_compat_8_2_len); } -DEFINE_VIRT_MACHINE(8, 2, false) +DEFINE_VIRT_MACHINE(8, 2) static void virt_machine_8_1_options(MachineClass *mc) { virt_machine_8_2_options(mc); compat_props_add(mc->compat_props, hw_compat_8_1, hw_compat_8_1_len); } -DEFINE_VIRT_MACHINE(8, 1, false) +DEFINE_VIRT_MACHINE(8, 1) static void virt_machine_8_0_options(MachineClass *mc) { virt_machine_8_1_options(mc); compat_props_add(mc->compat_props, hw_compat_8_0, hw_compat_8_0_len); } -DEFINE_VIRT_MACHINE(8, 0, false) +DEFINE_VIRT_MACHINE(8, 0) static void virt_machine_7_2_options(MachineClass *mc) { virt_machine_8_0_options(mc); compat_props_add(mc->compat_props, hw_compat_7_2, hw_compat_7_2_len); } -DEFINE_VIRT_MACHINE(7, 2, false) +DEFINE_VIRT_MACHINE(7, 2) static void virt_machine_7_1_options(MachineClass *mc) { virt_machine_7_2_options(mc); compat_props_add(mc->compat_props, hw_compat_7_1, hw_compat_7_1_len); } -DEFINE_VIRT_MACHINE(7, 1, false) +DEFINE_VIRT_MACHINE(7, 1) static void virt_machine_7_0_options(MachineClass *mc) { virt_machine_7_1_options(mc); compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len); } -DEFINE_VIRT_MACHINE(7, 0, false) +DEFINE_VIRT_MACHINE(7, 0) static void virt_machine_6_2_options(MachineClass *mc) { virt_machine_7_0_options(mc); compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len); } -DEFINE_VIRT_MACHINE(6, 2, false) +DEFINE_VIRT_MACHINE(6, 2) static void virt_machine_6_1_options(MachineClass *mc) { virt_machine_6_2_options(mc); compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len); } -DEFINE_VIRT_MACHINE(6, 1, false) +DEFINE_VIRT_MACHINE(6, 1) static void virt_machine_6_0_options(MachineClass *mc) { virt_machine_6_1_options(mc); compat_props_add(mc->compat_props, hw_compat_6_0, hw_compat_6_0_len); } -DEFINE_VIRT_MACHINE(6, 0, false) +DEFINE_VIRT_MACHINE(6, 0) From patchwork Tue Jul 2 05:00:57 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: 809032 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43996wru; Mon, 1 Jul 2024 22:03:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXpSOGI7CG6XF/3g08rFlpGd4Ub/wExDFa3ZlT8B/SHfU/0GrpdiIaFW7/NX9rxveNO1bVa4eVMkAtJLWNP9jg X-Google-Smtp-Source: AGHT+IGhhu+GKn8jHLnB4ZzQ0DVORZYAdg1kAjX14B4tVLUbTM6R4VJL43J4sdVKWV1tCDtQ4Lvw X-Received: by 2002:ad4:576e:0:b0:6b5:1f3e:a92c with SMTP id 6a1803df08f44-6b5b71b6f32mr107591566d6.58.1719896599485; Mon, 01 Jul 2024 22:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896599; cv=none; d=google.com; s=arc-20160816; b=O4TkraGCpRF98h2493zC3mKPMLeOYJZvADHU6qUG+dp5vZ7WD8te/gZkYuEeHl37+/ rsApc93Y7GUGWvpGfEM/YNJ1AFHsvldxUZkxhszsUtHqQhnLyFspTR6C3jHqMuFZJxik iIy9j02nT7WhLCcuhnrPR3E03jhbzFF3GkuaPXFCAtUh8Oqesj+7PjYzBIirlaxKiCr9 hXkfuLxz0m3SHhfEq2+peIj85PYffIfeov1ENueK7IxuQtJEre/n9QjAd1/yde87K3Wu wKEtl1rtAbioLfLOCEoAZJjarMyvpI+xiKaoQLekagyRd0MBY00GzySZXQFf0I3DmFf0 bNZQ== 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=1iURupPRr5TrxEeyHkNHup/uc7tKrykkuVBAlwFQDkQ=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=GLnql9inXgp+kXiIpWDb9IdK6l5Eys8gAiPHcPdtdwfDzJXH8ydiRqPpYFcLQMDV7P pvWTH1yC/nzaxt94e0qxv6LYD9a5jBUPKX3kzseVZXTSmgY4aHpPDF1A+JGlbm5+uc/9 +xY0PR7OzFdYwkYIS6EmHCXYc0a7OU/cYQbOyJQNsCyH0w4RR9WYghYFxjcrhTXnjjwK 6vxFiXDUrFmLbkH3ZrJ+X+ayGBw7dzKlfvA92pJCI1yC+SOg7l4u3f95aDLFZmIRbMi2 fj+t7EWWnHMKnHZI2DCvzvW7+mHzjq7uzc3iC1PYzbvuHm++eGPQV9/4HiW+r7vFjB1V IlVQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bFjC0vNw; 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 6a1803df08f44-6b59e5f3ac8si98541166d6.385.2024.07.01.22.03.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:19 -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=bFjC0vNw; 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 1sOVeY-0007KW-M8; Tue, 02 Jul 2024 01:02:06 -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 1sOVeW-0007Jo-A1 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:04 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVeT-00078n-9y for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:04 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42561c16ffeso28815495e9.3 for ; Mon, 01 Jul 2024 22:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896518; x=1720501318; 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=1iURupPRr5TrxEeyHkNHup/uc7tKrykkuVBAlwFQDkQ=; b=bFjC0vNwJKXkPYnZFSSHBL8uhHQ51LSHo5W80N6HftYA+494Q8zhyXNetVaSl7v35x U++6Tc0kSnxU+qsE13r0F4NUq7hd+hm+d8rjcz6C6GPpvXRcrn3m/vKZj2PU0pmO6Kc2 LXe5EBFpBnJN0IaaMScKe3V8LWX6obPMzNfumtpT4dRQ4braY2WJoyKYW38c2ZcbFr6A u8n51HWnmfIGQ7qHlUegK2XGEDRII8agtULGWOb3Pov8PcdzmrvqtAGc2MhfQP73hNGf Ic0cwa64lUkUMDfqTbE06uwrUuVx60Wp6+HSuj9lDY4NFbXKlZIL6i6FHJFU87brBc0c PHCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896518; x=1720501318; 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=1iURupPRr5TrxEeyHkNHup/uc7tKrykkuVBAlwFQDkQ=; b=Ws80oTaD6p+238eb7zSVJS8yroOJ+G7gY0saSu01iHar2fF7eQoqqK7u9hr3ci7dYN HEw6syAWVzJGP2j13UgFnLh0rkrzxd8bzGMRhKTrWV/b6+3+E1e4Hr2JIUn74cAb0eAy mBE8gZ1jNN1Q8RNh4uo+uRoyMtBMeqeYk4XAmfgnKsp/3w2WrROz5TTDEYBfROMDi2UK ssXYqAN8ZQlHmLFv3z3mPZ6j0fkciHj/cTst10xfmOkzA/5LRnRqkuPWX/6q8fvt3KzJ 5TFTWtCb1s6fSIz3Yc8KYI1qtNs2JKHx5VwXGmmbVTocM+29xo1cDnj8DUA8ojeUMlod Ja1A== X-Gm-Message-State: AOJu0YwCImKFIrjNST0q5r3bfc7Ms2Xbk4OEcnxo1slULJ0v21yjEXhC 2K9nEJtpH2AJjZX8OgS+5J/pnJbndLy9x9Cg17lIvc7IUk9AlI0BCuy6trD1JXPYOHym8CpQehT M X-Received: by 2002:a05:600c:19cb:b0:425:6a12:bbe6 with SMTP id 5b1f17b1804b1-42579fef0fcmr62364975e9.0.1719896518474; Mon, 01 Jul 2024 22:01:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b0c1018sm179151135e9.40.2024.07.01.22.01.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:01:58 -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 07/22] hw/i386: convert 'i440fx' machine definitions to use new macros Date: Tue, 2 Jul 2024 07:00:57 +0200 Message-ID: <20240702050112.35907-8-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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é This changes the DEFINE_I440FX_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number thrice in three different formats in the calls to DEFINE_I440FX_MACHINE. Signed-off-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-7-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 26 +++++ hw/i386/pc_piix.c | 219 +++++++++++++++++++------------------------ 2 files changed, 122 insertions(+), 123 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 46bc411063..027c6f29f7 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -317,4 +317,30 @@ extern const size_t pc_compat_2_3_len; } \ type_init(pc_machine_init_##suffix) +#define DEFINE_PC_VER_MACHINE(namesym, namestr, initfn, ...) \ + static void MACHINE_VER_SYM(init, namesym, __VA_ARGS__)( \ + MachineState *machine) \ + { \ + initfn(machine); \ + } \ + static void MACHINE_VER_SYM(class_init, namesym, __VA_ARGS__)( \ + ObjectClass *oc, \ + void *data) \ + { \ + MachineClass *mc = MACHINE_CLASS(oc); \ + MACHINE_VER_SYM(options, namesym, __VA_ARGS__)(mc); \ + mc->init = MACHINE_VER_SYM(init, namesym, __VA_ARGS__); \ + } \ + static const TypeInfo MACHINE_VER_SYM(info, namesym, __VA_ARGS__) = \ + { \ + .name = MACHINE_VER_TYPE_NAME(namestr, __VA_ARGS__), \ + .parent = TYPE_PC_MACHINE, \ + .class_init = MACHINE_VER_SYM(class_init, namesym, __VA_ARGS__), \ + }; \ + static void MACHINE_VER_SYM(register, namesym, __VA_ARGS__)(void) \ + { \ + type_register(&MACHINE_VER_SYM(info, namesym, __VA_ARGS__)); \ + } \ + type_init(MACHINE_VER_SYM(register, namesym, __VA_ARGS__)); + #endif diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e4930b7f48..5705d6e155 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -445,12 +445,13 @@ static void pc_xen_hvm_init(MachineState *machine) } #endif -#define DEFINE_I440FX_MACHINE(suffix, name, optionfn) \ - static void pc_init_##suffix(MachineState *machine) \ - { \ - pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \ - } \ - DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn) +static void pc_i440fx_init(MachineState *machine) +{ + pc_init1(machine, TYPE_I440FX_PCI_DEVICE); +} + +#define DEFINE_I440FX_MACHINE(major, minor) \ + DEFINE_PC_VER_MACHINE(pc_i440fx, "pc-i440fx", pc_i440fx_init, major, minor); static void pc_i440fx_machine_options(MachineClass *m) { @@ -478,21 +479,20 @@ static void pc_i440fx_machine_options(MachineClass *m) "Use a different south bridge than PIIX3"); } -static void pc_i440fx_9_1_machine_options(MachineClass *m) +static void pc_i440fx_machine_9_1_options(MachineClass *m) { pc_i440fx_machine_options(m); m->alias = "pc"; m->is_default = true; } -DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", - pc_i440fx_9_1_machine_options); +DEFINE_I440FX_MACHINE(9, 1); -static void pc_i440fx_9_0_machine_options(MachineClass *m) +static void pc_i440fx_machine_9_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_9_1_machine_options(m); + pc_i440fx_machine_9_1_options(m); m->alias = NULL; m->is_default = false; @@ -501,14 +501,13 @@ static void pc_i440fx_9_0_machine_options(MachineClass *m) pcmc->isa_bios_alias = false; } -DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", - pc_i440fx_9_0_machine_options); +DEFINE_I440FX_MACHINE(9, 0); -static void pc_i440fx_8_2_machine_options(MachineClass *m) +static void pc_i440fx_machine_8_2_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_9_0_machine_options(m); + pc_i440fx_machine_9_0_options(m); compat_props_add(m->compat_props, hw_compat_8_2, hw_compat_8_2_len); compat_props_add(m->compat_props, pc_compat_8_2, pc_compat_8_2_len); @@ -516,28 +515,26 @@ static void pc_i440fx_8_2_machine_options(MachineClass *m) pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64; } -DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2", - pc_i440fx_8_2_machine_options); +DEFINE_I440FX_MACHINE(8, 2); -static void pc_i440fx_8_1_machine_options(MachineClass *m) +static void pc_i440fx_machine_8_1_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_8_2_machine_options(m); + pc_i440fx_machine_8_2_options(m); pcmc->broken_32bit_mem_addr_check = true; compat_props_add(m->compat_props, hw_compat_8_1, hw_compat_8_1_len); compat_props_add(m->compat_props, pc_compat_8_1, pc_compat_8_1_len); } -DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", - pc_i440fx_8_1_machine_options); +DEFINE_I440FX_MACHINE(8, 1); -static void pc_i440fx_8_0_machine_options(MachineClass *m) +static void pc_i440fx_machine_8_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_8_1_machine_options(m); + pc_i440fx_machine_8_1_options(m); compat_props_add(m->compat_props, hw_compat_8_0, hw_compat_8_0_len); compat_props_add(m->compat_props, pc_compat_8_0, pc_compat_8_0_len); @@ -545,268 +542,244 @@ static void pc_i440fx_8_0_machine_options(MachineClass *m) pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; } -DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", - pc_i440fx_8_0_machine_options); +DEFINE_I440FX_MACHINE(8, 0); -static void pc_i440fx_7_2_machine_options(MachineClass *m) +static void pc_i440fx_machine_7_2_options(MachineClass *m) { - pc_i440fx_8_0_machine_options(m); + pc_i440fx_machine_8_0_options(m); compat_props_add(m->compat_props, hw_compat_7_2, hw_compat_7_2_len); compat_props_add(m->compat_props, pc_compat_7_2, pc_compat_7_2_len); } -DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2", - pc_i440fx_7_2_machine_options); +DEFINE_I440FX_MACHINE(7, 2) -static void pc_i440fx_7_1_machine_options(MachineClass *m) +static void pc_i440fx_machine_7_1_options(MachineClass *m) { - pc_i440fx_7_2_machine_options(m); + pc_i440fx_machine_7_2_options(m); compat_props_add(m->compat_props, hw_compat_7_1, hw_compat_7_1_len); compat_props_add(m->compat_props, pc_compat_7_1, pc_compat_7_1_len); } -DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", - pc_i440fx_7_1_machine_options); +DEFINE_I440FX_MACHINE(7, 1); -static void pc_i440fx_7_0_machine_options(MachineClass *m) +static void pc_i440fx_machine_7_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_7_1_machine_options(m); + pc_i440fx_machine_7_1_options(m); pcmc->enforce_amd_1tb_hole = false; compat_props_add(m->compat_props, hw_compat_7_0, hw_compat_7_0_len); compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); } -DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", - pc_i440fx_7_0_machine_options); +DEFINE_I440FX_MACHINE(7, 0); -static void pc_i440fx_6_2_machine_options(MachineClass *m) +static void pc_i440fx_machine_6_2_options(MachineClass *m) { - pc_i440fx_7_0_machine_options(m); + pc_i440fx_machine_7_0_options(m); compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len); compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } -DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", - pc_i440fx_6_2_machine_options); +DEFINE_I440FX_MACHINE(6, 2); -static void pc_i440fx_6_1_machine_options(MachineClass *m) +static void pc_i440fx_machine_6_1_options(MachineClass *m) { - pc_i440fx_6_2_machine_options(m); + pc_i440fx_machine_6_2_options(m); compat_props_add(m->compat_props, hw_compat_6_1, hw_compat_6_1_len); compat_props_add(m->compat_props, pc_compat_6_1, pc_compat_6_1_len); m->smp_props.prefer_sockets = true; } -DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", - pc_i440fx_6_1_machine_options); +DEFINE_I440FX_MACHINE(6, 1); -static void pc_i440fx_6_0_machine_options(MachineClass *m) +static void pc_i440fx_machine_6_0_options(MachineClass *m) { - pc_i440fx_6_1_machine_options(m); + pc_i440fx_machine_6_1_options(m); compat_props_add(m->compat_props, hw_compat_6_0, hw_compat_6_0_len); compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len); } -DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", - pc_i440fx_6_0_machine_options); +DEFINE_I440FX_MACHINE(6, 0); -static void pc_i440fx_5_2_machine_options(MachineClass *m) +static void pc_i440fx_machine_5_2_options(MachineClass *m) { - pc_i440fx_6_0_machine_options(m); + pc_i440fx_machine_6_0_options(m); compat_props_add(m->compat_props, hw_compat_5_2, hw_compat_5_2_len); compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len); } -DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2", - pc_i440fx_5_2_machine_options); +DEFINE_I440FX_MACHINE(5, 2); -static void pc_i440fx_5_1_machine_options(MachineClass *m) +static void pc_i440fx_machine_5_1_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_5_2_machine_options(m); + pc_i440fx_machine_5_2_options(m); compat_props_add(m->compat_props, hw_compat_5_1, hw_compat_5_1_len); compat_props_add(m->compat_props, pc_compat_5_1, pc_compat_5_1_len); pcmc->kvmclock_create_always = false; pcmc->pci_root_uid = 1; } -DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", - pc_i440fx_5_1_machine_options); +DEFINE_I440FX_MACHINE(5, 1); -static void pc_i440fx_5_0_machine_options(MachineClass *m) +static void pc_i440fx_machine_5_0_options(MachineClass *m) { - pc_i440fx_5_1_machine_options(m); + pc_i440fx_machine_5_1_options(m); m->numa_mem_supported = true; compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len); compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len); m->auto_enable_numa_with_memdev = false; } -DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", - pc_i440fx_5_0_machine_options); +DEFINE_I440FX_MACHINE(5, 0); -static void pc_i440fx_4_2_machine_options(MachineClass *m) +static void pc_i440fx_machine_4_2_options(MachineClass *m) { - pc_i440fx_5_0_machine_options(m); + pc_i440fx_machine_5_0_options(m); compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len); } -DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", - pc_i440fx_4_2_machine_options); +DEFINE_I440FX_MACHINE(4, 2); -static void pc_i440fx_4_1_machine_options(MachineClass *m) +static void pc_i440fx_machine_4_1_options(MachineClass *m) { - pc_i440fx_4_2_machine_options(m); + pc_i440fx_machine_4_2_options(m); compat_props_add(m->compat_props, hw_compat_4_1, hw_compat_4_1_len); compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len); } -DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", - pc_i440fx_4_1_machine_options); +DEFINE_I440FX_MACHINE(4, 1); -static void pc_i440fx_4_0_machine_options(MachineClass *m) +static void pc_i440fx_machine_4_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_4_1_machine_options(m); + pc_i440fx_machine_4_1_options(m); pcmc->default_cpu_version = CPU_VERSION_LEGACY; compat_props_add(m->compat_props, hw_compat_4_0, hw_compat_4_0_len); compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len); } -DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", - pc_i440fx_4_0_machine_options); +DEFINE_I440FX_MACHINE(4, 0); -static void pc_i440fx_3_1_machine_options(MachineClass *m) +static void pc_i440fx_machine_3_1_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_4_0_machine_options(m); + pc_i440fx_machine_4_0_options(m); m->smbus_no_migration_support = true; pcmc->pvh_enabled = false; compat_props_add(m->compat_props, hw_compat_3_1, hw_compat_3_1_len); compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len); } -DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", - pc_i440fx_3_1_machine_options); +DEFINE_I440FX_MACHINE(3, 1); -static void pc_i440fx_3_0_machine_options(MachineClass *m) +static void pc_i440fx_machine_3_0_options(MachineClass *m) { - pc_i440fx_3_1_machine_options(m); + pc_i440fx_machine_3_1_options(m); compat_props_add(m->compat_props, hw_compat_3_0, hw_compat_3_0_len); compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len); } -DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", - pc_i440fx_3_0_machine_options); +DEFINE_I440FX_MACHINE(3, 0); -static void pc_i440fx_2_12_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_12_options(MachineClass *m) { - pc_i440fx_3_0_machine_options(m); + pc_i440fx_machine_3_0_options(m); m->deprecation_reason = "old and unattended - use a newer version instead"; compat_props_add(m->compat_props, hw_compat_2_12, hw_compat_2_12_len); compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } -DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", - pc_i440fx_2_12_machine_options); +DEFINE_I440FX_MACHINE(2, 12); -static void pc_i440fx_2_11_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_11_options(MachineClass *m) { - pc_i440fx_2_12_machine_options(m); + pc_i440fx_machine_2_12_options(m); compat_props_add(m->compat_props, hw_compat_2_11, hw_compat_2_11_len); compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len); } -DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", - pc_i440fx_2_11_machine_options); +DEFINE_I440FX_MACHINE(2, 11); -static void pc_i440fx_2_10_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_10_options(MachineClass *m) { - pc_i440fx_2_11_machine_options(m); + pc_i440fx_machine_2_11_options(m); compat_props_add(m->compat_props, hw_compat_2_10, hw_compat_2_10_len); compat_props_add(m->compat_props, pc_compat_2_10, pc_compat_2_10_len); m->auto_enable_numa_with_memhp = false; } -DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10", - pc_i440fx_2_10_machine_options); +DEFINE_I440FX_MACHINE(2, 10); -static void pc_i440fx_2_9_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_9_options(MachineClass *m) { - pc_i440fx_2_10_machine_options(m); + pc_i440fx_machine_2_10_options(m); compat_props_add(m->compat_props, hw_compat_2_9, hw_compat_2_9_len); compat_props_add(m->compat_props, pc_compat_2_9, pc_compat_2_9_len); } -DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", - pc_i440fx_2_9_machine_options); +DEFINE_I440FX_MACHINE(2, 9); -static void pc_i440fx_2_8_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_8_options(MachineClass *m) { - pc_i440fx_2_9_machine_options(m); + pc_i440fx_machine_2_9_options(m); compat_props_add(m->compat_props, hw_compat_2_8, hw_compat_2_8_len); compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len); } -DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", - pc_i440fx_2_8_machine_options); +DEFINE_I440FX_MACHINE(2, 8); -static void pc_i440fx_2_7_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_7_options(MachineClass *m) { - pc_i440fx_2_8_machine_options(m); + pc_i440fx_machine_2_8_options(m); compat_props_add(m->compat_props, hw_compat_2_7, hw_compat_2_7_len); compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len); } -DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", - pc_i440fx_2_7_machine_options); +DEFINE_I440FX_MACHINE(2, 7); -static void pc_i440fx_2_6_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_6_options(MachineClass *m) { X86MachineClass *x86mc = X86_MACHINE_CLASS(m); PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_2_7_machine_options(m); + pc_i440fx_machine_2_7_options(m); pcmc->legacy_cpu_hotplug = true; x86mc->fwcfg_dma_enabled = false; compat_props_add(m->compat_props, hw_compat_2_6, hw_compat_2_6_len); compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len); } -DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", - pc_i440fx_2_6_machine_options); +DEFINE_I440FX_MACHINE(2, 6); -static void pc_i440fx_2_5_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_5_options(MachineClass *m) { X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - pc_i440fx_2_6_machine_options(m); + pc_i440fx_machine_2_6_options(m); x86mc->save_tsc_khz = false; m->legacy_fw_cfg_order = 1; compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len); compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); } -DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", - pc_i440fx_2_5_machine_options); +DEFINE_I440FX_MACHINE(2, 5); -static void pc_i440fx_2_4_machine_options(MachineClass *m) +static void pc_i440fx_machine_2_4_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_i440fx_2_5_machine_options(m); + pc_i440fx_machine_2_5_options(m); m->hw_version = "2.4.0"; pcmc->broken_reserved_end = true; compat_props_add(m->compat_props, hw_compat_2_4, hw_compat_2_4_len); compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); } -DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", - pc_i440fx_2_4_machine_options) +DEFINE_I440FX_MACHINE(2, 4); #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) @@ -833,20 +806,20 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, #endif #ifdef CONFIG_XEN -static void xenfv_4_2_machine_options(MachineClass *m) +static void xenfv_machine_4_2_options(MachineClass *m) { - pc_i440fx_4_2_machine_options(m); + pc_i440fx_machine_4_2_options(m); m->desc = "Xen Fully-virtualized PC"; m->max_cpus = HVM_MAX_VCPUS; m->default_machine_opts = "accel=xen,suppress-vmdesc=on"; } DEFINE_PC_MACHINE(xenfv_4_2, "xenfv-4.2", pc_xen_hvm_init, - xenfv_4_2_machine_options); + xenfv_machine_4_2_options); -static void xenfv_3_1_machine_options(MachineClass *m) +static void xenfv_machine_3_1_options(MachineClass *m) { - pc_i440fx_3_1_machine_options(m); + pc_i440fx_machine_3_1_options(m); m->desc = "Xen Fully-virtualized PC"; m->alias = "xenfv"; m->max_cpus = HVM_MAX_VCPUS; @@ -854,5 +827,5 @@ static void xenfv_3_1_machine_options(MachineClass *m) } DEFINE_PC_MACHINE(xenfv, "xenfv-3.1", pc_xen_hvm_init, - xenfv_3_1_machine_options); + xenfv_machine_3_1_options); #endif From patchwork Tue Jul 2 05:00:58 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: 809028 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43843wru; Mon, 1 Jul 2024 22:02:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW/CAmJg/EYAXOcPbOQrZlKHvgkJO3M82ebz40RNcmFmLell/7Mng5LIDp/onfDn078xAqNXqa+MOAhb0Wxg/9R X-Google-Smtp-Source: AGHT+IHvc0Ul+YHULlVRRW/L3OXM5Jo/RSLduo/AmQQ/aQ+c/zC9eGSWrahPhyMlC56ldlJ+ub2R X-Received: by 2002:a05:6808:10d4:b0:3d8:498f:3cee with SMTP id 5614622812f47-3d8498ff166mr1019060b6e.58.1719896563949; Mon, 01 Jul 2024 22:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896563; cv=none; d=google.com; s=arc-20160816; b=MnXAiFYY8S9VRLBF+EvlEN+R7JP3obqtDQrOuaiIqxXJ85PFy/0jN3EHPAk20PdK0Q HnfcYlZn32mmn6Th/49o6vdFDiJ/SG47TlV/bbpLV1+BUzVEeieQYYCZFLVvzCaqqVDS 1VzmhE0MsgwMUEnmggTxIDKPf/25dN0mr7QicWWNp/R3AnLy3fkV3Z/q0tAC8dvtaAKY k/DV9/QfI6xj0ZAErqsCbpiJxqmh7jkB/PgCY+Vd6ELMtJstdgzqisGTouWkns6O+9BM Tv/Kdzj1A3ZWB13BKXj8PvlQf3iIiySPuuFs82VI8ATBjhwyO4ttNKHO+s/56AC+W+4z hXDQ== 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=ooE/IicDwUOJQeV5BOGGNPhIl62E0AuvSR43yUD94u4=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=oVwrfD5+CTo+bCvof+4IcPu4n9TKD2S9JxBVfjmKcfh64T5rzYtMlhBjQQYY18kyuM fJkmG6hrr2AAe/OOxUeLhdcjgPf3w9nRUYU0lp8sCdgIfrrkeezX9pYNsmtFmZGd6KUb 4GL1LV2vNhdSE6YIhNJDC0f7Zk/J/Zvcu5Z1AUEvKM2OdF7hVLMPiD0Aw0EDdV+y/wTQ jBAQj+t8Ncec4d/u3tmXPy+ZzI6KqzEo8RiC9yY4Abt6Lr5+C0tVRIHy8i+8w+kEEt/K VYsrbpysz7H46vVRzAdakbW7oSdTC2njbCaGN+7o3rbCptdsgEQnxXSSjUoPDI10VYLt DXHA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eyq76TjS; 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 6a1803df08f44-6b59e617547si97583006d6.568.2024.07.01.22.02.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:43 -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=eyq76TjS; 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 1sOVee-0007L7-1L; Tue, 02 Jul 2024 01:02:12 -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 1sOVec-0007Ky-Qx for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:10 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVeZ-0007An-7C for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:10 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-36733f09305so2030982f8f.3 for ; Mon, 01 Jul 2024 22:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896524; x=1720501324; 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=ooE/IicDwUOJQeV5BOGGNPhIl62E0AuvSR43yUD94u4=; b=eyq76TjSfzHDEJpnkvDgeCpF6bz/oUz7J7swcXmujcXj7EaAQyfSw33DIGN3z55W4X e4VcaNGUzL27kX/BzOOgQ3nZGGbvN40vpItYehp6j81tN31WBTyJzTctVu79P72df5oG PWhrlmzjKS5r9S8DEDUAKkYx8B4Y6hxYM9aC7ktooJ6mbOnLFx5RxUa9XBzebjOI5wS4 7SmHR0TJ+QB2Rroj+imPrIDeq0DKrcxXULOiMJJ2GJWL2+Yq0pggwWoLXzVmqxrO2W9z 7BM7Zj294pyVvYQNqrSPF8U+y74U/JYeV2QLXaWaIBSUEs0hjKOukLtejWnvfl/Z2yck iVJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896524; x=1720501324; 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=ooE/IicDwUOJQeV5BOGGNPhIl62E0AuvSR43yUD94u4=; b=X53MXFr97U0zKIVPSFB1Iv+a4PtDt5QkcWpvizX7iU0m4ALtbBrCf+sa0GuP5scAFN QBbPq/76GF0sesX9gtExkVQV5YiIcpNmoFnXjBP8yHnp0F+b2q1ylDk9BL7vlo4/pGSn 86H9m1af9hzsOfO5iyVUu3Mkha6mWJrlXr1jk2kpUX4KyCv4RsIM05i33g74bUJk1ZCe q8uLOVLXq1z1ycuadnZZVYP6sQoMn9rtiuInjGaFAtYh/7Scf+XSdSaNyI75vTyzCZkC Wv4QZ00pUdVRFCOkb37c8oEI/IUVK1zFMEZGsRMXwu+OSzA/nrw5l7+yTq1kgq9QFlan zoEg== X-Gm-Message-State: AOJu0YxDE1p2dVMXyzgGE82Rk2c2C/nFHNz0jwJYRoKNeTXNAI9vCsjD NcI66d3x1WyXSt1OzC0LFQcm9PnLbCTO3Hkk8IypuQLfbZUEMhQPTNAZAQrR3yqdPZUAIpEipWV q X-Received: by 2002:a5d:464c:0:b0:366:e8cf:ef6d with SMTP id ffacd0b85a97d-3677571b792mr5814019f8f.55.1719896524464; Mon, 01 Jul 2024 22:02:04 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0d9cbasm11977844f8f.38.2024.07.01.22.02.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:04 -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 08/22] hw/i386: convert 'q35' machine definitions to use new macros Date: Tue, 2 Jul 2024 07:00:58 +0200 Message-ID: <20240702050112.35907-9-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::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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é This changes the DEFINE_Q35_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number thrice in three different formats in the calls to DEFINE_Q35_MACHINE. Due to the odd-ball '4.0.1' machine type version, this commit introduces a DEFINE_Q35_BUGFIX helper, to allow defining of "bugfix" machine types which have a three digit version. Signed-off-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-8-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 215 ++++++++++++++++++++--------------------------- 1 file changed, 90 insertions(+), 125 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index bd7db4abac..71d3c6d122 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -331,17 +331,11 @@ static void pc_q35_init(MachineState *machine) } } -#define DEFINE_Q35_MACHINE(suffix, name, compatfn, optionfn) \ - static void pc_init_##suffix(MachineState *machine) \ - { \ - void (*compat)(MachineState *m) = (compatfn); \ - if (compat) { \ - compat(machine); \ - } \ - pc_q35_init(machine); \ - } \ - DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn) +#define DEFINE_Q35_MACHINE(major, minor) \ + DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, major, minor); +#define DEFINE_Q35_MACHINE_BUGFIX(major, minor, micro) \ + DEFINE_PC_VER_MACHINE(pc_q35, "pc-q35", pc_q35_init, major, minor, micro); static void pc_q35_machine_options(MachineClass *m) { @@ -367,32 +361,30 @@ static void pc_q35_machine_options(MachineClass *m) pc_q35_compat_defaults, pc_q35_compat_defaults_len); } -static void pc_q35_9_1_machine_options(MachineClass *m) +static void pc_q35_machine_9_1_options(MachineClass *m) { pc_q35_machine_options(m); m->alias = "q35"; } -DEFINE_Q35_MACHINE(v9_1, "pc-q35-9.1", NULL, - pc_q35_9_1_machine_options); +DEFINE_Q35_MACHINE(9, 1); -static void pc_q35_9_0_machine_options(MachineClass *m) +static void pc_q35_machine_9_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_9_1_machine_options(m); + pc_q35_machine_9_1_options(m); m->alias = NULL; compat_props_add(m->compat_props, hw_compat_9_0, hw_compat_9_0_len); compat_props_add(m->compat_props, pc_compat_9_0, pc_compat_9_0_len); pcmc->isa_bios_alias = false; } -DEFINE_Q35_MACHINE(v9_0, "pc-q35-9.0", NULL, - pc_q35_9_0_machine_options); +DEFINE_Q35_MACHINE(9, 0); -static void pc_q35_8_2_machine_options(MachineClass *m) +static void pc_q35_machine_8_2_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_9_0_machine_options(m); + pc_q35_machine_9_0_options(m); m->max_cpus = 1024; compat_props_add(m->compat_props, hw_compat_8_2, hw_compat_8_2_len); compat_props_add(m->compat_props, pc_compat_8_2, pc_compat_8_2_len); @@ -400,26 +392,24 @@ static void pc_q35_8_2_machine_options(MachineClass *m) pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64; } -DEFINE_Q35_MACHINE(v8_2, "pc-q35-8.2", NULL, - pc_q35_8_2_machine_options); +DEFINE_Q35_MACHINE(8, 2); -static void pc_q35_8_1_machine_options(MachineClass *m) +static void pc_q35_machine_8_1_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_8_2_machine_options(m); + pc_q35_machine_8_2_options(m); pcmc->broken_32bit_mem_addr_check = true; compat_props_add(m->compat_props, hw_compat_8_1, hw_compat_8_1_len); compat_props_add(m->compat_props, pc_compat_8_1, pc_compat_8_1_len); } -DEFINE_Q35_MACHINE(v8_1, "pc-q35-8.1", NULL, - pc_q35_8_1_machine_options); +DEFINE_Q35_MACHINE(8, 1); -static void pc_q35_8_0_machine_options(MachineClass *m) +static void pc_q35_machine_8_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_8_1_machine_options(m); + pc_q35_machine_8_1_options(m); compat_props_add(m->compat_props, hw_compat_8_0, hw_compat_8_0_len); compat_props_add(m->compat_props, pc_compat_8_0, pc_compat_8_0_len); @@ -428,132 +418,120 @@ static void pc_q35_8_0_machine_options(MachineClass *m) m->max_cpus = 288; } -DEFINE_Q35_MACHINE(v8_0, "pc-q35-8.0", NULL, - pc_q35_8_0_machine_options); +DEFINE_Q35_MACHINE(8, 0); -static void pc_q35_7_2_machine_options(MachineClass *m) +static void pc_q35_machine_7_2_options(MachineClass *m) { - pc_q35_8_0_machine_options(m); + pc_q35_machine_8_0_options(m); compat_props_add(m->compat_props, hw_compat_7_2, hw_compat_7_2_len); compat_props_add(m->compat_props, pc_compat_7_2, pc_compat_7_2_len); } -DEFINE_Q35_MACHINE(v7_2, "pc-q35-7.2", NULL, - pc_q35_7_2_machine_options); +DEFINE_Q35_MACHINE(7, 2); -static void pc_q35_7_1_machine_options(MachineClass *m) +static void pc_q35_machine_7_1_options(MachineClass *m) { - pc_q35_7_2_machine_options(m); + pc_q35_machine_7_2_options(m); compat_props_add(m->compat_props, hw_compat_7_1, hw_compat_7_1_len); compat_props_add(m->compat_props, pc_compat_7_1, pc_compat_7_1_len); } -DEFINE_Q35_MACHINE(v7_1, "pc-q35-7.1", NULL, - pc_q35_7_1_machine_options); +DEFINE_Q35_MACHINE(7, 1); -static void pc_q35_7_0_machine_options(MachineClass *m) +static void pc_q35_machine_7_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_7_1_machine_options(m); + pc_q35_machine_7_1_options(m); pcmc->enforce_amd_1tb_hole = false; compat_props_add(m->compat_props, hw_compat_7_0, hw_compat_7_0_len); compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); } -DEFINE_Q35_MACHINE(v7_0, "pc-q35-7.0", NULL, - pc_q35_7_0_machine_options); +DEFINE_Q35_MACHINE(7, 0); -static void pc_q35_6_2_machine_options(MachineClass *m) +static void pc_q35_machine_6_2_options(MachineClass *m) { - pc_q35_7_0_machine_options(m); + pc_q35_machine_7_0_options(m); compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len); compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } -DEFINE_Q35_MACHINE(v6_2, "pc-q35-6.2", NULL, - pc_q35_6_2_machine_options); +DEFINE_Q35_MACHINE(6, 2); -static void pc_q35_6_1_machine_options(MachineClass *m) +static void pc_q35_machine_6_1_options(MachineClass *m) { - pc_q35_6_2_machine_options(m); + pc_q35_machine_6_2_options(m); compat_props_add(m->compat_props, hw_compat_6_1, hw_compat_6_1_len); compat_props_add(m->compat_props, pc_compat_6_1, pc_compat_6_1_len); m->smp_props.prefer_sockets = true; } -DEFINE_Q35_MACHINE(v6_1, "pc-q35-6.1", NULL, - pc_q35_6_1_machine_options); +DEFINE_Q35_MACHINE(6, 1); -static void pc_q35_6_0_machine_options(MachineClass *m) +static void pc_q35_machine_6_0_options(MachineClass *m) { - pc_q35_6_1_machine_options(m); + pc_q35_machine_6_1_options(m); compat_props_add(m->compat_props, hw_compat_6_0, hw_compat_6_0_len); compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len); } -DEFINE_Q35_MACHINE(v6_0, "pc-q35-6.0", NULL, - pc_q35_6_0_machine_options); +DEFINE_Q35_MACHINE(6, 0); -static void pc_q35_5_2_machine_options(MachineClass *m) +static void pc_q35_machine_5_2_options(MachineClass *m) { - pc_q35_6_0_machine_options(m); + pc_q35_machine_6_0_options(m); compat_props_add(m->compat_props, hw_compat_5_2, hw_compat_5_2_len); compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len); } -DEFINE_Q35_MACHINE(v5_2, "pc-q35-5.2", NULL, - pc_q35_5_2_machine_options); +DEFINE_Q35_MACHINE(5, 2); -static void pc_q35_5_1_machine_options(MachineClass *m) +static void pc_q35_machine_5_1_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_5_2_machine_options(m); + pc_q35_machine_5_2_options(m); compat_props_add(m->compat_props, hw_compat_5_1, hw_compat_5_1_len); compat_props_add(m->compat_props, pc_compat_5_1, pc_compat_5_1_len); pcmc->kvmclock_create_always = false; pcmc->pci_root_uid = 1; } -DEFINE_Q35_MACHINE(v5_1, "pc-q35-5.1", NULL, - pc_q35_5_1_machine_options); +DEFINE_Q35_MACHINE(5, 1); -static void pc_q35_5_0_machine_options(MachineClass *m) +static void pc_q35_machine_5_0_options(MachineClass *m) { - pc_q35_5_1_machine_options(m); + pc_q35_machine_5_1_options(m); m->numa_mem_supported = true; compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len); compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len); m->auto_enable_numa_with_memdev = false; } -DEFINE_Q35_MACHINE(v5_0, "pc-q35-5.0", NULL, - pc_q35_5_0_machine_options); +DEFINE_Q35_MACHINE(5, 0); -static void pc_q35_4_2_machine_options(MachineClass *m) +static void pc_q35_machine_4_2_options(MachineClass *m) { - pc_q35_5_0_machine_options(m); + pc_q35_machine_5_0_options(m); compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len); } -DEFINE_Q35_MACHINE(v4_2, "pc-q35-4.2", NULL, - pc_q35_4_2_machine_options); +DEFINE_Q35_MACHINE(4, 2); -static void pc_q35_4_1_machine_options(MachineClass *m) +static void pc_q35_machine_4_1_options(MachineClass *m) { - pc_q35_4_2_machine_options(m); + pc_q35_machine_4_2_options(m); compat_props_add(m->compat_props, hw_compat_4_1, hw_compat_4_1_len); compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len); } -DEFINE_Q35_MACHINE(v4_1, "pc-q35-4.1", NULL, - pc_q35_4_1_machine_options); +DEFINE_Q35_MACHINE(4, 1); -static void pc_q35_4_0_1_machine_options(MachineClass *m) +static void pc_q35_machine_4_0_1_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_4_1_machine_options(m); + pc_q35_machine_4_1_options(m); pcmc->default_cpu_version = CPU_VERSION_LEGACY; /* * This is the default machine for the 4.0-stable branch. It is basically @@ -564,24 +542,22 @@ static void pc_q35_4_0_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len); } -DEFINE_Q35_MACHINE(v4_0_1, "pc-q35-4.0.1", NULL, - pc_q35_4_0_1_machine_options); +DEFINE_Q35_MACHINE_BUGFIX(4, 0, 1); -static void pc_q35_4_0_machine_options(MachineClass *m) +static void pc_q35_machine_4_0_options(MachineClass *m) { - pc_q35_4_0_1_machine_options(m); + pc_q35_machine_4_0_1_options(m); m->default_kernel_irqchip_split = true; /* Compat props are applied by the 4.0.1 machine */ } -DEFINE_Q35_MACHINE(v4_0, "pc-q35-4.0", NULL, - pc_q35_4_0_machine_options); +DEFINE_Q35_MACHINE(4, 0); -static void pc_q35_3_1_machine_options(MachineClass *m) +static void pc_q35_machine_3_1_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_4_0_machine_options(m); + pc_q35_machine_4_0_options(m); m->default_kernel_irqchip_split = false; m->smbus_no_migration_support = true; pcmc->pvh_enabled = false; @@ -589,121 +565,110 @@ static void pc_q35_3_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len); } -DEFINE_Q35_MACHINE(v3_1, "pc-q35-3.1", NULL, - pc_q35_3_1_machine_options); +DEFINE_Q35_MACHINE(3, 1); -static void pc_q35_3_0_machine_options(MachineClass *m) +static void pc_q35_machine_3_0_options(MachineClass *m) { - pc_q35_3_1_machine_options(m); + pc_q35_machine_3_1_options(m); compat_props_add(m->compat_props, hw_compat_3_0, hw_compat_3_0_len); compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len); } -DEFINE_Q35_MACHINE(v3_0, "pc-q35-3.0", NULL, - pc_q35_3_0_machine_options); +DEFINE_Q35_MACHINE(3, 0); -static void pc_q35_2_12_machine_options(MachineClass *m) +static void pc_q35_machine_2_12_options(MachineClass *m) { - pc_q35_3_0_machine_options(m); + pc_q35_machine_3_0_options(m); compat_props_add(m->compat_props, hw_compat_2_12, hw_compat_2_12_len); compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } -DEFINE_Q35_MACHINE(v2_12, "pc-q35-2.12", NULL, - pc_q35_2_12_machine_options); +DEFINE_Q35_MACHINE(2, 12); -static void pc_q35_2_11_machine_options(MachineClass *m) +static void pc_q35_machine_2_11_options(MachineClass *m) { - pc_q35_2_12_machine_options(m); + pc_q35_machine_2_12_options(m); m->default_nic = "e1000"; compat_props_add(m->compat_props, hw_compat_2_11, hw_compat_2_11_len); compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len); } -DEFINE_Q35_MACHINE(v2_11, "pc-q35-2.11", NULL, - pc_q35_2_11_machine_options); +DEFINE_Q35_MACHINE(2, 11); -static void pc_q35_2_10_machine_options(MachineClass *m) +static void pc_q35_machine_2_10_options(MachineClass *m) { - pc_q35_2_11_machine_options(m); + pc_q35_machine_2_11_options(m); compat_props_add(m->compat_props, hw_compat_2_10, hw_compat_2_10_len); compat_props_add(m->compat_props, pc_compat_2_10, pc_compat_2_10_len); m->auto_enable_numa_with_memhp = false; } -DEFINE_Q35_MACHINE(v2_10, "pc-q35-2.10", NULL, - pc_q35_2_10_machine_options); +DEFINE_Q35_MACHINE(2, 10); -static void pc_q35_2_9_machine_options(MachineClass *m) +static void pc_q35_machine_2_9_options(MachineClass *m) { - pc_q35_2_10_machine_options(m); + pc_q35_machine_2_10_options(m); compat_props_add(m->compat_props, hw_compat_2_9, hw_compat_2_9_len); compat_props_add(m->compat_props, pc_compat_2_9, pc_compat_2_9_len); } -DEFINE_Q35_MACHINE(v2_9, "pc-q35-2.9", NULL, - pc_q35_2_9_machine_options); +DEFINE_Q35_MACHINE(2, 9); -static void pc_q35_2_8_machine_options(MachineClass *m) +static void pc_q35_machine_2_8_options(MachineClass *m) { - pc_q35_2_9_machine_options(m); + pc_q35_machine_2_9_options(m); compat_props_add(m->compat_props, hw_compat_2_8, hw_compat_2_8_len); compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len); } -DEFINE_Q35_MACHINE(v2_8, "pc-q35-2.8", NULL, - pc_q35_2_8_machine_options); +DEFINE_Q35_MACHINE(2, 8); -static void pc_q35_2_7_machine_options(MachineClass *m) +static void pc_q35_machine_2_7_options(MachineClass *m) { - pc_q35_2_8_machine_options(m); + pc_q35_machine_2_8_options(m); m->max_cpus = 255; compat_props_add(m->compat_props, hw_compat_2_7, hw_compat_2_7_len); compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len); } -DEFINE_Q35_MACHINE(v2_7, "pc-q35-2.7", NULL, - pc_q35_2_7_machine_options); +DEFINE_Q35_MACHINE(2, 7); -static void pc_q35_2_6_machine_options(MachineClass *m) +static void pc_q35_machine_2_6_options(MachineClass *m) { X86MachineClass *x86mc = X86_MACHINE_CLASS(m); PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_2_7_machine_options(m); + pc_q35_machine_2_7_options(m); pcmc->legacy_cpu_hotplug = true; x86mc->fwcfg_dma_enabled = false; compat_props_add(m->compat_props, hw_compat_2_6, hw_compat_2_6_len); compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len); } -DEFINE_Q35_MACHINE(v2_6, "pc-q35-2.6", NULL, - pc_q35_2_6_machine_options); +DEFINE_Q35_MACHINE(2, 6); -static void pc_q35_2_5_machine_options(MachineClass *m) +static void pc_q35_machine_2_5_options(MachineClass *m) { X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - pc_q35_2_6_machine_options(m); + pc_q35_machine_2_6_options(m); x86mc->save_tsc_khz = false; m->legacy_fw_cfg_order = 1; compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len); compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); } -DEFINE_Q35_MACHINE(v2_5, "pc-q35-2.5", NULL, - pc_q35_2_5_machine_options); +DEFINE_Q35_MACHINE(2, 5); -static void pc_q35_2_4_machine_options(MachineClass *m) +static void pc_q35_machine_2_4_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_2_5_machine_options(m); + pc_q35_machine_2_5_options(m); m->hw_version = "2.4.0"; pcmc->broken_reserved_end = true; compat_props_add(m->compat_props, hw_compat_2_4, hw_compat_2_4_len); compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); } -DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL, - pc_q35_2_4_machine_options); +DEFINE_Q35_MACHINE(2, 4); From patchwork Tue Jul 2 05:00:59 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: 809027 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43817wru; Mon, 1 Jul 2024 22:02:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWsxHj4d96ycAUdTuakbFtgDDkMTWU3XS3VWAYsLgYhGOclwwJ2FLqq2rEqQhrpv9Jru1pyJQts3cWKwrYNIcnG X-Google-Smtp-Source: AGHT+IF2/PCRO+6UsXBp74F+f9kgj6Ua12vH1GhNe80refWPht6pJC1iZwH75pdLwsvWNmbg9Eks X-Received: by 2002:a05:690c:28f:b0:64b:2701:e13e with SMTP id 00721157ae682-64c7350e260mr95810417b3.43.1719896559382; Mon, 01 Jul 2024 22:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896559; cv=none; d=google.com; s=arc-20160816; b=PaL8tfFXxcqRFmSePZXm1TMlOIMJcaS//uo/YftGbf3Usrmn/awmPSxrXWEMXHvMyR KN1/OvWUrQL4tv6hVjfLbeVh9p1lpvVRNmsu6dz0qAJZOsg1q8U2ljgSq3uUOiL7rEDX /hOcQfjL4YtxXkzeDTl6g6gZZx+IzraOLykMDGl5dowzKbChlVAivbrCCcSwQP4eswsq NHL2rF5H8praCMunfHijRCRtdaB2WzyNgK1Y8/ORWaSGWEIcI8W4lJ/iWo1SFz0SOWcI V24BaxGNiRQhXsrSCSH1VKrnqzEbZGxKNSLw2w0Netq+EWNErL5JWSgVHSG4w4muHnhp td7A== 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=hGQns0yzqsl3OUGwx5bDl3r7+W830Rk2Y5bSGG1iekg=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=Tdy5hj0HGZjSQUdDRLVSx3hueyWpxlVbAOpbZXALpAtAi+fpD3GtsHBioffwWRVdXw H37bUmlPVclkhkjqyFE3lNlyPF9SbePQYHLA9nNPMCRf7lt/O/mEwf8JyqGp3T4QobHW 9I/s6TmBtbCsJZJAXuiYmIVq8pB0xB2axtUytKQnFNoxNB4CxHLF509VOHdXOhZv8K5U MGUtxewkDMuTs6xhOkMpTXl4rdnDt0Rb/METCOhLnGOOC0mB8ys2nh7P09106W0DS78e hro/MiRAQZVIrLc5qjHGiOLFiTxZ+J3Wfl+Iojn6yk3dSuhRy08LvuAJwtdkA8L0H2EP M/zw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZC9GdKXb; 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 d75a77b69052e-4465b809ad1si75361501cf.712.2024.07.01.22.02.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:39 -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=ZC9GdKXb; 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 1sOVeo-0007oj-L0; Tue, 02 Jul 2024 01:02:22 -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 1sOVem-0007nU-QF for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:20 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVef-0007BS-Hm for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:20 -0400 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2ee77db6f97so1352011fa.2 for ; Mon, 01 Jul 2024 22:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896531; x=1720501331; 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=hGQns0yzqsl3OUGwx5bDl3r7+W830Rk2Y5bSGG1iekg=; b=ZC9GdKXbG1ugQYFhlxRs82lRfny7mkRcVDDDkaSjTUIgS9+FrliOaOT48Vth065fqt SKHcC4gQWjeZU4LaCOkkxN3YX0gKyrYAjfq2aBXjfgMbyMEArxjBgb+8yGdMtfV0jpHx VE2N3AEAwzUVOCGkzWsCQyzLhrW7ryz4myNCmMTI6Y12FlUG+m1jjjj53Lk+z7HtmiVF K+aqfWRDQmOEh45WaPPVYpftM1MHubpUPuBpoCwJrOyg5P/C02q/mobDV1kBCHmkJyPt 4rTlkerb5DysIg6QSKhEnysJt6tGipotzE9GPJByvTNV2xVXsMa+8cvwIU59Vc4LUnev NQog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896531; x=1720501331; 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=hGQns0yzqsl3OUGwx5bDl3r7+W830Rk2Y5bSGG1iekg=; b=ouRbJO71QWk4thHxq6h/NKTiYAzIZbSItzrVrt49C4/5hWc2cVO+dqGWS8P3r0/4cu ZTE8jk2RpJTa1by70DjTwqlOu1gLFke8SsJg0XJabFp6NeERFEAa8NrfWe2zqoM7CGc7 2wgsZcyjTNMeobzRF4V/L1NvuY8wyr8sOb+x+bfPzoKvQ4fY40PIqc5/3GB1Y6G046Cb So+bV0oSYaO+akpFkbv5HLn29DIGd6zYZxgkCWAJlsBJGji5WVXHhYkS5NTQ8KZYPMU3 eRsayraVzatTkjAcFVMLFRIIavS2w3Ev2O1yGIa/8rd3M/2hg4FMESQnDrzrtFmWkq9a E9WA== X-Gm-Message-State: AOJu0YynvD6Hl843rpF0KXIC+DPaGc/OM79r9BIht1DlhAibcg36Mizl J0nWQjDvdE9MFlxG+l3at4LncOrFRYHsOETSdWT21SA48r6XfKCwtuMQkWz6r4qZRSUSVODc13u m X-Received: by 2002:a2e:a418:0:b0:2ec:557b:f895 with SMTP id 38308e7fff4ca-2ee5e4b91cdmr61056101fa.31.1719896530395; Mon, 01 Jul 2024 22:02:10 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0cdc5csm11984562f8f.18.2024.07.01.22.02.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:09 -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 09/22] include/hw: add macros for deprecation & removal of versioned machines Date: Tue, 2 Jul 2024 07:00:59 +0200 Message-ID: <20240702050112.35907-10-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::234; envelope-from=philmd@linaro.org; helo=mail-lj1-x234.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é Versioned machines live for a long time to provide back compat for incoming migration and restore of saved images. To guide users away from usage of old machines, however, we want to deprecate any older than 3 years (equiv of 9 releases), and delete any older than 6 years (equiva of 18 releases). To get a standardized deprecation message and avoid having to remember to manually add it after three years, this introduces two macros to be used by targets when defining versioned machines. * MACHINE_VER_DEPRECATION(major, minor) Automates the task of setting the 'deprecation_reason' field on the machine, if-and-only-if the major/minor version is older than 3 years. * MACHINE_VER_DELETION(major, minor) Simulates the deletion of by skipping registration of the QOM type for a versioned machine, if-and-only-if the major/minor version is older than 6 years. By using these two macros there is no longer any manual work required per-release to deprecate old machines. By preventing the use of machines that have reached their deletion date, it is also not necessary to manually delete machines per-release. Deletion can be batched up once a year or whenever makes most sense. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-9-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 96 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index d5ad712585..187ed76646 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -429,6 +429,7 @@ struct MachineState { * MachineClass *mc = MACHINE_CLASS(oc); \ * MACHINE_VER_SYM(options, virt, __VA_ARGS__)(mc); \ * mc->desc = "QEMU " MACHINE_VER_STR(__VA_ARGS__) " Virtual Machine"; \ + * MACHINE_VER_DEPRECATION(__VA_ARGS__); \ * if (latest) { \ * mc->alias = "virt"; \ * } \ @@ -440,6 +441,7 @@ struct MachineState { * }; \ * static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ * { \ + * MACHINE_VER_DELETION(__VA_ARGS__); \ * type_register_static(&MACHINE_VER_SYM(info, virt, __VA_ARGS__)); \ * } \ * type_init(MACHINE_VER_SYM(register, virt, __VA_ARGS__)); @@ -598,6 +600,100 @@ struct MachineState { _MACHINE_VER_SYM2) (sym, prefix, __VA_ARGS__) +/* + * How many years/major releases for each phase + * of the life cycle. Assumes use of versioning + * scheme where major is bumped each year + */ +#define MACHINE_VER_DELETION_MAJOR 6 +#define MACHINE_VER_DEPRECATION_MAJOR 3 + +/* + * Expands to a static string containing a deprecation + * message for a versioned machine type + */ +#define MACHINE_VER_DEPRECATION_MSG \ + "machines more than " stringify(MACHINE_VER_DEPRECATION_MAJOR) \ + " years old are subject to deletion after " \ + stringify(MACHINE_VER_DELETION_MAJOR) " years" + +#define _MACHINE_VER_IS_EXPIRED_IMPL(cutoff, major, minor) \ + (((QEMU_VERSION_MAJOR - major) > cutoff) || \ + (((QEMU_VERSION_MAJOR - major) == cutoff) && \ + (QEMU_VERSION_MINOR - minor) >= 0)) + +#define _MACHINE_VER_IS_EXPIRED2(cutoff, major, minor) \ + _MACHINE_VER_IS_EXPIRED_IMPL(cutoff, major, minor) +#define _MACHINE_VER_IS_EXPIRED3(cutoff, major, minor, micro) \ + _MACHINE_VER_IS_EXPIRED_IMPL(cutoff, major, minor) +#define _MACHINE_VER_IS_EXPIRED4(cutoff, major, minor, _unused, tag) \ + _MACHINE_VER_IS_EXPIRED_IMPL(cutoff, major, minor) +#define _MACHINE_VER_IS_EXPIRED5(cutoff, major, minor, micro, _unused, tag) \ + _MACHINE_VER_IS_EXPIRED_IMPL(cutoff, major, minor) + +#define _MACHINE_IS_EXPIRED(cutoff, ...) \ + _MACHINE_VER_PICK(__VA_ARGS__, \ + _MACHINE_VER_IS_EXPIRED5, \ + _MACHINE_VER_IS_EXPIRED4, \ + _MACHINE_VER_IS_EXPIRED3, \ + _MACHINE_VER_IS_EXPIRED2) (cutoff, __VA_ARGS__) + +/* + * Evaluates true when a machine type with (major, minor) + * or (major, minor, micro) version should be considered + * deprecated based on the current versioned machine type + * lifecycle rules + */ +#define MACHINE_VER_IS_DEPRECATED(...) \ + _MACHINE_IS_EXPIRED(MACHINE_VER_DEPRECATION_MAJOR, __VA_ARGS__) + +/* + * Evaluates true when a machine type with (major, minor) + * or (major, minor, micro) version should be considered + * for deletion based on the current versioned machine type + * lifecycle rules + */ +#define MACHINE_VER_SHOULD_DELETE(...) \ + _MACHINE_IS_EXPIRED(MACHINE_VER_DELETION_MAJOR, __VA_ARGS__) + +/* + * Sets the deprecation reason for a versioned machine based + * on its age + * + * This must be unconditionally used in the _class_init + * function for all machine types which support versioning. + * + * Initially it will effectively be a no-op, but after a + * suitable period of time has passed, it will set the + * 'deprecation_reason' field on the machine, to warn users + * about forthcoming removal. + */ +#define MACHINE_VER_DEPRECATION(...) \ + do { \ + if (MACHINE_VER_IS_DEPRECATED(__VA_ARGS__)) { \ + mc->deprecation_reason = MACHINE_VER_DEPRECATION_MSG; \ + } \ + } while (0) + +/* + * Prevents registration of a versioned machined based on + * its age + * + * This must be unconditionally used in the register + * method for all machine types which support versioning. + * + * Inijtially it will effectively be a no-op, but after a + * suitable period of time has passed, it will cause + * execution of the method to return, avoiding registration + * of the machine + */ +#define MACHINE_VER_DELETION(...) \ + do { \ + if (MACHINE_VER_SHOULD_DELETE(__VA_ARGS__)) { \ + return; \ + } \ + } while (0) + #define DEFINE_MACHINE(namestr, machine_initfn) \ static void machine_initfn##_class_init(ObjectClass *oc, void *data) \ { \ 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) From patchwork Tue Jul 2 05:01:01 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: 809029 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43863wru; Mon, 1 Jul 2024 22:02:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJHAe+IowkQrWxfMcE/npScT3si7/Y94EMH4xxs9XhezB6uIpqZNNupqlLCrqaHXDkMDPB9pdycOH0VjkCSHK7 X-Google-Smtp-Source: AGHT+IE/PqGbNRbELZ46USggNQViVWAr2fQAIdwFEkl9Ipb+Vr9gbJItzaL77K0A39DbLp0sNVdM X-Received: by 2002:a05:6214:212c:b0:6b5:b29:82d0 with SMTP id 6a1803df08f44-6b5b715f366mr101751226d6.49.1719896566857; Mon, 01 Jul 2024 22:02:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896566; cv=none; d=google.com; s=arc-20160816; b=y0fSp4zb2rOtMEsJyHz7ZzdX5u8b3Bv4PeQYF2F/sBZXe9xkfvk9RjLZODG3qplsGa HH4YUvrBz3Ijv7kMNiPH1/ajHlizpcHWTdyLB58J+sod+znX8xmZejsCO75IBjoEkqEv E2lqZ3W/q5Er0AbVLxrVVNAm8sRmca9UdV2ocE95r7FaojEJa17wViu6vihbgNUJpXA6 sOhyo/GcO4Kg5F0HFIvFcG8bg6++t1edW4/T/FcPhnM4WTqLKKPKnfcT/px8hKVVEFAx yKh965216NF6dZtjJwKAioBmhQlmwstOZhZjmOnZP5ks+3G42DVCB7eyPzC8t7O+DQ3z ddAg== 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=q56NCjL65Y7HhHMowi4nLhIP6TzxOP1AaiItOEx8tAA=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=bpLXwy3VWWmohuc6cuv08vnYYQVgAqbP8Otr3iLpy6ty9qTXRY9a+HqQtg7PWltP3M lk9DlpJ6/8oLQW4NnOcNckKPPve2mbGbl0/tdcq9ywgtKsF7YXsDkSwhqaaQhFwgCBxd QUgEVgkXVSNuUjFk/armXYewvZu63RarF7m72SP6M1YREYxMXI+65u0/+F+A19TF4+II 85jJdKu43QB2iMWvkS6IciwpONT0uNjy8y19A1SmKu0SThUYLoRouZFWgY4bdo85tVaN 7YMF5y/fQ/Nz1dnnrfvJUQqiMk8QjUMbeOiWL+1FK0ZQtjK5Rx+Y81uzmYB8UtQyjxPN R4/A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DmY+hfHI; 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 6a1803df08f44-6b59e5ad05bsi97668556d6.215.2024.07.01.22.02.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:02:46 -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=DmY+hfHI; 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 1sOVev-00084q-BW; Tue, 02 Jul 2024 01:02:29 -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 1sOVeu-0007tX-2U for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:28 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVer-0007Cy-9T for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:26 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-424ad289949so27207545e9.2 for ; Mon, 01 Jul 2024 22:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896543; x=1720501343; 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=q56NCjL65Y7HhHMowi4nLhIP6TzxOP1AaiItOEx8tAA=; b=DmY+hfHISK5enlD/Hq3qvgCRMNUpqBAhORcrOLgTsR/tbqzzsUenvhjHtjNmqVN9f6 tHvkPvay1jxrQ3jCh2DJqYPld9M7xt8/LChSo/nHz93/fgeg2YFcbMVFZUTcJbtBBWgO 8A1OasuyysMfyie2V/aKm+kyDKM/UBIj94WvuTh/q2ksC2Gk8GlFCqEKTOBZn3TETkPz z9V0dlnyrjkC+umZHmux26KrbC6eVi7p+Zq6vsJioBloR8353zyMgZfGr/PnTXRFL8V5 ASbCg+jf/E9BETF9LPSjV0NVuSfFsYbjRSi/+9UzAU81rsnm4iZoasGYY0B/FmRyzEpm /VyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896543; x=1720501343; 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=q56NCjL65Y7HhHMowi4nLhIP6TzxOP1AaiItOEx8tAA=; b=t0QGR80+vCm8kyJqNBagM8tLyUhL/cWqvco8zKLG4uDsdaE8GPSRjCMlLiW+obhSQ0 lSjdippFL2FhV1/tH4tlHysa9ZJ9wr8pzcFMr2sUKJx7Ra3i3BALqvmRWjwXEr5CaNO8 JShTGtFdecKLx0Fsoh4Evnvqg28AU1dTtIiv0niGZIp93WwYgokYQIbup/OxGU2fpsUg tvS+s0yZOD2OxS27+tQWWf8aJBO5lFjiRIybasg4Se1Coogq/pqHw+aLjLg5eeH761Et yErXTDxLX2DZdaxH/HwqUSaWdckaIrcDS06w+0FV5D9Eok+8qys3NUYCwcacn6MVIdjd 6xIQ== X-Gm-Message-State: AOJu0YxVIPdzcJjbZ74NwirjOSzSUtQEO+/4vqElzuHvkLGcEQnyvmKN lVyNcZBE3Et3FW2NPaplfU7RZahKM5J/6U+sSG4iS6U8HS84qYLvUsArg62FCYk/ZhYPu/37AnD T X-Received: by 2002:a05:600c:1d1a:b0:425:73c9:e60e with SMTP id 5b1f17b1804b1-4257a020eafmr47566275e9.25.1719896543168; Mon, 01 Jul 2024 22:02:23 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256f55c4b5sm166624665e9.43.2024.07.01.22.02.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:22 -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 11/22] hw: set deprecation info for all versioned machine types Date: Tue, 2 Jul 2024 07:01:01 +0200 Message-ID: <20240702050112.35907-12-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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é This calls the MACHINE_VER_DEPRECATION() macro in the definition of all machine type classes which support versioning. This ensures that they will automatically get deprecation info set when they reach the appropriate point in their lifecycle. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-11-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 + hw/arm/virt.c | 1 + hw/m68k/virt.c | 1 + hw/ppc/spapr.c | 1 + hw/s390x/s390-virtio-ccw.c | 1 + 5 files changed, 5 insertions(+) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 027c6f29f7..83d2e66498 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -330,6 +330,7 @@ extern const size_t pc_compat_2_3_len; MachineClass *mc = MACHINE_CLASS(oc); \ MACHINE_VER_SYM(options, namesym, __VA_ARGS__)(mc); \ mc->init = MACHINE_VER_SYM(init, namesym, __VA_ARGS__); \ + MACHINE_VER_DEPRECATION(__VA_ARGS__); \ } \ static const TypeInfo MACHINE_VER_SYM(info, namesym, __VA_ARGS__) = \ { \ diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 08990b9abe..02e13b4a3d 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -110,6 +110,7 @@ static void arm_virt_compat_set(MachineClass *mc) arm_virt_compat_set(mc); \ MACHINE_VER_SYM(options, virt, __VA_ARGS__)(mc); \ mc->desc = "QEMU " MACHINE_VER_STR(__VA_ARGS__) " ARM Virtual Machine"; \ + MACHINE_VER_DEPRECATION(__VA_ARGS__); \ if (latest) { \ mc->alias = "virt"; \ } \ diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index cd6ee692f7..37bb36b385 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -343,6 +343,7 @@ type_init(virt_machine_register_types) MachineClass *mc = MACHINE_CLASS(oc); \ MACHINE_VER_SYM(options, virt, __VA_ARGS__)(mc); \ mc->desc = "QEMU " MACHINE_VER_STR(__VA_ARGS__) " M68K Virtual Machine"; \ + MACHINE_VER_DEPRECATION(__VA_ARGS__); \ if (latest) { \ mc->alias = "virt"; \ } \ diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2785b6b303..55268489d3 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4811,6 +4811,7 @@ static void spapr_machine_latest_class_options(MachineClass *mc) { \ MachineClass *mc = MACHINE_CLASS(oc); \ MACHINE_VER_SYM(class_options, spapr, __VA_ARGS__)(mc); \ + MACHINE_VER_DEPRECATION(__VA_ARGS__); \ if (latest) { \ spapr_machine_latest_class_options(mc); \ } \ diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 380e9e2e5b..c25dc3e13f 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -826,6 +826,7 @@ static const TypeInfo ccw_machine_info = { MachineClass *mc = MACHINE_CLASS(oc); \ MACHINE_VER_SYM(class_options, ccw, __VA_ARGS__)(mc); \ mc->desc = "Virtual s390x machine (version " MACHINE_VER_STR(__VA_ARGS__) ")"; \ + MACHINE_VER_DEPRECATION(__VA_ARGS__); \ if (latest) { \ mc->alias = "s390-ccw-virtio"; \ mc->is_default = true; \ From patchwork Tue Jul 2 05:01:02 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: 809034 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44050wru; Mon, 1 Jul 2024 22:03:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWds179ET+UKUdqJoTZ4miF9dVOQNPnbPkpSJgzyBTb42b1+Q3hLnYVWOfh69h0wc3DdLW2+1AzzPmOH+WNuPP1 X-Google-Smtp-Source: AGHT+IGTHInWO8B+RNJSz16nXxtXtM7Tpao7v3MJRZXR++PvSeI9Tlh0M+mTTiwYFscxE7gSnnQi X-Received: by 2002:a05:622a:1186:b0:446:5568:a6de with SMTP id d75a77b69052e-44662e59a71mr92325561cf.48.1719896608482; Mon, 01 Jul 2024 22:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896608; cv=none; d=google.com; s=arc-20160816; b=J2xU+fBQHjMzevk1OTQF9kI9BGIGbe52ZENZ9hO5LqGiFGxnRycsXMMACPIzRTuyz7 hYStSiDjvp6FEabaJbyyQ5o9UsiFYqmuhdvBLpxGsm6wmNkB6SmiNF6pjrdbcQDUXmUU Ea1B6UJOXT9ErArW9r5UY/xT4ASgz1FtdU8hvlmSeRAIz5Ke//rc6/kBoQBUkHKP9Ork FD0+Ep/sGRdRvLAqg9XVH7CX+GQmlqpHch48ABGeTh5pS/vuWqboz+kEY1i5RrsvaCA7 fIQJVBB4B8J1BKKoCvVcdzfkdGtCWEDn7Vn3d9teXl3/6TB28eIFsj5AK0a4H0lHKUmD W2xQ== 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=JbdsfJ44aAB8rxW6wAXXI/854m0o2ZFI+jAaNwL715g=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=kxVAp9XH3bTi/6Lvg6Ros89C4gYJhuu7pgPBP/HZmEPybDTshVqH9G21dEPhpjU2E4 HiXDvn2qjWQ6u0530g5oUweErUXLh2aNXJXKBL/EqnlOyHBQZgTKnUGKtdNsf4MXqy8n oF888lY2JvcwKuaU5JDQ1zmLijEJkuzLnscoCnvRlNtRzTYfEdP365WWJyn3bVR7PN3w f3fbv4KuKdfJNFewoXp4rIUIKT9HDvECBzohGlYFyBgufQbfjqZpyBacjQ96ByA+m2wd U82tOuede5OAWBDS6zJBogxaD+mtKdgJPmVODF6VHbUga1a4sbUwQiO3hFqj1dnERh0J uXmQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FBFI41WO; 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 d75a77b69052e-446513c1bbcsi92959001cf.70.2024.07.01.22.03.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:28 -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=FBFI41WO; 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 1sOVf4-0000T5-CT; Tue, 02 Jul 2024 01:02:38 -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 1sOVf1-0008Tq-K3 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:35 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVex-0007Ea-9r for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:34 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-52e829086f3so3575683e87.3 for ; Mon, 01 Jul 2024 22:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896549; x=1720501349; 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=JbdsfJ44aAB8rxW6wAXXI/854m0o2ZFI+jAaNwL715g=; b=FBFI41WO3Y5PjrYn8KHPhZQXGFbPrmytEnrd7/qJQbiHEj6bVjgmJXb/IzvNIvJvUH rCAp5tvTeuonI9zWClXeEf7jpOID4LtMGeUcf/nL0kcW3sQrHtqPyxQwJaLgAW+zA5ff FP5pJwUWFFYm23fRUZWC3lKGpBnJZFnxxVHFk5nEbZ32IjysywBCZKCtB+TTBHOqaIA+ a5PYGGmTxIPvdZf2d3xFku5n1YaHlb/SahjFMuBWMW5LWQN42kE9auQ+XmNZ4z6wCBWT N4s1nEuhDZpFu3H1SBYsjEwk5LKw8o24jNuVz+PV5o2KdsNYYWrq8jJZ1Mdh1mQJ93wJ M32Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896549; x=1720501349; 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=JbdsfJ44aAB8rxW6wAXXI/854m0o2ZFI+jAaNwL715g=; b=uHI05vyDXxW0iDvaawxSqCBaq1ZqNSTBuxxhh3A5tpdID1IbwWfBFGuNaZ0B8+PrCt tccruV3z3fn21TG1BThR3SYx1fxcSL/VwhIZ+SZzNwZnyypcBiM+bvpTau/2DYfI94zM DZueJDAeItLLuT9HfYwngsu/KDL/yT/So8+NTQcdd1RonZj7/fVtWHoaOTJILZd8gFww TjsL7+iLqwO7DBF0EnGWs8GzjznF2arOs5+AAxMtdZq3M/jJFyj9ltpl0CHhaNV0wMvb 0ou0SxCQloL1j8JgwEqxpcPdi0NsjyUmj0dAaJHyv2vvRPm6H4Zz5LNUhJ31YaHaUjot r/OA== X-Gm-Message-State: AOJu0YzVKUviFamP2E5n1XlbUNLk/SAQ+ZAaqyz3Kf4OwtMvvp4LgVC6 9qmpChyCQ6aov0SmX/ys5bhItzV/TOKdYSmfX9vfNmVOg5Yvt2VAawCxF8NlVKGEaV22BwURhzd T X-Received: by 2002:ac2:4c41:0:b0:52b:bee3:dcc6 with SMTP id 2adb3069b0e04-52e826fa995mr5628932e87.51.1719896549046; Mon, 01 Jul 2024 22:02:29 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a1108b0sm11916332f8f.114.2024.07.01.22.02.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:28 -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 12/22] hw: skip registration of outdated versioned machine types Date: Tue, 2 Jul 2024 07:01:02 +0200 Message-ID: <20240702050112.35907-13-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::12b; envelope-from=philmd@linaro.org; helo=mail-lf1-x12b.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é This calls the MACHINE_VER_DELETION() macro in the machine type registration method, so that when a versioned machine type reaches the end of its life, it is no longer registered with QOM and thus cannot be used. The actual definition of the machine type should be deleted at this point, but experience shows that can easily be forgotten. By skipping registration the manual code deletion task can be done at any later date. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-12-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 + hw/arm/virt.c | 1 + hw/m68k/virt.c | 1 + hw/ppc/spapr.c | 1 + hw/s390x/s390-virtio-ccw.c | 1 + 5 files changed, 5 insertions(+) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 83d2e66498..4e55d7ef6e 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -340,6 +340,7 @@ extern const size_t pc_compat_2_3_len; }; \ static void MACHINE_VER_SYM(register, namesym, __VA_ARGS__)(void) \ { \ + MACHINE_VER_DELETION(__VA_ARGS__); \ type_register(&MACHINE_VER_SYM(info, namesym, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, namesym, __VA_ARGS__)); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 02e13b4a3d..b0c68d66a3 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -123,6 +123,7 @@ static void arm_virt_compat_set(MachineClass *mc) }; \ static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ { \ + MACHINE_VER_DELETION(__VA_ARGS__); \ type_register_static(&MACHINE_VER_SYM(info, virt, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, virt, __VA_ARGS__)); diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index 37bb36b385..cda199af8f 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -356,6 +356,7 @@ type_init(virt_machine_register_types) }; \ static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ { \ + MACHINE_VER_DELETION(__VA_ARGS__); \ type_register_static(&MACHINE_VER_SYM(info, virt, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, virt, __VA_ARGS__)); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 55268489d3..044e6a8d9d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4824,6 +4824,7 @@ static void spapr_machine_latest_class_options(MachineClass *mc) }; \ static void MACHINE_VER_SYM(register, spapr, __VA_ARGS__)(void) \ { \ + MACHINE_VER_DELETION(__VA_ARGS__); \ type_register(&MACHINE_VER_SYM(info, spapr, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, spapr, __VA_ARGS__)) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index c25dc3e13f..336cb8c6d4 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -847,6 +847,7 @@ static const TypeInfo ccw_machine_info = { }; \ static void MACHINE_VER_SYM(register, ccw, __VA_ARGS__)(void) \ { \ + MACHINE_VER_DELETION(__VA_ARGS__); \ type_register_static(&MACHINE_VER_SYM(info, ccw, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, ccw, __VA_ARGS__)) From patchwork Tue Jul 2 05:01:03 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: 809030 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp43981wru; Mon, 1 Jul 2024 22:03:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVkE02+482fD936xIDDlfJsyWddqg1FRQSb9IN0h6vjfDl4lQO1YsDaUDZAgxNQZCSOFsc8s27Yl7hqDGRwCzez X-Google-Smtp-Source: AGHT+IHCA3UvTVhmefj2NyfdQKQqAhjkwx9wTSkN//ejppo5gBymR8QSVvhnynwnNH9e/2NV0bkD X-Received: by 2002:a37:db0a:0:b0:795:1cc3:55d8 with SMTP id af79cd13be357-79d7baedefemr942771785a.77.1719896597119; Mon, 01 Jul 2024 22:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896597; cv=none; d=google.com; s=arc-20160816; b=WKlXKEAduVdnjpphJJ7AhnWQ5xInCqZ6bXOG4zPWO91cjeLkYiqeR0YVEYpw6KGNOL gY4fh2bIe4Sxx/7gGMTH/ZZ9IZd7KCFErnBjCv+J4P1JIbFf/vN4f7JyVVTZ29/gqJxd qId81r/WvdB73r4Qm1ABQk9Jcx8d7faWxTc7meX/70JOTM19t3vmuZmbTX9RqMS/Ak8M TJn4+4dTin5tTPBg/5m9oPbaDQxRGgFR4+htJztHZQKZLRSR/VDQKnFxJIUdGM1aBYgu VSCapCstTnOQryIHb6RsZ9LB8UXGvzVi5iotbYJJbfG39EesxzgD9NxsZA6HI/WNotLo 3zUQ== 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=Eas6wsShgW42jSmZDNlDNzwrh4Tvlo8xVG0UAKG97gM=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=Dh5nqXTFhg31/zwlxDE4Te7EV43dTzI0XoHxcu//PcZgmY3x0lYnA3VRm4zS5B06OZ 60GAbm2J8+s4+tEu4zFrzkRfN8LrAMZVilQ+VFUDASgxWNi7qsGuaI0ZMNic+2Cqz9Zw 5h9wYeDkbIZLTzFqEzSZDzZdhQuM4tMSyXySWqHqF6zTD06FccCPhnYY+P6aGrn1TLIL ggyxDSIXiwxcMxoq8iWg1UQql497ImYlwo6uAAu5MmyeRMdwojIX2LmmvHy47ADtF3f4 m0fsiG+BluKYWejomPIt9BwbKrmbyxkd4w6oXH+rRWtDLM53EpmR+YWsjrcP0FmW1/2n krug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lW0kAK1Z; 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-79d69338da7si928161785a.592.2024.07.01.22.03.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:17 -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=lW0kAK1Z; 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 1sOVfE-00012x-D8; Tue, 02 Jul 2024 01:02: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 1sOVf5-0000he-Ut for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:39 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVf4-0007Ew-5V for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:39 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4257a390a4eso17654665e9.0 for ; Mon, 01 Jul 2024 22:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896555; x=1720501355; 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=Eas6wsShgW42jSmZDNlDNzwrh4Tvlo8xVG0UAKG97gM=; b=lW0kAK1ZqMbz/E0DoTiJaMZTbJkjawuhX8aDYi9wBn14te1r1yINMB5X+Us49B/SQF LxisdfsABYb+/h9v7W9Gh/UO5YFrbAzDq2EIK3fH8kt3bdzdvbMxG9asVMzscZoqo7pU WHlTvISt7Qqlqa2JvIQQ/tAg8UagBH1M7EEWst8DTw0XvzdigOZIN82lBJA3fE3vnGeT niPASdHK6JCJB1Vrwdy0PeeSEE0hjXUPeHK6XN2DjBS7Q4s5YLHZqZPkkJcqbPJk5C+c oJg9y5FDlsWm6kaxm2UXvE7gK6wlJuY8ASubrieJKR4jwzARYk1jrPufiz0cL1Yqdmu9 9uqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896555; x=1720501355; 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=Eas6wsShgW42jSmZDNlDNzwrh4Tvlo8xVG0UAKG97gM=; b=dl20ibR0Rvy+r3814JOh4MJTD+3ZrLhF3VIJ2lXncduLTZrYFxpTNptz2d8vEnHhbf Jyg4+a2WH4tc9vvT4ZFX62wcYar0vNLeHSFn7LTO/u28mAokSFTNGoF1Str+sMfN2qk3 LZDQbZ5mjoPckdmRWHkdmegQG2p3uONzEU1JuKSQYmEN0xfxjVyy8U+C9D38H4IZPTTO 2L1ZqjN4KFc7ycB5HR7H/+HWajUGParhwbbJuyuBd6Dbmf62OIGWxw3xjuNbm4GhzDpe XfMwTsmFnfjbxbIjsvyK3YuLJipElbNiW6n73kweGZL0ZyzszpdPV2OSU3iJhUkaYItJ u1yg== X-Gm-Message-State: AOJu0Yw0IqJi4kdHg9poxeXsbc3xZKryAsPm2H3asXez6DkBKEAu0puS BYraiWNh7mFJg5TCMYu8U5n5cWH/s+beGCRbvxJ0mN3H5C+Tis0zN3YgvPTV1bDegTnor8GPoH4 V X-Received: by 2002:a05:600c:1989:b0:425:7a0e:f63 with SMTP id 5b1f17b1804b1-4257a0e11e7mr49860665e9.3.1719896554928; Mon, 01 Jul 2024 22:02:34 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b09aa32sm181009225e9.34.2024.07.01.22.02.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:34 -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 13/22] hw/ppc: remove obsolete manual deprecation reason string of spapr machines Date: Tue, 2 Jul 2024 07:01:03 +0200 Message-ID: <20240702050112.35907-14-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::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 automatic deprecation mechanism introduced in the preceeding patches will mark every spapr machine upto and including 2.12 as deprecated. As such we can revert the manually added deprecation which was a subset: commit 1392617d35765d5d912625fbb5cab1ffbed8e140 Author: Cédric Le Goater Date: Tue Jan 23 16:37:02 2024 +1000 spapr: Tag pseries-2.1 - 2.11 machines as deprecated Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-13-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 044e6a8d9d..98fa3aa6a8 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -5156,7 +5156,6 @@ static void spapr_machine_2_11_class_options(MachineClass *mc) spapr_machine_2_12_class_options(mc); smc->default_caps.caps[SPAPR_CAP_HTM] = SPAPR_CAP_ON; compat_props_add(mc->compat_props, hw_compat_2_11, hw_compat_2_11_len); - mc->deprecation_reason = "old and not maintained - use a 2.12+ version"; } DEFINE_SPAPR_MACHINE(2, 11); From patchwork Tue Jul 2 05:01:04 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: 809031 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44001wru; Mon, 1 Jul 2024 22:03:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjZOIo1yvwn5mkgUk+CDQeP+B+m01A5AKn+0UDPtq/UVufBH0o2lN0PxaQcog3IX8auL/S4B+SbOVbw5vXgj6d X-Google-Smtp-Source: AGHT+IFYlvlwtO4AL8ZCQAKJt3NkWLfhz+vofJ37c6t4IpPdNptIJXYs16CKdwpWHzCS34LACrAy X-Received: by 2002:a05:622a:351:b0:446:43cb:332e with SMTP id d75a77b69052e-44662eeb9d2mr99385401cf.52.1719896600025; Mon, 01 Jul 2024 22:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896600; cv=none; d=google.com; s=arc-20160816; b=TnFQ1m93d1h9AVPFwN/BGLAKg4DZNddUdBGv397p8t6Fb0w4pGPbZN+38n827PwC8B ksyhfLr5KwVr6VjxrsOKPjnlTTDzX7p9igrr0HtxccaApFe6FD5FOh/1KUaBAxjl/cxn vabfoh7c4I6AjTecPVlpRZ1obUH7QVwmrHqey0lqwsuwOOrbeWTh5Vp9Z2SMD6LBzsNY JJWKzB4ZvezsjOftihLIYckvLXBtYv4pGmSHwAdvhjkgSnyBgB0okn0CV2uKdntMi20o OkPGU3Vn2xoLykDeju9lH6y5yqxkpAN4bxxP83RwzTI/z6KIy6UciHUsMkPPU9vsxA3g 5GIQ== 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=PXbwBlxU331VYAjhHl0SMCsb+VRuyHw+K3ZyG49lmEk=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=0UF/0pC1IpIYu4iA2QI5KyQ/WQVqpyuxmUTyRRhTpHcjYnWRI79Hyg14Nw4XetGAs6 aBkkC8d69Hk6Fy/nmG8x46Xpc9PAtAJy2oy8amXfV2dSRkzDxhADRdPugJmK2v0WF7/1 fZVGPNUDTn9P/OFfsmzLLBKAYwVGk/3EVXB78589s+yM6jQfaqRENPVt/WqfJLNh9zBQ 57n+YY2tZWfGTbCbzRYm5DEGLsHu70WBmawP8ykaXrKpjykWX/IDP4r6pCQkr9EI4xNt 6dlVhVDveotOJ7tpNjBLwWQq0ctbt6weZurm1pMjl4l/KR+x9ELl9bTYWTRM4AJxcydc GiqQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DJRdSked; 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 d75a77b69052e-446514c1b40si96308041cf.546.2024.07.01.22.03.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:20 -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=DJRdSked; 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 1sOVfL-0001Sw-MK; Tue, 02 Jul 2024 01:02:55 -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 1sOVfE-00019a-24 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:48 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfB-0007Fh-HR for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:47 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-365663f51adso2267665f8f.1 for ; Mon, 01 Jul 2024 22:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896563; x=1720501363; 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=PXbwBlxU331VYAjhHl0SMCsb+VRuyHw+K3ZyG49lmEk=; b=DJRdSkedUzVs+NlupvIA2E0EEAdXTmNh63d0IChjIFh1Ev1GNCQym4zT8XEP6phyJl XsYFnyJqSyttJ5oQILVWIKlnE51TFR7L3n4h93XWD7LeJKHn3NhLiJGgWgWY4T3MiRi0 WAWBjgcW82qpdAWAUvEI3dTbgJOVNLtxpnb1o0g1hiii+aLSM8FjRzeFtDmY0w9LI7KM 2wL7Ktahe1IpWm8mK3ZPVN033Zk065/S0PUaMBcTCIclYm4ap+eGqRC4HjrIyrwiU7u7 LaCPk4kfC2CdI7Rl572yjyUcS0U2K1ah9ZpDQwzk+crxKmdo1B0K+EQvheXoViUK7aeG DQMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896563; x=1720501363; 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=PXbwBlxU331VYAjhHl0SMCsb+VRuyHw+K3ZyG49lmEk=; b=jaa3tYsFVFu29nt0NNb97nqsXmb/I25QY5nCquzRybOI2/nj27pLDlZt+rXwg3QSAp 4dq8ofAwecAFqv9mdoHqXyjZ8dK5xqHDpf5TLBrtAAhI0MFnwxNEodvQOJ6gLMdYFuHB T5SkPqWEpA/6Kh5gn/SJkQE/o0nyUaJ3J6CooQ21j8HlaOa1rPvWaL3p7McnJUtb1SRl Uf/b7Fl+1YzVY38In0UN3Y2L5rSTDrRas5o1acAgOcR+c9lORJlXnseN3cBZ0o90/xm0 Us8ktU38qKc3hZLmmV78CTc+ckdH6UdfFU2rlajMZfhLe1xeSJGtwi1aRgt3DmhHePHE ib2A== X-Gm-Message-State: AOJu0YzCz4miHpJo2q0yaC37DfCwYL+l4ggH7XtA//IvJ5g5lX35Yb3D Z68ijpGO80nRG/P1H/XqG9PYo40HEdArTx10fewsuqKxdb3lzby0suGSOpHY8lQMBbWyuyq8Nuh M X-Received: by 2002:adf:e98d:0:b0:35f:276c:ac5f with SMTP id ffacd0b85a97d-367756bb740mr5016036f8f.40.1719896563060; Mon, 01 Jul 2024 22:02:43 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-367892a4817sm400158f8f.10.2024.07.01.22.02.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:40 -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 14/22] hw/i386: remove obsolete manual deprecation reason string of i440fx machines Date: Tue, 2 Jul 2024 07:01:04 +0200 Message-ID: <20240702050112.35907-15-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::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 automatic deprecation mechanism introduced in the preceeding patches will mark every i440fx machine upto and including 2.12 as deprecated. As such we can revert the manually added deprecation introduced in: commit 792b4fdd4eb8197bd6eb9e80a1dfaf0cb3b54aeb Author: Philippe Mathieu-Daudé Date: Wed Feb 28 10:34:35 2024 +0100 hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-14-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 5705d6e155..9445b07b4f 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -688,7 +688,6 @@ DEFINE_I440FX_MACHINE(3, 0); static void pc_i440fx_machine_2_12_options(MachineClass *m) { pc_i440fx_machine_3_0_options(m); - m->deprecation_reason = "old and unattended - use a newer version instead"; compat_props_add(m->compat_props, hw_compat_2_12, hw_compat_2_12_len); compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } From patchwork Tue Jul 2 05:01:05 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: 809041 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44282wru; Mon, 1 Jul 2024 22:04:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUV92ffaNrwPzYcJD5Hu5aElG8po1Bx8BbZwvpS9M7PU0C8hod1qcancM/lRdlBB5JX85Soa92LRcAUwGcbCX/W X-Google-Smtp-Source: AGHT+IHH6Qydt477zmxE5SV1P/q80fqkm+SmDmqH7ERocbpyOx7+KGft3W5tC3VXmvo6YXNbKPnq X-Received: by 2002:a05:620a:44d3:b0:79d:6cb6:a7b8 with SMTP id af79cd13be357-79d7b99d8b4mr1123746485a.1.1719896657783; Mon, 01 Jul 2024 22:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896657; cv=none; d=google.com; s=arc-20160816; b=ulp53p11+Jf9fM+mYaHrsvrg+C9WX92k4zdmSi8SdYKAUI6/VDL94ngybrfU9R6Cr/ ahPsoxXRwo60dI0Lmm91xp+/YbzoS5/D7DYjANl8HGbPk2GQvhDCyf5BFfRl6nDo0ydz AAj1lZ627ETzgIBxyFjerXZ/BpigxxQ+wreVGrQrYhRtxyo80hzwJQwdBHfH2Y8VzflV P2QC8MOOkDKAaOeHXgCCMxqRf1i9msCSTvRp9tOz++ThF7hsXUx3CA+mPnUCuQUaqrCX 6xPxXR91QCFG1or5rskXPhGc0wlrHv/TdbGXdiePbLJ9Tz8AtMjqvsiVlRKUz7JqKLj6 7pNg== 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=IoGL6utQV9KZz7a0NZhlOkuZgg5oZQA8TSNIPaPeX+c=; fh=B/0b1FThncQQQALBQMKdmnM3E+nS03h1GE8Rgi7aa2k=; b=OzyQNbr5+Yzcs8376JleFdGXDHUs2Z1bepW43/7C8i+Niz0YigcYHn/UE+FwVeYcx1 QQuMil7vsI27bq+JX6MxZ/5079i4+OS9GhKaUe8WcKOVCA2AR+62hl4ViRmtjm7UEPlZ bwrv4vux32dhuZDhy8x9s1nEXLbbVzscbYH03bL5J/ArBQ+DldMdeyOcuLNxA0d1yubE 2Sf+FyZt7Z2CIt9pstzjEh8lTEUcc3hOXfmzQViiwtMBj4yCKM5CZbLMMN8gXxGyW+Hl UZQDbIExpUyKnrJPe1nGbsh2tuot6uyDrVMNBGU8R+sNNYye409ns8BO589McjRINGzf 2g0Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pxJRoc9g; 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-79d9b756cc2si52694085a.269.2024.07.01.22.04.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:04:17 -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=pxJRoc9g; 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 1sOVfN-0001js-I8; Tue, 02 Jul 2024 01:02:57 -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 1sOVfJ-0001Kz-8v for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:53 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfG-0007GJ-P2 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:02:52 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-424ad991cbbso29004525e9.0 for ; Mon, 01 Jul 2024 22:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896569; x=1720501369; 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=IoGL6utQV9KZz7a0NZhlOkuZgg5oZQA8TSNIPaPeX+c=; b=pxJRoc9gnLyrVxrTMnue1Z0fOLHpNxnGcGXazHLBw5djDfb3GGDKZOBolVqHgGkbWo Zxd1nEsbaJjKQ3AVnUh/rvVRx4eauN5Sm88b3k+I+lFc6LPwsObrnYIsjQ+RW3re3yG5 DA4lmFoicpsSxKRya91W5EbkmPZxqsvwO05SkU2xGf2w7gbscHmLrzKyN52CMUlhFf06 8vVCqwlQuLerI1zgDOcd0hyr7lhp5YcpzPNEuXeeBZRM9CuNNjEIZMunkQv6l2ZDERZw EfnIkpJOVrXryB0EEDkRQjyjeniyP6qAG+m34rdYIiLZ13P75jFdXgWiUbXtdIQHoLaF JcOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896569; x=1720501369; 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=IoGL6utQV9KZz7a0NZhlOkuZgg5oZQA8TSNIPaPeX+c=; b=Uc3PzVzXLwDw6D4N1guwKQ7E8sKkfJ6216lE0f1XH5aSkGVeGjfMIMhT72pK7kDLqC NIR7YYl1pvipwQs8kejbyQ0oXTiTIGFIw0NDYxYHDivgUc1X/8qozZEDZNx49o6KjeLs W9IcMlswjrEpMOc4bTyfLLUg+D/V7SbqrQ8hjLWL/HbqeYUCb+p4l5brdn5EVykQzoFY emjui1qbqxPeiaS5LfsSO9jU80gRuitvqu8X8moF7QWFKvg3nlj99rxrgaPwniWaBwQJ l1z2quMYfi62G8iGtn3lV2TV1FyX8di1B3KOgm+/UCIOYTqb7D1TsJ6D3JfZLh+2TGPm QYKg== X-Gm-Message-State: AOJu0Yw8l9F8QxfCfW36TajAaEEzg3YRjXP+E9hTvFT7x7TxaW2LfT9I SioCaHbbTF5KZuHyVuHe41LIOmHr8xBCCxvp1yBKrZOVB26N/CW+rPy86KNQkKPg9OJtscfWDZ5 c X-Received: by 2002:a05:600c:3388:b0:425:600a:5e95 with SMTP id 5b1f17b1804b1-4257a06db61mr43950945e9.39.1719896568880; Mon, 01 Jul 2024 22:02:48 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af389efsm182140545e9.7.2024.07.01.22.02.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:48 -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 15/22] docs: document special exception for machine type deprecation & removal Date: Tue, 2 Jul 2024 07:01:05 +0200 Message-ID: <20240702050112.35907-16-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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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é This extends the deprecation policy to indicate that versioned machine types will be marked deprecated after 3 years, and then subject to removal after a further 3 years has passed. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-15-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ff3da68208..bba12d1641 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -11,6 +11,19 @@ releases, the feature is liable to be removed. Deprecated features may also generate warnings on the console when QEMU starts up, or if activated via a monitor command, however, this is not a mandatory requirement. +As a special exception to this general timeframe, rather than have an +indefinite lifetime, versioned machine types are only intended to be +supported for a period of 6 years, equivalent to 18 QEMU releases. All +versioned machine types will be automatically marked deprecated after an +initial 3 years (9 QEMU releases) has passed, and will then be deleted after +a further 3 year period has passed. It is recommended that a deprecated +machine type is only used for incoming migrations and restore of saved state, +for pre-existing VM deployments. They should be scheduled for updating to a +newer machine type during an appropriate service window. Newly deployed VMs +should exclusively use a non-deprecated machine type, with use of the most +recent version highly recommended. Non-versioned machine types follow the +general feature deprecation policy. + Prior to the 2.10.0 release there was no official policy on how long features would be deprecated prior to their removal, nor any documented list of which features were deprecated. Thus From patchwork Tue Jul 2 05:01:06 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: 809037 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44160wru; Mon, 1 Jul 2024 22:03:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU1vokxCielqRsoN9pjrCvfW7nsiYxvQyo6KXB0Up62SQN1PzjSlwfoQTsg2Y3fbXie/MqZCtTIxvcKxNxASnIb X-Google-Smtp-Source: AGHT+IF/39G9IpAZi5ffkK4Y8rlCYZDQaf6UVK49+mjEY3DglUi2Qtj3/gyaAQ7JTczKqaY16b4X X-Received: by 2002:a05:620a:1994:b0:795:5b60:a1ff with SMTP id af79cd13be357-79d7ba149bemr1035314185a.40.1719896631181; Mon, 01 Jul 2024 22:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896631; cv=none; d=google.com; s=arc-20160816; b=IErMWMB0hBV+K060Q9IBZdrHnUsILbf+WF6XAZDn9sOvz5zmc/tn9WALhc3GfT/MN/ 5qiEccdgqD/QUuXTKuLPLIfKvlRccP0W10CG4N+U7aA8zdiMsQfW64pE597zjQ0RL2WD a1zYvK7imaomt5KM6gRikxN7rCZvKBypYEZOHx2dQT7gApagkAstONoT6aZ2riiQEcsb 53UH4JlILa2ua1tuTEMtMQFmZ7TChjhydMjHeJ2hWqJi6TGKwuHO75fn0Q2PpmSSxKRF cUF9+XykKZ9ngjvm1wC4L46ia76OQxtzw4vENt+pBBHrUVXsMQTmz8FVYQANIY2SJaSN p+eg== 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=ckBzbdEj+3o/s/LUD3LYtPTx7oK9lF8pkA5ZkoB219g=; fh=3/dHJCaWbIS8kQXB+4nfZ5keXJwxUU7OiNzUBCmqz+I=; b=VjVpENZGhBkrCjZtI/lqqYBVegiZZrllNRaXKQQzE/NMhFadttHlot6YwBiQfrJ+FH pa2duMIM1237WvZ7EH/MU+zt5ap0B1L440gl3ySQW93FtAY8jeGc2CR+7GRb5JMeQZVA qyhjy44/1qs3+X3sUanXdZfrCw5ejwFGrU0Qi9iMqAiNzcjwZ1f9/jkHRrOpmxPDF+EH eLGrmE7GIkEXlgPE8Gur5bTAL0jP4WnlRMtgwGA5Hum5iGWzQCeJP7Ar/Bhtu6jGfJA3 mc9Zvino5zt6XSADLFcnld3CaKy4G7MxmvjiogR/1c9yLodKN4+IeL4ZKtYBOKDlYWKa xUuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GVx1YCZm; 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-79d69262eb0si911735185a.145.2024.07.01.22.03.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:51 -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=GVx1YCZm; 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 1sOVfT-0002go-E0; Tue, 02 Jul 2024 01:03:03 -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 1sOVfR-0002WJ-RU for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:01 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfM-0007OQ-OA for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:01 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52e8037f8a5so3446283e87.1 for ; Mon, 01 Jul 2024 22:02:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896574; x=1720501374; 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=ckBzbdEj+3o/s/LUD3LYtPTx7oK9lF8pkA5ZkoB219g=; b=GVx1YCZmWLkDQMFSQnVyq5IDJ9yS+WstoLkil5mQxqPxFSLZpwNiTuKuFsRPV0vNGS 2x004ZKHROK3pgPw2pXdL/3f5kt7J1lnvgRLT50RYBU04cpBxBaUU0iTekfnicF0eSX/ QLYIWnoxnBKKf7Y0Z4mIgPw9HEfV3IAwG8ei7fq5owSuEg0r3lx1zRCVRwOGc5NtqFnu rqJss0lUVQa6PT3tVwQTRlEdAlpRAoGhlS4MhZQQf+NmPBdJPh3kwNhwVm+CMvUJYXU8 MPfh8Me9SIqbg9VsSeeT1JDC3gL/Yi1KDAnUH7b6swfQCcmfrHXpFSyQG8RSUNUxkk/R sGLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896574; x=1720501374; 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=ckBzbdEj+3o/s/LUD3LYtPTx7oK9lF8pkA5ZkoB219g=; b=BYT+7sDWVt8wtftUbuhDt/2w+uEhPH8UUgvqVwSEViAsvCqS9aT1z7TR0ZxUIgH/kY HaCQiJ7TdvpnJogFO+uOTqwMddxIYn1/5MdsvdhM/FEKATen8gm820CTv7Oh1YuK3Lao 6h4J7AJi0LMpMcc6Z6CftZvE/ro1zzm1zavmJAz2wFtk13hkQnnUei4PX+XP3pGFNQZk rvvvxiNFE9f78knNiRyqbYixEPr/kY7BVz/PGJnVzupQiwhHdnwjdsbn5EU+Rc4AxxYK sghhxA9YigQX3cXStYue5L3dtXh9n8/Y8ExZFJB5LxaNc8qdI0QCc41ArNIlkG41xqES 8Sow== X-Gm-Message-State: AOJu0YwDg7dPEvrPHIHN2gU5RRopQUeBJ3uPjPolJnYB4pgXp1mHbseS sj1DJz42Nt1Mo+Te2IjF2IgjPjDMrokJyrsQGhA5iqFb1LJcZfjiBFQzafAWB7fsSFfdR4Li1lw a X-Received: by 2002:a05:6512:2309:b0:52c:e03d:dfd7 with SMTP id 2adb3069b0e04-52e8268d153mr6350848e87.39.1719896574653; Mon, 01 Jul 2024 22:02:54 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0cd663sm12079456f8f.3.2024.07.01.22.02.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:02:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , David Hildenbrand Subject: [PULL 16/22] system/physmem: Fix reference to dump-guest-core Date: Tue, 2 Jul 2024 07:01:06 +0200 Message-ID: <20240702050112.35907-17-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::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: Akihiko Odaki dump_guest_core is exposed as dump-guest-core with QOM. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Message-ID: <20240628-dump-v1-1-c581d10f3646@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/physmem.c b/system/physmem.c index 33d09f7571..261196cde0 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -1521,7 +1521,7 @@ static void qemu_ram_setup_dump(void *addr, ram_addr_t size) if (ret) { perror("qemu_madvise"); fprintf(stderr, "madvise doesn't support MADV_DONTDUMP, " - "but dump_guest_core=off specified\n"); + "but dump-guest-core=off specified\n"); } } } From patchwork Tue Jul 2 05:01:07 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: 809035 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44072wru; Mon, 1 Jul 2024 22:03:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVA+jHoqZIeuBzK09AjETXnfqWFZ+ObmmAR9VHuJO2+EvvM/qv+vk9+yzP/1Nree/0vlbKEdhNj63PKWJLaRGzR X-Google-Smtp-Source: AGHT+IEDuGVZ9axF4bRh2mMsGZLw39IyqU681xV7smgSjDRoaxvIkG3JszlRqTaf/qF8A4v05Z8u X-Received: by 2002:ac8:5f82:0:b0:441:37b:cd5e with SMTP id d75a77b69052e-44662c9a2a2mr116074181cf.5.1719896613680; Mon, 01 Jul 2024 22:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896613; cv=none; d=google.com; s=arc-20160816; b=hK5Xed/1MzxE9FfI+cC+CWijx7mM1KKWHBh3KgfbrkFuTRM7tuaDA7ciJYPLHuDohq 4x+U6zO36Pv8XRqpeubNca6EzaK60AATK2YMTU/UZSUrAp09g0hl5g5CwJfGAAxYgltY ZzQo+qe+K5Y6tiruXFOantsN98vgHCCWyMjkjIF/xcpGq7uarNN9vY0j1LUC+w5L0X9C +rJUljHsyYjpJpr1Rqtb627Ayp2DvISPL8FuqPJCG+vS4K6IqjS9kXYH3NYGLuv1D9Yr Gal1q25U2g5GjgX3xhhaAkfovhg99UFHSN95mqFn0NLL7YSVJN5qikARcOdjx4gP9HFP JSew== 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=RpqEDb+iBtpvIrsNwMVclKz/Xq4RBNysBjtBSTbDfBY=; fh=8IXr9maTYcrkJnWWiGPR0cNL20TKjYhdMc4zK43bVII=; b=lQizfkqH5LGKK+pPDGzPgV7g2acnQQVR6A/B3UPBchZPtNfJgZ0s/ENjt+6RRZxPVR fcQdIYDLFARlJ/b57yWPRtxgW/Z6/G704vTriCJEpLVMimomMLIUivia6aPySxdOkD/O akuKyAzFFqdgDYiVD08UV4DSDk173BMA0OPjjiLRJynQ7yv6W2CUZW+6N5FU3Ot7KWuT ymoSTSPWddR37vuV+Cjd5/B7ePNgmVQfbXFiLHWivgbMVE8q3NsFwSt299B13XJXwb2t WbNuD0b/l/NLJR9tltdvV+9W57B7CKjdOCIPyog0R+FOTXbXPxGCybn6NAZV30d/aFSw FQ3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yg0R9LlM; 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 d75a77b69052e-44651487a5esi94543851cf.271.2024.07.01.22.03.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:33 -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=Yg0R9LlM; 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 1sOVfa-0003mt-UD; Tue, 02 Jul 2024 01:03:10 -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 1sOVfZ-0003T6-0k for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:09 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfT-0007dm-J6 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:08 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4255fc43f1cso25869245e9.0 for ; Mon, 01 Jul 2024 22:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896581; x=1720501381; 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=RpqEDb+iBtpvIrsNwMVclKz/Xq4RBNysBjtBSTbDfBY=; b=Yg0R9LlMiN2qoJMccT970VzEtaffJS3xqPq1z6XHH56kBxHGYPVAJHJTRkB+73GhdA q1CP+qs7L0/vAxIIJwzbZrZWKtMIKxeTDNCzMPG+Y+h8V+fqGyC2byBLk/7r9EQ/eBPg jsdDhPcwvWM6VvO7HX/VX9UxslH/IeNuQqKt3PYScYY81SaaVRoDbCXyhNEQHCjmMgK4 rxAhSm019HmQzVD/WjeNpSI0Xhs8N6gDikciwof7ZCT7MKJBj/ToRr628ET370+f3h4H QyqPmjbNnPa+T3B00DUmzIcZEgSFyxdjX4D2nOW2oRpuV2oqeEMDokbbXc7cYEplOAIW 34uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896581; x=1720501381; 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=RpqEDb+iBtpvIrsNwMVclKz/Xq4RBNysBjtBSTbDfBY=; b=UVoUpjcbqmMygxsAdrG7zU9OyLCMPkOycZ5X6Uz5eE7GbvxrM0s3FMAXc2n03rHsor 3Qaitz30K2lmloZxyjxQn0mtIVrmeOttzZy6j9zUEUd/fF0taxWUSSfrMYL0jvSEYU3Z qMRzPqS9Yuh7baKN1SabBapq7rSg3fdGtIfy5OOcpS58zh73gejsXyBieyXkXPUeRdVc 87vtB/XxLbO+LJOYWuBqoPdh+INOFoqDYuEyERByaOX2mHXXhzhs/0YWnm+tquuPFS/T UwWE/wOX81dVUlf2Tmosp121AUpG4T+qXDCZoFzEbxjphfXdedL9uNu9lbrEm1BpR0PM zMQg== X-Gm-Message-State: AOJu0Yx9zAxgk9j9vwKkSAYwNH406SYIX5mwqpEY99pK9yJHN0zufN6m 6VFfEFjEKjBuvpN1dFAXz8wAa0/xJqc2rpWN8sx3PGPv/ogKZ+fCPli9E4tv2bLIw60imeWz3Fl 5 X-Received: by 2002:a05:600c:4f52:b0:424:ad14:6b87 with SMTP id 5b1f17b1804b1-4257a02d548mr50160455e9.4.1719896580776; Mon, 01 Jul 2024 22:03:00 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af5b8e2sm180146955e9.16.2024.07.01.22.02.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:03:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Peter Maydell , Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 17/22] hw/ide/macio: switch from using qemu_allocate_irq() to qdev input GPIOs Date: Tue, 2 Jul 2024 07:01:07 +0200 Message-ID: <20240702050112.35907-18-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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: Mark Cave-Ayland This prevents the IRQs from being leaked when the macio IDE device is used. Signed-off-by: Mark Cave-Ayland Reviewed-by: Peter Maydell Reviewed-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240628160334.653168-1-mark.cave-ayland@ilande.co.uk> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/macio/macio.h | 7 +++++-- hw/ide/macio.c | 10 ++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h index 2b54da6b31..16aa95b876 100644 --- a/include/hw/misc/macio/macio.h +++ b/include/hw/misc/macio/macio.h @@ -80,8 +80,6 @@ struct MACIOIDEState { uint32_t channel; qemu_irq real_ide_irq; qemu_irq real_dma_irq; - qemu_irq ide_irq; - qemu_irq dma_irq; MemoryRegion mem; IDEBus bus; @@ -92,6 +90,11 @@ struct MACIOIDEState { uint32_t irq_reg; }; +#define MACIO_IDE_PMAC_NIRQS 2 + +#define MACIO_IDE_PMAC_DMA_IRQ 0 +#define MACIO_IDE_PMAC_IDE_IRQ 1 + void macio_ide_init_drives(MACIOIDEState *ide, DriveInfo **hd_table); void macio_ide_register_dma(MACIOIDEState *ide); diff --git a/hw/ide/macio.c b/hw/ide/macio.c index aca90d04f0..e84bf2c9f6 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -420,7 +420,8 @@ static void macio_ide_realizefn(DeviceState *dev, Error **errp) { MACIOIDEState *s = MACIO_IDE(dev); - ide_bus_init_output_irq(&s->bus, s->ide_irq); + ide_bus_init_output_irq(&s->bus, + qdev_get_gpio_in(dev, MACIO_IDE_PMAC_IDE_IRQ)); /* Register DMA callbacks */ s->dma.ops = &dbdma_ops; @@ -456,8 +457,8 @@ static void macio_ide_initfn(Object *obj) sysbus_init_mmio(d, &s->mem); sysbus_init_irq(d, &s->real_ide_irq); sysbus_init_irq(d, &s->real_dma_irq); - s->dma_irq = qemu_allocate_irq(pmac_ide_irq, s, 0); - s->ide_irq = qemu_allocate_irq(pmac_ide_irq, s, 1); + + qdev_init_gpio_in(DEVICE(obj), pmac_ide_irq, MACIO_IDE_PMAC_NIRQS); object_property_add_link(obj, "dbdma", TYPE_MAC_DBDMA, (Object **) &s->dbdma, @@ -508,7 +509,8 @@ void macio_ide_init_drives(MACIOIDEState *s, DriveInfo **hd_table) void macio_ide_register_dma(MACIOIDEState *s) { - DBDMA_register_channel(s->dbdma, s->channel, s->dma_irq, + DBDMA_register_channel(s->dbdma, s->channel, + qdev_get_gpio_in(DEVICE(s), MACIO_IDE_PMAC_DMA_IRQ), pmac_ide_transfer, pmac_ide_flush, s); } From patchwork Tue Jul 2 05:01:08 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: 809039 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44252wru; Mon, 1 Jul 2024 22:04:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUo7vvDYNz81HKG5jE7AeQWwBRqbn8t4lUAtLba0f+gHmRDzCxW/Vnu/btrUrScpdK9bolJhtHju7emd5jS0Gqq X-Google-Smtp-Source: AGHT+IHN5pZ7e1UyAdbraBrxmiK8SdB6dJEePEbqN5MYCO2zX2gzdL3KvGaWyq/3WthFBh7kBOIZ X-Received: by 2002:a05:620a:881:b0:796:783c:3c29 with SMTP id af79cd13be357-79d7ba14a23mr761671685a.38.1719896652461; Mon, 01 Jul 2024 22:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896652; cv=none; d=google.com; s=arc-20160816; b=wm5DS+k+ZHq09m0iEC3yq/UZubPQqunNL6jVOJIrF7o0YYkBSYfHkFvbfwKDJtcURc nW9iWFYcnwiQpytIUHLOSvfih7MpkGEYrvtYcqZ88OuojUzYIekg2EHuMzrS8xHZz9Y3 ZsNi/CRz04ofK3vV4U27sAePtvLGlCnD+Qa6NGuao89PGGHljYjNuQq+wFoVK9GP3Kx5 yBP6V5ww6PYSCPF9O2SJfd4d81YHirIgj+tjCoLhTUOcemJBoNs2EVT517Ac1VJEBLWR Wz8fJt+mmCkK0dC+Zzy0ZFcOkvQjH/4hC84PIiWoG1fhZEO+G4+AQ6J25ITIjvn2UUco jrIA== 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=Mkxj1rf41yYS/L7V0n38PLpXQTaW+pjDKubAqykoIKI=; fh=iYRE3RIK6EzWkNtDPLyhm/eNSgPn7kzL0NqhIB5UBZY=; b=S6xbQ6+5q4wYO4NU9nH8EjoZiWjDc6tPD3XeYk/aW9XnI55K18hpTNmSeev17Tjca3 uefMhPqf/3N1JGUOgv77/dQ4sEeFF8fDqGTfDkS9ZrQckA9J+c3yysawwSnR19ASyEFs Lc2TVqXyyBv8nzKlxtAU0zS2gR9uLPlB3652Y4iERRvrDWjSRshe8pSAIclhb6zrsPNd v/OPljRK5EqJbVafMiktpqAoctLa12KfWe0NOL66RhkhfjpbTUDqQseFhWmXkYx10JIG pLBupc6OITih8JEeQV1SShtb5WkR5LXSn82+JpYdM7EsXMl8sWRggkpspgbUuDZFcmfc N/fw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=geV+eAD0; 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-79d6934e100si930022085a.745.2024.07.01.22.04.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:04:12 -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=geV+eAD0; 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 1sOVfg-00050W-MW; Tue, 02 Jul 2024 01:03:16 -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 1sOVff-0004oV-D8 for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:15 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfZ-0007fi-9N for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:15 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42578fe58a6so17745495e9.3 for ; Mon, 01 Jul 2024 22:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896587; x=1720501387; 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=Mkxj1rf41yYS/L7V0n38PLpXQTaW+pjDKubAqykoIKI=; b=geV+eAD0RLpWBUkU8Evm1ve4vkBOwLy3P7G13J+g0ZX1vZa9sB4bzMVX7lRV6jWg2c 5AQIlJv8sSh5Jxjs94SCaLwo8JYRCVrvoUV4G8Dro3dv7il8xSvf8A0+eDYuh97e1m/Z wCDBLbeAlAM2m99yKmu6amQ2GPiTkcgdvffCK3SKl3OQu942kwE8vJBuPwVShkaE+uYY NMTEXIekPKqA9Z+rcUZ/LG7Iz3odGCxJhjeUdcN3MQpHQeJyu0wNzXUqbUpbxcrYaUiJ 9qsPuSn0oeUJlzjhGwnFFjuzBUKgUGinuz5i1dceU8F5/Y+GNAgcPd4SlkzvAGAT/7xq bydw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896587; x=1720501387; 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=Mkxj1rf41yYS/L7V0n38PLpXQTaW+pjDKubAqykoIKI=; b=l9e4yVMf92A5/gbOappSxNHVYZKvfS3hvB9wAYcMGU1R71fzaC+jFR+eKp8fY+LFG+ 6jWhP9jM5VnEYHwQbbFrq/NY3JT7jWIwS6W+Qy73iuJcJzI+dSJsC25opxWX3BeSb2a6 IUQESIP7ptCI5D3ZV3IX0oW8ld+Bd1mj+2UB7CSqBUSO09OXg9itDUcVcjcYCnOiYlat W1D5hNrACB2Q9FxIK9vqTacOXlC21s9Mk96BebZ0mjt5oIkskaOUDA24l8hdxOqUURly eeWTWivQJWz7BNxCgTKq+uC/89S942qdxzBvQEXmqypj+d1+oQtC5GBmxDqlkIOJ0A08 +4cg== X-Gm-Message-State: AOJu0Yykoij7fzImrbPMFUtcr5zd5R/NXDypiUGL98iAoEXsrg0EzxzS FwcePNpIwd944MDJlObrPHolIc/uX5lrilylTuV0sCMRt+5k2B2KKz8WwaaFjUBJee+3dwiKpQ0 h X-Received: by 2002:a05:600c:2157:b0:425:5ea7:1f7e with SMTP id 5b1f17b1804b1-4257a034e49mr59240875e9.10.1719896587370; Mon, 01 Jul 2024 22:03:07 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b068d1fsm180045105e9.23.2024.07.01.22.03.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:03:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 18/22] hvf: Drop ifdef for macOS versions older than 12.0 Date: Tue, 2 Jul 2024 07:01:08 +0200 Message-ID: <20240702050112.35907-19-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::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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, T_SPF_TEMPERROR=0.01 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: Akihiko Odaki macOS versions older than 12.0 are no longer supported. docs/about/build-platforms.rst says: > Support for the previous major version will be dropped 2 years after > the new major version is released or when the vendor itself drops > support, whichever comes first. macOS 12.0 was released 2021: https://www.apple.com/newsroom/2021/10/macos-monterey-is-now-available/ Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240629-macos-v1-1-6e70a6b700a0@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-all.c | 3 --- target/i386/hvf/hvf.c | 23 +---------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index c008dc2f1e..6ca0850b20 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -23,10 +23,7 @@ const char *hvf_return_string(hv_return_t ret) case HV_NO_RESOURCES: return "HV_NO_RESOURCES"; case HV_NO_DEVICE: return "HV_NO_DEVICE"; case HV_UNSUPPORTED: return "HV_UNSUPPORTED"; -#if defined(MAC_OS_VERSION_11_0) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 case HV_DENIED: return "HV_DENIED"; -#endif default: return "[unknown hv_return value]"; } } diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 2d0eef6cd9..c9c64e2978 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -427,27 +427,6 @@ static void hvf_cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, } } -static hv_return_t hvf_vcpu_run(hv_vcpuid_t vcpu_id) -{ - /* - * hv_vcpu_run_until is available and recommended from macOS 10.15+, - * HV_DEADLINE_FOREVER from 11.0. Test for availability at runtime and fall - * back to hv_vcpu_run() only where necessary. - */ -#ifndef MAC_OS_VERSION_11_0 - return hv_vcpu_run(vcpu_id); -#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 - return hv_vcpu_run_until(vcpu_id, HV_DEADLINE_FOREVER); -#else /* MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_11_0 */ - /* 11.0 SDK or newer, but could be < 11 at runtime */ - if (__builtin_available(macOS 11.0, *)) { - return hv_vcpu_run_until(vcpu_id, HV_DEADLINE_FOREVER); - } else { - return hv_vcpu_run(vcpu_id); - } -#endif -} - int hvf_vcpu_exec(CPUState *cpu) { X86CPU *x86_cpu = X86_CPU(cpu); @@ -476,7 +455,7 @@ int hvf_vcpu_exec(CPUState *cpu) return EXCP_HLT; } - hv_return_t r = hvf_vcpu_run(cpu->accel->fd); + hv_return_t r = hv_vcpu_run_until(cpu->accel->fd, HV_DEADLINE_FOREVER); assert_hvf_ok(r); /* handle VMEXIT */ From patchwork Tue Jul 2 05:01:09 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: 809042 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44287wru; Mon, 1 Jul 2024 22:04:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXlOg1nFi9vuapFn20mG+RU4nj0FUWZcwPR2oloVJx6zVukJ/PIsHuCaOaC4594YZ7fEgg/0afMdEGqqLmCQNoG X-Google-Smtp-Source: AGHT+IHjR6t5HUHuajOrIquv6MB4D0VpJqvLNKZP8ltLdyEM4Ego91ehipMPVqobFm4oyAKk0tLA X-Received: by 2002:a05:620a:4e9:b0:79d:5b21:804b with SMTP id af79cd13be357-79d7ba89238mr746990685a.63.1719896658274; Mon, 01 Jul 2024 22:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896658; cv=none; d=google.com; s=arc-20160816; b=J2ZAsT0byc4hY1vEwSsLqNNTdwJmnwIOmoEJAedjphQRKqyj5h2fsxNyr/0ZSvuI6e oKVEtdgOyy2XAR35DvW7cN+g3bGX7nGS+95RddpbiYxkxKyzGO8MWLqJtWdXBrtF5sox 6WxFoVpIf96POG4t15QyrGi88Iu6BBeTtiHm20RAcW82AoFNP8tGVFXyH1mtlVl8DOSX gQx0ZPUAhX7JLJGNm+ijrUQrX8JM5E3DE7ib95dhvGlk0RG66fnYGjKwEnY6G3ASqONL Etn9rYAGYi4KochuYaye38JH7MSJ885rmLrDnpS0SRHbobZgunMJ3NiL5orrRSTd6ZS5 U+TA== 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=53/vSX2DxNBsJLADWGWkRKviz9VffjPRlWD9A4UquyA=; fh=iYRE3RIK6EzWkNtDPLyhm/eNSgPn7kzL0NqhIB5UBZY=; b=bKxvbZDF/7xyzybwyYf2aSPZMaWt4dy1pMWIou6X1LyPsiSvaz5RJLE3YZ1dpEeiqB vC7jy6D1c6JlVE0V7w9zGhl/QHUZpcV77lm4UiURmqSnzllg/kUfDp12ai7g82JkUCsb THmUlNZCb5h4VXSWArMt+Bb4dTrhwGUDR54+CoLw88M/1Q2AxTO9SbS+yScfXiLHBFEY AoHazL4yDd+GG1Wl39R/05KFgtSWhOT4Ml7Z/ftfo6WVekSzlR1FEq4Ym//VlzOylR+a upV7x3Gor8owDOzOc9ZmyAmnlcYXQh6FJ+hw1yY7ZWd1xcnsHZrnMhVhR0XW01TY+vh2 gZGw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h44J3IKF; 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-79d69261f1csi925849085a.39.2024.07.01.22.04.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:04:18 -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=h44J3IKF; 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 1sOVfr-00067U-DC; Tue, 02 Jul 2024 01:03:27 -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 1sOVfp-00064H-8m for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:26 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfi-0007gX-4T for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:25 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2ebec2f11b7so42175661fa.2 for ; Mon, 01 Jul 2024 22:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896595; x=1720501395; 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=53/vSX2DxNBsJLADWGWkRKviz9VffjPRlWD9A4UquyA=; b=h44J3IKFJNFo1CVZoQVIyuWP7fu2QjPjDvTjCIGBF/XgSCbqXPpWd+L/j8PZdefA6K PaNdIPy11gRsHe2JIpIglfV/t1rWFUL/r4VDSR0SaFuOYApK5l/w8/X47PusLgE8K9sF NsKe3FZepOjQYnpS+DmVsAnw7uuM7oTJ61P6YskW1p2/MVLSmciC/ta7056dI/jyv24e aQc37x9RQtXJvVYmvbi/GqoJXtj/LPpHBJuvwPpjYhTnlp95iuHubLGk2Q0BoaXrrKzW f0VAiqFpETddHBt6cnUCAqpcP6I/vZwjJZhDFLjNH3grmb/oCgV1AW+N4JhOYFAacdSq EwoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896595; x=1720501395; 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=53/vSX2DxNBsJLADWGWkRKviz9VffjPRlWD9A4UquyA=; b=GDLFuC0pg5Gmk/NShN69nge9dOKVhSoInemhFUvNGaDUch1f45CHJkqa1h43ntIbqK 5KShzqIYtzjeZv9ZTtssfy5QExhaEW+ZV6H/qFv1fZEN9qGd+dXkntMzoRGo00DbY/uU lCoz0DKwnOp0ycIS7QrBt4CJ5+Gj0GW/z3bhf5Xv6ShS32hb4cigv6wyaoS6x2MBs5KL pY4HqkwaRELFviSEAGEDTl6mG7GN6oo91MIpnuGOE9MxJwlqggrG0ZUTNOY70zo+PXCs zIx6cdYGGzxaLM1j6dkd2f7dBlUPg+L0qkInUMy8wOTybfWPtvNo+Cb4rZGCIRst1/kM fXzg== X-Gm-Message-State: AOJu0YwJepa28cPqZ9VQx03JAAX84j5WQyBKDnngKrxgBPLwrvBCOjBe s8YO+uNvyuRhREMSSeKx5csfFPziSwRdN6l3+zrB/TEATU0ccLfpvMxhK4IGk60ZvahljzYO8jx M X-Received: by 2002:a2e:a902:0:b0:2ee:5ec1:182f with SMTP id 38308e7fff4ca-2ee5ec11972mr63928441fa.6.1719896593167; Mon, 01 Jul 2024 22:03:13 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4257dee5f2asm91804815e9.22.2024.07.01.22.03.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:03:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 19/22] audio: Drop ifdef for macOS versions older than 12.0 Date: Tue, 2 Jul 2024 07:01:09 +0200 Message-ID: <20240702050112.35907-20-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::22c; envelope-from=philmd@linaro.org; helo=mail-lj1-x22c.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: Akihiko Odaki macOS versions older than 12.0 are no longer supported. docs/about/build-platforms.rst says: > Support for the previous major version will be dropped 2 years after > the new major version is released or when the vendor itself drops > support, whichever comes first. macOS 12.0 was released 2021: https://www.apple.com/newsroom/2021/10/macos-monterey-is-now-available/ Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240629-macos-v1-2-6e70a6b700a0@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- audio/coreaudio.m | 5 ----- 1 file changed, 5 deletions(-) diff --git a/audio/coreaudio.m b/audio/coreaudio.m index ab632b9bbb..cadd729d50 100644 --- a/audio/coreaudio.m +++ b/audio/coreaudio.m @@ -44,11 +44,6 @@ bool enabled; } coreaudioVoiceOut; -#if !defined(MAC_OS_VERSION_12_0) \ - || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_12_0) -#define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster -#endif - static const AudioObjectPropertyAddress voice_addr = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal, From patchwork Tue Jul 2 05:01:10 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: 809043 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44347wru; Mon, 1 Jul 2024 22:04:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbY2K+lTJyyTzGKNQ1CanKsSIuJpy3+UwwI4dXWMKE3OvJltjm1M8QRKwAnvjuhwQ1E4gKhf2xv+D9emPw4fnB X-Google-Smtp-Source: AGHT+IEMN6NHfT9unrs5ppT3JcCdhmLkH68u7MrFdYsuTv1CBAlic+vGeBfCLEOueZO/gwyIPF4d X-Received: by 2002:a67:f2d8:0:b0:48f:a858:2b54 with SMTP id ada2fe7eead31-48faf140919mr8623417137.26.1719896671437; Mon, 01 Jul 2024 22:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896671; cv=none; d=google.com; s=arc-20160816; b=K7BET44Suy3pdCXxDzEl0IHXs8Dv4h595HV7vfv4sJDqwjcJyGGwAwCZCbNaZcDHax ikMfVGTHoiArPRAtjnsbBckItMT7hKAYeVPLmB452zHzxh9F08VYOMs2VdsSFZmmL0ho yK173YcJMUh6SiHh0fx7ioPQ+3ru/h/75H9n+sVAPcriuMRuwJQzq30CsbGZbkCz8qHx wqBirCW3iE/Gt+bY9WC5ymrUlHljKlC9Bekr383Ng6Kr2gTlqSZ3sy2x+aa703EM6FZZ kxnXqGehEeDUJEGl8sKX/TNrRwNSZeTO2+UNKGr0Kn1xr92ypKK6vxeZsPp7bgx6Fsqd DnaA== 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=O2eqbBVThGDKqLcuplSVwKVoFglEZNBCuYlGK95Q7ps=; fh=iYRE3RIK6EzWkNtDPLyhm/eNSgPn7kzL0NqhIB5UBZY=; b=NvcwV0aRNAYOh7bkvavoOoupeGWpJzcbB28a19gY+UnDzLcwlR+bUPtCfHMjyjkprg IZ+pBKh2UbpJHahRomk/YrBDWXYIKWXohnoQTvJ69TUqS/+TP1zy4DGICYueczsvL14d dcbyAdxkEnHZh8LuecxVHSXh+yl1p0WYsqQujS3rjLhj5cYWqNpsTi6m+8Q0hEKCcnPx H0E1MQIVItAA5LQ640D9yMvCkde2bcaBCxT/YddvCxyinD9fZ+KrDzuBT4FqS8vYFX5v n7ux8bP0aMkSUftbAzq8Vq1r7zKibDz17tUsd4vhoJMrYxdctz2i+ZZzXg4uWVnyrrky t+qg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TqMKpZuM; 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-79d692f13c0si1074099085a.363.2024.07.01.22.04.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:04:31 -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=TqMKpZuM; 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 1sOVfv-0006SP-7o; Tue, 02 Jul 2024 01:03:31 -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 1sOVfu-0006Oi-5p for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:30 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfn-0007h3-QR for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:29 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42573d3f7e4so24132435e9.0 for ; Mon, 01 Jul 2024 22:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896601; x=1720501401; 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=O2eqbBVThGDKqLcuplSVwKVoFglEZNBCuYlGK95Q7ps=; b=TqMKpZuMPChSFxEkZZIPHl2Wg1aDizidsBRkOGjRHCyVYtgQhCZLHkFfwNUBSLuPxW 7IVVnXRbwGg6LxRsmT6e4/iGOUe94yfYThjuAEcgWqijzcSC1emJp38Jv8VvFNBWZ7NL GD/eh5CP2CYW3YvIKylLtF+7yirX+6McUOydV1D6RJSGJMnPspy/55WrtMdcBj4aNzn7 CxxoQIeelnb7vsLbwUhFujx6N85ES3W7k/+lAhikminP2UfzPBG80XhF1euUsk0Ppzpb 9KD4IBcktQfiebr8Nw1Nrf/H/bdplh0LiAKgV0nDzZfVCphoD+RvPLMFH+VhjGsDrzEh 86Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896601; x=1720501401; 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=O2eqbBVThGDKqLcuplSVwKVoFglEZNBCuYlGK95Q7ps=; b=IjUO3s0tWgNLSGHRRZYHbR+C5iMlxNswERBrAtytXd4GVn/oR5uIZxSPiX5TudqBq/ 6FacFbgY3rtt09aAv4APwUFY+GhR9F+G4c6YJ42B02Wnijsiclq8WMAp7Kn/UjRUJ8Bj wvGDTnyD92R2ONiGS5B3knUjfU4p0cJc0tWA18Zjn9UDqpCJp8javmPD53Fsq5liVif2 DYgt8s+hw5TM2nyhFYxBRBpj8sZq6ikNCCq+eSVPdzqV/lPmLT+swFgmtVqTRo5fPM+Q xyiPSBVH7NqaL8GQ+xROwZM3pwQWD4KzMYpzgMtHIL8Ez6KzVLW7UDX92ty1QafgK+9l ic2Q== X-Gm-Message-State: AOJu0YyZHJZN/qQ4JViIDH0+JND45/6cF7n4iBrxjSQiV4kt5qcfEeE6 u79XVyyS1vUFfTZrxR7r3XDPGJFfGAVaF4qnkk2PrsDgfjTo5idsIdmRDViZz/VIIBw6OBIHZ2K J X-Received: by 2002:a05:600c:4b1a:b0:425:618b:3a4a with SMTP id 5b1f17b1804b1-4257a0642d4mr49555235e9.25.1719896600964; Mon, 01 Jul 2024 22:03:20 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a1129ccsm11975427f8f.117.2024.07.01.22.03.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:03:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 20/22] block/file-posix: Drop ifdef for macOS versions older than 12.0 Date: Tue, 2 Jul 2024 07:01:10 +0200 Message-ID: <20240702050112.35907-21-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::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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: Akihiko Odaki macOS versions older than 12.0 are no longer supported. docs/about/build-platforms.rst says: > Support for the previous major version will be dropped 2 years after > the new major version is released or when the vendor itself drops > support, whichever comes first. macOS 12.0 was released 2021: https://www.apple.com/newsroom/2021/10/macos-monterey-is-now-available/ Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240629-macos-v1-3-6e70a6b700a0@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- block/file-posix.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index f3bd946afa..ff928b5e85 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -3929,11 +3929,6 @@ BlockDriver bdrv_file = { static kern_return_t GetBSDPath(io_iterator_t mediaIterator, char *bsdPath, CFIndex maxPathSize, int flags); -#if !defined(MAC_OS_VERSION_12_0) \ - || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_12_0) -#define IOMainPort IOMasterPort -#endif - static char *FindEjectableOpticalMedia(io_iterator_t *mediaIterator) { kern_return_t kernResult = KERN_FAILURE; From patchwork Tue Jul 2 05:01:11 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: 809038 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44169wru; Mon, 1 Jul 2024 22:03:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXPOYLVeLHNzAdXw70+UVvM/Hxtife9My4UHV5cu8cPp1lRodY/j4gVF2dJEpFIfw7xXv250K2/eiLImZ7ZIOkF X-Google-Smtp-Source: AGHT+IFLB7uox72PBKZUqDq0ecfJTE9kUDcPQ1Po8fLBcEDodPpnXs2MKPHrKsWnRbJk2H4u6JMQ X-Received: by 2002:a05:620a:4441:b0:795:5046:5872 with SMTP id af79cd13be357-79d7b9f357bmr813996285a.39.1719896634620; Mon, 01 Jul 2024 22:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896634; cv=none; d=google.com; s=arc-20160816; b=YL8S9qso8cL/EHxiRdeix5LJTp3ukJCR5nBNmX1QN4IOubAzI8iq5OFuYYN9p2TAM1 gTuceyIxAnvu/1rd2VmuBLmWzmxNnaq+3KaRUA5q+sWGOdaaz/M/OGSeGjgWRAwKIxfS lOG27Sp59J+9pMJWUpsnJgCzr4ybVq69FE4QW5VdXSdRYOVw4rtzZauq6ptOQykIwxuU Hnc1jOrzKP09XqfmYY9ABElL2wj0OuAP3yNub+mON9zyYk89wqr9StBPFT6xodYHfkkR DJpcl04Va4dke5lnZVS9ZCRsIbmNnMuqcMF9ohG2paTF7NhUoz4cq58EuT8yFPrXXhzI Zjvg== 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=gqSkcaHksS2cqMSoL7Eku8EtIEifuvQ5Pl0L19IlD0A=; fh=iYRE3RIK6EzWkNtDPLyhm/eNSgPn7kzL0NqhIB5UBZY=; b=jug788uR7jUVQEn5xMaqJiFgmU5NkzjSczxI7gSRb429w/2qGo38Nb2Nd/DDea6W5R diSnWNHh1FiVPUB3pwBghBmKHGxyaX2u8krehcjcVADR3luHt6Rm3H8OjjX5pVXHa2MO ld1TddUEvcoKeC4wMJejnu/4NGhnqH4PoKkTP8yfx74iu4zaGrTTr2D3KXonEe2WG5tN rEnR1ET4e3eX/oTZjXlBaigjEWREGGxqjsMM2/mRo+B4JhIdLdWBj+L+KivrY5JjAqKA XePCQRjt+q1tePXdGpto28WWcEC0q5nKl7CpGKDd7VkBGWBdUj4SfsuFz3BFUeC0WZ63 Sanw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B20hqhmI; 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-79d692f239asi1029447585a.331.2024.07.01.22.03.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:03:54 -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=B20hqhmI; 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 1sOVfy-0006kE-6y; Tue, 02 Jul 2024 01:03:34 -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 1sOVfw-0006Zt-Qq for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:32 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVfu-0007jH-Rx for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:32 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-36743abace4so3058669f8f.1 for ; Mon, 01 Jul 2024 22:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896607; x=1720501407; 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=gqSkcaHksS2cqMSoL7Eku8EtIEifuvQ5Pl0L19IlD0A=; b=B20hqhmICiiAkIiiB3zmghz23/lx1cZ9fsATCi+BbR+QzPjjK0Z3jrxAmbqZRJ2vRb 0FOEaxnEgyYxmQCvlLN19mvcLbvKeuutFg+EJRr6kVReiWms5FN1PK9fTAGQxXVUmsOa FCvZymuSp0cDamW6Hzt4GcjDba730lnVVla40TQYxlCrpClCAQ8unukRBpaOXzRD/ZnA /y7yyRCl6ftKQNAaJxufEMZnZ99xQwwhXHxDR+1+ClEt6jWZK7As2xtLC53kFFJ+DeP/ QcEDjWqbiJwrvjiq9LbsP3UPXE7ojXPbwEkssem0IOpkuJON1AuTzp9YhzKtrtI36fft lm3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896607; x=1720501407; 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=gqSkcaHksS2cqMSoL7Eku8EtIEifuvQ5Pl0L19IlD0A=; b=O67VmY5/h93uTViBULVI0far57HI3p/On7Eqie4EpdfutieUD+svqUawcMW38YVVxM WhQ6vCFDz/11jc4dPWtAiNgLz1zHpy3q70jeFR6VJD5nwEczuxjZmNL2Jz6UehOcJBFD 4H6wYl1njp30m3IAivcypWj3dYUHWvyepSH68HAMBS6drDIePP3Cuymka62YhD8Eqv2M j3J6CJlKY9JMLga2QLO4C3tP5cWdg9YdL2jPhXoRIpFgUfAFr8lcVn59HhGBb6ybSzSV A+6lXO3UAr8TCFk9JShDXQAmvj7RNOtfBbfVjKcyuaiQ937bBE8nlH3jK5dS1rRdur5e wOcQ== X-Gm-Message-State: AOJu0YxwSyQsTFn6g8AW5bpNRh37QPugHUxpj5ccJos33l1CpIht7KoC x1XqEt0gkloJBRkLpf/ZQv3kBx0hsTHjTpzXVOwj6HAx3GA1eY1CB59glBXzEuztX5AEqLwd+KH G X-Received: by 2002:a5d:5987:0:b0:363:776:821b with SMTP id ffacd0b85a97d-3676045b4a0mr10874244f8f.0.1719896606899; Mon, 01 Jul 2024 22:03:26 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0fc4c9sm11968503f8f.86.2024.07.01.22.03.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:03:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 21/22] net/vmnet: Drop ifdef for macOS versions older than 12.0 Date: Tue, 2 Jul 2024 07:01:11 +0200 Message-ID: <20240702050112.35907-22-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::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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: Akihiko Odaki macOS versions older than 12.0 are no longer supported. docs/about/build-platforms.rst says: > Support for the previous major version will be dropped 2 years after > the new major version is released or when the vendor itself drops > support, whichever comes first. macOS 12.0 was released 2021: https://www.apple.com/newsroom/2021/10/macos-monterey-is-now-available/ Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240629-macos-v1-4-6e70a6b700a0@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- net/vmnet-host.c | 24 +----------------------- net/vmnet-shared.c | 13 ------------- net/vmnet-bridged.m | 13 +------------ net/vmnet-common.m | 3 --- 4 files changed, 2 insertions(+), 51 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index 1f95f7343a..49fb25c224 100644 --- a/net/vmnet-host.c +++ b/net/vmnet-host.c @@ -21,31 +21,13 @@ static bool validate_options(const Netdev *netdev, Error **errp) { const NetdevVmnetHostOptions *options = &(netdev->u.vmnet_host); - -#if defined(MAC_OS_VERSION_11_0) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 - QemuUUID net_uuid; + if (options->net_uuid && qemu_uuid_parse(options->net_uuid, &net_uuid) < 0) { error_setg(errp, "Invalid UUID provided in 'net-uuid'"); return false; } -#else - if (options->has_isolated) { - error_setg(errp, - "vmnet-host.isolated feature is " - "unavailable: outdated vmnet.framework API"); - return false; - } - - if (options->net_uuid) { - error_setg(errp, - "vmnet-host.net-uuid feature is " - "unavailable: outdated vmnet.framework API"); - return false; - } -#endif if ((options->start_address || options->end_address || @@ -71,9 +53,6 @@ static xpc_object_t build_if_desc(const Netdev *netdev) vmnet_operation_mode_key, VMNET_HOST_MODE); -#if defined(MAC_OS_VERSION_11_0) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 - xpc_dictionary_set_bool(if_desc, vmnet_enable_isolation_key, options->isolated); @@ -85,7 +64,6 @@ static xpc_object_t build_if_desc(const Netdev *netdev) vmnet_network_identifier_key, net_uuid.data); } -#endif if (options->start_address) { xpc_dictionary_set_string(if_desc, diff --git a/net/vmnet-shared.c b/net/vmnet-shared.c index 40c7306a75..4726b07253 100644 --- a/net/vmnet-shared.c +++ b/net/vmnet-shared.c @@ -21,16 +21,6 @@ static bool validate_options(const Netdev *netdev, Error **errp) { const NetdevVmnetSharedOptions *options = &(netdev->u.vmnet_shared); -#if !defined(MAC_OS_VERSION_11_0) || \ - MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_11_0 - if (options->has_isolated) { - error_setg(errp, - "vmnet-shared.isolated feature is " - "unavailable: outdated vmnet.framework API"); - return false; - } -#endif - if ((options->start_address || options->end_address || options->subnet_mask) && @@ -76,14 +66,11 @@ static xpc_object_t build_if_desc(const Netdev *netdev) options->subnet_mask); } -#if defined(MAC_OS_VERSION_11_0) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 xpc_dictionary_set_bool( if_desc, vmnet_enable_isolation_key, options->isolated ); -#endif return if_desc; } diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m index 76a28abe79..a04a14fa11 100644 --- a/net/vmnet-bridged.m +++ b/net/vmnet-bridged.m @@ -88,15 +88,6 @@ static bool validate_options(const Netdev *netdev, Error **errp) return false; } -#if !defined(MAC_OS_VERSION_11_0) || \ - MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_11_0 - if (options->has_isolated) { - error_setg(errp, - "vmnet-bridged.isolated feature is " - "unavailable: outdated vmnet.framework API"); - return false; - } -#endif return true; } @@ -115,12 +106,10 @@ static xpc_object_t build_if_desc(const Netdev *netdev) vmnet_shared_interface_name_key, options->ifname); -#if defined(MAC_OS_VERSION_11_0) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 xpc_dictionary_set_bool(if_desc, vmnet_enable_isolation_key, options->isolated); -#endif + return if_desc; } diff --git a/net/vmnet-common.m b/net/vmnet-common.m index 2958283485..30c4e53c13 100644 --- a/net/vmnet-common.m +++ b/net/vmnet-common.m @@ -47,11 +47,8 @@ return "buffers exhausted in kernel"; case VMNET_TOO_MANY_PACKETS: return "packet count exceeds limit"; -#if defined(MAC_OS_VERSION_11_0) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 case VMNET_SHARING_SERVICE_BUSY: return "conflict, sharing service is in use"; -#endif default: return "unknown vmnet error"; } From patchwork Tue Jul 2 05:01:12 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: 809040 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp44273wru; Mon, 1 Jul 2024 22:04:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX9W7k0FWTaKYGWmpCZQInRkyjyQyFXsE7lvn0PifW1UjJmi1txHuGYJ3i0BciXvpkPxbSPspdHGv01WzRHHXzF X-Google-Smtp-Source: AGHT+IEwZWwXm7Yb9Zxhm37LBWJlGfmw2oXeME4T/bwcJxhFbyzPY5/3xH5R66A0bfDnTBl8QEYF X-Received: by 2002:ad4:5de8:0:b0:6b0:7fcf:36b1 with SMTP id 6a1803df08f44-6b5b719d283mr78502216d6.41.1719896655913; Mon, 01 Jul 2024 22:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719896655; cv=none; d=google.com; s=arc-20160816; b=ySs+00hxaXYsegnxvCr0KJQhofXD1iQA1+P3UrJpj5+e2rJWgS87Co0lbp/U6Y8WPs wILTgEcqWHKpri6FWmDvh9hf3dvOqibRcXHaiZZfdgTUKpiG+KOE7VeX1v6j0s89Nt8B vMJ7Z7QtUG7UrIUFcqM8vh9oPCQx/rWpKcwGeMeAl2SToigS97pFGXvM6JsNddKJpmKC o5e8eb9RtIlFAvo4pNaUM466lnUP7VTkqz6qS83b2onR1a+rBckGY6g2K1H+Lbd1K6t6 QfCvAwcRt52mKogUlSh8IU1M0mmSPvhbi/OZHnCcgAjEC79ZS60ZwnOCB7eTxab2/Hsd 1Y8w== 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=+91gvHB50PukN639vXpRuhbPnrJzG8qgNtIT0wpdvQ0=; fh=tk/NJvRBswTDUQ4h9zZ2MpRGwvPwLdskBwMxR7Gz0gc=; b=Om9fkpNf1WLMan3gIjGNEgaUaPZCl3UQSRUnGWo+/eVlDssnbaLi59Kie0Rhkf85ao 4SPAht8qy+nCkMxUU+KPMnEKdj3PcyyWw4p+y84PIIyW0FEY+pRiR8O7nLDDHZKJUbat +/IVdtP9UG8O2t2CWSJZh1zBD1b8CAXwgxr8J77bGm8XusgyoDEF6TCscrhRt7AlDFnH kqt4KCLWYKoQs4Msxl5eiEOS1AZbmvXWZRF2fHjMZMQ9S/52qlUJBw/byB+39M66FiID VOr2kQPQ3wtqN8PAPQHy9ZZLVgcOIke7hiAmpqZ8RCJA2RiNiixXmv0t5YkLXA1LnO9B 9low==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HHvVaW6j; 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 6a1803df08f44-6b59e60bd7esi95913616d6.510.2024.07.01.22.04.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2024 22:04:15 -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=HHvVaW6j; 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 1sOVg3-0007CE-0J; Tue, 02 Jul 2024 01:03:39 -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 1sOVg1-00077t-Se for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:37 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOVg0-0007kr-6Z for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:03:37 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42563a9fa58so26603305e9.0 for ; Mon, 01 Jul 2024 22:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719896614; x=1720501414; 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=+91gvHB50PukN639vXpRuhbPnrJzG8qgNtIT0wpdvQ0=; b=HHvVaW6juuLgxK7PB7wAVnYYhmvsAO2Q/FIWE7nUJ3AlmRa8iSUhmgLun0mK/Ce4ZI HLnavpyJrDkwHDzW95LWARnxszf/cbsYXLwJx/yBuyHBXPidrb5QpXJ+OnglTYCL2wdD v788O5D8hva7xMO8Rd/o10WrxtZ+h6tU86poeYJHSJnjI4NKzX3dusV2ds2KCuQi12sK 1aKwOJ2hKJHuWQF8RGsY38IPE6gUHQGd/Km9+UFK0yu3fWgyrzAqj0ZLWPnBzZZxMAFT 9/8YBbew2Ynl71HszuQ+5XDm/msQ5RUUyA7pRF/Q/nJeVnQK0LRuF3XWsNtyCz0f1ADZ 1oBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719896614; x=1720501414; 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=+91gvHB50PukN639vXpRuhbPnrJzG8qgNtIT0wpdvQ0=; b=hQfifEeeAF4LdMKoOI30iHqVo1meSbTVS9PVb5xmw+HCFxWE+8pExP/1J6X5smffp9 Ytdm4epI8hshveNrHNfdCdxXSz93+51JoqA5SNSsGowJry7ynZH9ug75NFilUqn7MzRk o2h9VICHdHs3dGln1T6NGiHKsnTO042f/jY0tQ38isOTH9LoTcCBbO3AvUk985r5qhx/ k4raDuVEQRcVe86R6fqnKkp8WtdnRoCo2Nbzsfk+l8WE/8m1RMgU1LrIsrHW4Z8CfJdC DrzCABQ1XTRgOAGKGwDAMvEHuwLEPA4hdpWsldSCJxqpJYd8mu5augFUhPHZjmNcNQA3 u1wA== X-Gm-Message-State: AOJu0YyGo7LnSoUfSo0T04p4VnH5xf511cy4s82j9t5NFaV+Bh3S7dEn M7QycsCzEOduPkPQQLT7+SoguBtyolBzrgHkFikBJwnkXd+cRrtlQQqk7AbyrzJokooE5puPYWy U X-Received: by 2002:a05:600c:3b09:b0:424:7bcf:2486 with SMTP id 5b1f17b1804b1-4257a00aadamr43499815e9.4.1719896613926; Mon, 01 Jul 2024 22:03:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b061eedsm173093075e9.26.2024.07.01.22.03.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 01 Jul 2024 22:03:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 22/22] Remove inclusion of hw/hw.h from files that don't need it Date: Tue, 2 Jul 2024 07:01:12 +0200 Message-ID: <20240702050112.35907-23-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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: Thomas Huth hw/hw.h only contains the prototype of hw_error() nowadays, so files that don't use this function don't need to include this header. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Reviewed-by: Peter Maydell Message-ID: <20240701132649.58345-1-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/xlnx-cfi-if.h | 1 - hw/misc/edu.c | 1 - hw/vfio/container.c | 1 - 3 files changed, 3 deletions(-) diff --git a/include/hw/misc/xlnx-cfi-if.h b/include/hw/misc/xlnx-cfi-if.h index f9bd12292d..5010401517 100644 --- a/include/hw/misc/xlnx-cfi-if.h +++ b/include/hw/misc/xlnx-cfi-if.h @@ -11,7 +11,6 @@ #define XLNX_CFI_IF_H 1 #include "qemu/help-texts.h" -#include "hw/hw.h" #include "qom/object.h" #define TYPE_XLNX_CFI_IF "xlnx-cfi-if" diff --git a/hw/misc/edu.c b/hw/misc/edu.c index fa052c44db..504178b4a2 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -26,7 +26,6 @@ #include "qemu/log.h" #include "qemu/units.h" #include "hw/pci/pci.h" -#include "hw/hw.h" #include "hw/pci/msi.h" #include "qemu/timer.h" #include "qom/object.h" diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 2e7ecdf10e..88ede913d6 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -26,7 +26,6 @@ #include "exec/address-spaces.h" #include "exec/memory.h" #include "exec/ram_addr.h" -#include "hw/hw.h" #include "qemu/error-report.h" #include "qemu/range.h" #include "sysemu/reset.h"