From patchwork Thu Jan 11 16:18:17 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: 761859 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2481382wrz; Thu, 11 Jan 2024 08:18:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgeTFCY6HZw8tgLADQ/A6u/qsp72wT5FC8Ch6BWvBo0s7RP/M4CwHI1oay+k24/oKtH9x6 X-Received: by 2002:ad4:5dea:0:b0:680:c1e5:e488 with SMTP id jn10-20020ad45dea000000b00680c1e5e488mr1414402qvb.36.1704989924047; Thu, 11 Jan 2024 08:18:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704989924; cv=none; d=google.com; s=arc-20160816; b=WWp3tLh8/NCwhrUGJFRDeGzj2bPzX+qjHDzrS0Alne9yLgAzRwRFFmRC3RSU9ZsBuQ 55p1FwOUwYQPBSIUoXfhJg0t6uUgEgMKoeK8qF4GzVhNOn3ZZZrvd3/FWykOI1QGwTND Z8sU0peW7sN8brymfrXTY2oZ0D+KDnLepQIFPG0u8DbEvUtgzhc5/I2SHt5n3UKQNpan bFAGvqw7bNW/bGokmPv3GMaj+wTOdh+svQ8epZ50bY+yM94WeLhjefzugGI2Dd0nZAzn gPfWemNWgBTtNtVb593x9dVB8194sArI0hXKJ4DRvnKocXC65nd+Tgrjt9Z2QcmPgoT1 vQng== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=iBaC+OwHzKvcn1f2u1m/q9TkGb6ArrXjBtpZSrOCvGc=; fh=5gGtEWbs/bc4ZS50ZuMZZ2I/Jn5oaYqe3uWxuR8fBxU=; b=N/mbupFP7XZqaeyV/0WukukXThhOWPbw6iMvi+5+VKJRujqWf6fuToG/lt99UcV1dD SAPDnbbiJDKNTMHpUJLwU+TCXnYOV7hEKY9oOBpb3JNNGssHke1M5IT/kqVn4NuBnd41 KQTP1UGJ8rziSUdzNJsnMMrpg6jfs9rgbbo3MJ32HiVrT4oIgG+0/n3Hiwd2rv1Wghpf +DR9lcOhNTn1e+Ndk6Q6ldvxcgXAo4zfEGWEL67OOr6GiTvn2un+4jUWXqFQaKeM64tg Ny0pGkiWybpDVbQzTdV+oCagIdVsz3P1WujVrbPlTrpBhd74i5/Y5nCfq10rMvZDvWsF /kNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UaabjqAL; 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 c10-20020a0ca9ca000000b0067f3a4caa55si1025665qvb.450.2024.01.11.08.18.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jan 2024 08:18:44 -0800 (PST) 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=UaabjqAL; 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 1rNxlG-0001Bo-9w; Thu, 11 Jan 2024 11:18:30 -0500 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 1rNxlD-0001A7-Js for qemu-devel@nongnu.org; Thu, 11 Jan 2024 11:18:27 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNxlA-0006GD-FC for qemu-devel@nongnu.org; Thu, 11 Jan 2024 11:18:27 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40e60e1373bso7320825e9.1 for ; Thu, 11 Jan 2024 08:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704989901; x=1705594701; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iBaC+OwHzKvcn1f2u1m/q9TkGb6ArrXjBtpZSrOCvGc=; b=UaabjqALGnCxiydqokHvGc46tLVJweFRv7q1JZGx+mWrsymOMhYUrQkbR5Ocw1ermr fYEeKvrQTOkG/9YjAkUv5m2QnlhBZIlPJL0iuDcZk3YH99OgP5OXacOyjo/QWtpwE07n jsGpeQIw111zrx1QZyTpU/tDWxIByS5LrZ/wlfbYtNkqk/bmkyQrZX3HHUoRClIj+9oI gDQOvZnh4JYZq8jNOss4UZNtnUrIsG4WFBAENYB4nMv41KJ6F1JWVmtGprTc78FZb80Y 4smvN5ZlbKkY/3BYRYjwaN6r97GnoYa18eGFpYd2B8r+HoghILAvPFeeeFrZKS7b7w9J yo0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704989901; x=1705594701; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iBaC+OwHzKvcn1f2u1m/q9TkGb6ArrXjBtpZSrOCvGc=; b=GDWTZ5X3LuM+c8h3Q3b8v8HsYiqdDkRG4kL33O8j75ZJ7HVvNmAWgmip9BbdDk7lVX ZedZr8JdXU3UBi31HAcN3tXblElu3LkgAXoiWlKdssiT/af0a7DbOE7NTk8b4hPuPN// Y7rbyouFlwxC4xDG8Fhlse1JhlTx4FPdvGJ2xakaZUv+KG5Ovc3qz0h4Z/iqg/zoY2Os F78WSzffckuBo8TSAzWT1v5ATrQBYiixvzMUoXikDGYlDVos/uZLIR2LZVtBvPj3o2yO giNJFgCEFYZgUSskwujT7JXBrwAtdQNO1pJYU4C1sqT2Mj4TCWCLygCeGuUb1Af99wA5 SKlQ== X-Gm-Message-State: AOJu0Yx+3IbMPokEJUjt+9/LDq4LS52wdWynzI4dx0JO7kKUs+OY633/ EOPhNBXO82jB8DwFr6Mm5CDUcb/GEF6ysG9GXOh3r+VUVwng3A== X-Received: by 2002:a7b:c8c3:0:b0:40e:43b1:8d9 with SMTP id f3-20020a7bc8c3000000b0040e43b108d9mr44281wml.58.1704989900899; Thu, 11 Jan 2024 08:18:20 -0800 (PST) Received: from m1x-phil.lan ([176.187.202.145]) by smtp.gmail.com with ESMTPSA id u17-20020a05600c19d100b0040e47dc2e8fsm2445400wmq.6.2024.01.11.08.18.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 11 Jan 2024 08:18:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH] cpus: Restrict 'start-powered-off' property to system emulation Date: Thu, 11 Jan 2024 17:18:17 +0100 Message-ID: <20240111161817.43150-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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, T_SCC_BODY_TEXT_LINE=-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 Since the CPUState::start-powered-off property is irrelevant to user emulation, restrict it to system emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- cpu-target.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpu-target.c b/cpu-target.c index c4ea795bdd..7e4241c33d 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -206,6 +206,7 @@ static Property cpu_common_props[] = { DEFINE_PROP_END_OF_LIST(), }; +#ifndef CONFIG_USER_ONLY static bool cpu_get_start_powered_off(Object *obj, Error **errp) { CPUState *cpu = CPU(obj); @@ -217,12 +218,13 @@ static void cpu_set_start_powered_off(Object *obj, bool value, Error **errp) CPUState *cpu = CPU(obj); cpu->start_powered_off = value; } +#endif void cpu_class_init_props(DeviceClass *dc) { +#ifndef CONFIG_USER_ONLY ObjectClass *oc = OBJECT_CLASS(dc); - device_class_set_props(dc, cpu_common_props); /* * We can't use DEFINE_PROP_BOOL in the Property array for this * property, because we want this to be settable after realize. @@ -230,6 +232,9 @@ void cpu_class_init_props(DeviceClass *dc) object_class_property_add_bool(oc, "start-powered-off", cpu_get_start_powered_off, cpu_set_start_powered_off); +#endif + + device_class_set_props(dc, cpu_common_props); } void cpu_exec_initfn(CPUState *cpu)