[PATCH 1/2] hw/core/cpu: Expose CPUState::start_powered_off docstring

Philippe Mathieu-Daudé posted 2 patches 3 days, 21 hours ago
Maintainers: Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Max Filippov <jcmvbkbc@gmail.com>
[PATCH 1/2] hw/core/cpu: Expose CPUState::start_powered_off docstring
Posted by Philippe Mathieu-Daudé 3 days, 21 hours ago
The comment about @start_powered_off is buried within the
CPUState structure. Hoist it to the structure docstring
comment.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/hw/core/cpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index fb788ca1107..f88765e525c 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -412,6 +412,7 @@ struct qemu_work_item;
  *   QOM parent.
  *   Under TCG this value is propagated to @tcg_cflags.
  *   See TranslationBlock::TCG CF_CLUSTER_MASK.
+ * @start_powered_off: Indicates whether the CPU starts in powered-off state.
  * @tcg_cflags: Pre-computed cflags for this cpu.
  * @nr_threads: Number of threads within this CPU core.
  * @thread: Host thread details, only live once @created is #true
@@ -496,7 +497,6 @@ struct CPUState {
     bool stop;
     bool stopped;
 
-    /* Should CPU start in powered-off state? */
     bool start_powered_off;
 
     bool unplug;
-- 
2.51.0


Re: [PATCH 1/2] hw/core/cpu: Expose CPUState::start_powered_off docstring
Posted by Richard Henderson 3 days, 21 hours ago
On 9/24/25 10:40, Philippe Mathieu-Daudé wrote:
> The comment about @start_powered_off is buried within the
> CPUState structure. Hoist it to the structure docstring
> comment.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/hw/core/cpu.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

> 
> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
> index fb788ca1107..f88765e525c 100644
> --- a/include/hw/core/cpu.h
> +++ b/include/hw/core/cpu.h
> @@ -412,6 +412,7 @@ struct qemu_work_item;
>    *   QOM parent.
>    *   Under TCG this value is propagated to @tcg_cflags.
>    *   See TranslationBlock::TCG CF_CLUSTER_MASK.
> + * @start_powered_off: Indicates whether the CPU starts in powered-off state.
>    * @tcg_cflags: Pre-computed cflags for this cpu.
>    * @nr_threads: Number of threads within this CPU core.
>    * @thread: Host thread details, only live once @created is #true
> @@ -496,7 +497,6 @@ struct CPUState {
>       bool stop;
>       bool stopped;
>   
> -    /* Should CPU start in powered-off state? */
>       bool start_powered_off;
>   
>       bool unplug;