[PATCH] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()

Philippe Mathieu-Daudé posted 1 patch 3 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260113203924.81560-1-philmd@linaro.org
Maintainers: Reinoud Zandijk <reinoud@netbsd.org>
target/i386/nvmm/nvmm-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Posted by Philippe Mathieu-Daudé 3 weeks, 5 days ago
Fix typo to avoid the following build failure:

  target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
  target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member named 'vcpu_dirty'
    988 |     qcpu->vcpu_dirty = true;
        |         ^~

Cc: qemu-stable@nongnu.org
Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic CPUState::vcpu_dirty field")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Untested.
---
 target/i386/nvmm/nvmm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c
index b9bd9ed985a..f808828d492 100644
--- a/target/i386/nvmm/nvmm-all.c
+++ b/target/i386/nvmm/nvmm-all.c
@@ -985,7 +985,7 @@ nvmm_init_vcpu(CPUState *cpu)
         }
     }
 
-    qcpu->vcpu_dirty = true;
+    cpu->vcpu_dirty = true;
     cpu->accel = qcpu;
 
     return 0;
-- 
2.52.0


Re: [PATCH] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Posted by Philippe Mathieu-Daudé 3 weeks, 3 days ago
On 13/1/26 21:39, Philippe Mathieu-Daudé wrote:
> Fix typo to avoid the following build failure:
> 
>    target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
>    target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member named 'vcpu_dirty'
>      988 |     qcpu->vcpu_dirty = true;
>          |         ^~
> 
> Cc: qemu-stable@nongnu.org
> Reported-by: Thomas Huth <thuth@redhat.com>
> Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic CPUState::vcpu_dirty field")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Untested.
> ---
>   target/i386/nvmm/nvmm-all.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Queued via accel-next tree, thanks.

Re: [PATCH] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Posted by Pierrick Bouvier 3 weeks, 3 days ago
On 1/13/26 12:39 PM, Philippe Mathieu-Daudé wrote:
> Fix typo to avoid the following build failure:
> 
>    target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
>    target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member named 'vcpu_dirty'
>      988 |     qcpu->vcpu_dirty = true;
>          |         ^~
> 
> Cc: qemu-stable@nongnu.org
> Reported-by: Thomas Huth <thuth@redhat.com>
> Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic CPUState::vcpu_dirty field")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Untested.
> ---
>   target/i386/nvmm/nvmm-all.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c
> index b9bd9ed985a..f808828d492 100644
> --- a/target/i386/nvmm/nvmm-all.c
> +++ b/target/i386/nvmm/nvmm-all.c
> @@ -985,7 +985,7 @@ nvmm_init_vcpu(CPUState *cpu)
>           }
>       }
>   
> -    qcpu->vcpu_dirty = true;
> +    cpu->vcpu_dirty = true;
>       cpu->accel = qcpu;
>   
>       return 0;

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

Regards,
Pierrick

Re: [PATCH] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Posted by Michael Tokarev 3 weeks, 4 days ago
On 1/13/26 23:39, Philippe Mathieu-Daudé wrote:
> Fix typo to avoid the following build failure:
> 
>    target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
>    target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member named 'vcpu_dirty'
>      988 |     qcpu->vcpu_dirty = true;
>          |         ^~
> 
> Cc: qemu-stable@nongnu.org
> Reported-by: Thomas Huth <thuth@redhat.com>
> Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic CPUState::vcpu_dirty field")

Hmm..  This commit is in 10.1 already, we had another
release since that, 10.2.

Is this code being used at all?

Maybe it should have some tests?

Thanks,

/mjt

Re: [PATCH] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Posted by Philippe Mathieu-Daudé 3 weeks, 4 days ago
On 14/1/26 16:11, Michael Tokarev wrote:
> On 1/13/26 23:39, Philippe Mathieu-Daudé wrote:
>> Fix typo to avoid the following build failure:
>>
>>    target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
>>    target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no 
>> member named 'vcpu_dirty'
>>      988 |     qcpu->vcpu_dirty = true;
>>          |         ^~
>>
>> Cc: qemu-stable@nongnu.org
>> Reported-by: Thomas Huth <thuth@redhat.com>
>> Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic 
>> CPUState::vcpu_dirty field")
> 
> Hmm..  This commit is in 10.1 already, we had another
> release since that, 10.2.
> 
> Is this code being used at all?

Apparently yes, in NetBSD. See around this thread:

https://lore.kernel.org/qemu-devel/ea1e0e45-f864-4a43-a40e-48fd82c26c56@redhat.com/

> 
> Maybe it should have some tests?
> 
> Thanks,
> 
> /mjt


Re: [PATCH] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Posted by Thomas Huth 3 weeks, 4 days ago
On 13/01/2026 21.39, Philippe Mathieu-Daudé wrote:
> Fix typo to avoid the following build failure:
> 
>    target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
>    target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member named 'vcpu_dirty'
>      988 |     qcpu->vcpu_dirty = true;
>          |         ^~
> 
> Cc: qemu-stable@nongnu.org
> Reported-by: Thomas Huth <thuth@redhat.com>
> Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic CPUState::vcpu_dirty field")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Untested.
> ---
>   target/i386/nvmm/nvmm-all.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c
> index b9bd9ed985a..f808828d492 100644
> --- a/target/i386/nvmm/nvmm-all.c
> +++ b/target/i386/nvmm/nvmm-all.c
> @@ -985,7 +985,7 @@ nvmm_init_vcpu(CPUState *cpu)
>           }
>       }
>   
> -    qcpu->vcpu_dirty = true;
> +    cpu->vcpu_dirty = true;
>       cpu->accel = qcpu;
>   
>       return 0;

Thanks, this fixes the issue:

Tested-by: Thomas Huth <thuth@redhat.com>