Received: by 2002:a17:906:2b99:b0:a2e:1324:ea5c with SMTP id m25csp880568ejg; Fri, 19 Jan 2024 03:41:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdc3BrzL6kLqwB6Ss0+5scD7KzChi/2Cx8cBe5JUlczIT/riHhxxNkozm31KsjxuWH5eJA X-Received: by 2002:ad4:5d4c:0:b0:67f:3991:ef38 with SMTP id jk12-20020ad45d4c000000b0067f3991ef38mr2428536qvb.122.1705664468429; Fri, 19 Jan 2024 03:41:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705664468; cv=none; d=google.com; s=arc-20160816; b=JBJJ5+18c1z+/4CqCFMV5lkMKIz3TCDkbSgp7M9XjHcfoKx41fOToklGvH9wDgdo8T XaOWr7NYzpVYf3I5YJk5s2wdaqWBO4qlXR3AbVC5uV8h8PSowxdC3HrMcCcsflptJ/Rz 1SzwPmgSsHEX0i3OxiLsEQHRL5kN6IwQBEMUfavGVqu9uskTFQtJV5/Gb0Mi7Eq8RMMC GoRaIyj9sYD6Vd0+60qPdAF1LtAaQXaNzSzdGFVP8QSkOx20Te5jricYLYWHnQG6DmNs 9w8X9dehnopubCa1WdWIhycaO7y79X/Bdzsxph1qIdxwmZpXAkGeWhhb1fhipIcFSxSa PxHA== 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=PGnKshp2dblbP34WXgQWGaL1yrp+GbmQPwxQyTF5AbQ=; fh=0x3oxSDM+3B1iq7MNcEDPiiYDxF4jnBXeQY/LXh8Yxc=; b=LadpE4rFtxQSD7QCajkzVwbchwX6Y5o8dXYgYNl+6VTpk45TSlr84z/TSfXM+8OIbJ PyYP93wQNHuZ1RtGBzcYhuDyNQ7dDh0t5Oi0ZsnU82DnLNZsfP1t2UxttyAoWbh9wV+F TPRKYhxybOC4oImRNDK3L2G6lXE45QkskNV1hrpvPjRmRiapcnlbo27P3QZVdWnBKoUy 7lpD88AenlUkrLIhfZBbhyPyBkjrQYT/7T0NF4oF8pRESiAuE9D/HGhupEYBa0j37E3W qs2EvGcluS1QyOE2EN4O5NTdAZuvMcvxKkMwNwxBXd9GTKocYbWyGepRAClcFQgQQtBH cDMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ad8LJFtb; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=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 m6-20020a0cac46000000b0067f4a6eca31si15656270qvb.65.2024.01.19.03.41.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2024 03:41:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ad8LJFtb; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=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 1rQnBF-0004on-9c; Fri, 19 Jan 2024 06:37:01 -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 1rQnBB-0004HT-9Z for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:36:57 -0500 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 1rQnB8-0002t2-6V for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:36:57 -0500 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2cd8bd6ce1bso7131971fa.1 for ; Fri, 19 Jan 2024 03:36:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705664212; x=1706269012; 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=PGnKshp2dblbP34WXgQWGaL1yrp+GbmQPwxQyTF5AbQ=; b=Ad8LJFtbUR1zTKQ1LibiGOkAabxSdds05YJcqJ6KCS3xqkDajw+nwIqOdnlG9M75Oh Y/1KgUZ8aOQ66J9uNt2U/9VCvP5h4oRR6y4EdKJxNHdM71P4AC/4eiB9rmqk5XwHTuzh ncZfF3RdT/tQDyqdh/kWSby7jyIkDnSACF9+7PGCN6wexK9QJYkuu5LSJbEY6eERC50k 9Q/U7G3abIiOyZlt8HjRLQEpG0XchwMj5BqJqQLbTSbvYVGTECyu2USorekfKcsp3vgu uWx5aQU5NJa+P/L5mAvCTaSa1pYBMiAVihGVBKJFrApxU2FFDAW9unePCTu7pgCahSSY aL/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705664212; x=1706269012; 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=PGnKshp2dblbP34WXgQWGaL1yrp+GbmQPwxQyTF5AbQ=; b=PichCJiPwFrRlZqu6AVKDeobHaCnqvroZtQqU77aoRgkjwzGRjDb6f2XG+Xz/1P6Ex y8CCBTVCnsTi2eUTOBT82Rb50BfN/IQnzeCIBCiys0rvOhAF5rpl2l5RJZ4KUsn+VB/Y 1+HrW6eSgkZtAdWQzymkfdcBVXUfM5P+Jr1K1qau/N+EGgUEBcTXARlZXGRjli401eO0 x3bXw3eEtA+EklREN+Ioublt17RBPRIbtortv1Ydpav8arMicesH6CkturmPLQKwa8Cs GPfRMwmTof48ItkDeZ9/FnjfhKuqtxazi+C0WE8GsQ93IVfeKG4PUKS6i2xppz8QeoP9 FWCQ== X-Gm-Message-State: AOJu0YxF9j6q4R+/2j8Qs9wmaQUKKreUpzjDWJMyTh79blG5W2pqZbNp qPImgb5X3cVSDOK8hptzNkHCA3au+N2E+NLfxEPtmpxC4tbrz38p+NVYfdjrl5/4aT36SseRZ3c Ub0efHA== X-Received: by 2002:a2e:7802:0:b0:2cc:da2a:d266 with SMTP id t2-20020a2e7802000000b002ccda2ad266mr1006821ljc.71.1705664212183; Fri, 19 Jan 2024 03:36:52 -0800 (PST) Received: from localhost.localdomain (91-163-26-170.subs.proxad.net. [91.163.26.170]) by smtp.gmail.com with ESMTPSA id l9-20020a056000022900b00337d980a68asm1941011wrz.106.2024.01.19.03.36.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 19 Jan 2024 03:36:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Paolo Bonzini Subject: [PULL 23/36] cpus: Restrict 'start-powered-off' property to system emulation Date: Fri, 19 Jan 2024 12:34:52 +0100 Message-ID: <20240119113507.31951-24-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240119113507.31951-1-philmd@linaro.org> References: <20240119113507.31951-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: -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=unavailable 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+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: 0OBLmisWcLiM 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 Message-Id: <20240111161817.43150-1-philmd@linaro.org> --- cpu-target.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpu-target.c b/cpu-target.c index d51adfd7e3..f6e07c3deb 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -204,6 +204,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); @@ -215,12 +216,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. @@ -228,6 +230,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) -- 2.41.0