[PATCH 02/13] include/system/hvf: missing vaddr include

Pierrick Bouvier posted 13 patches 5 months, 2 weeks ago
There is a newer version of this series
[PATCH 02/13] include/system/hvf: missing vaddr include
Posted by Pierrick Bouvier 5 months, 2 weeks ago
On MacOS x86_64:
In file included from ../target/i386/hvf/x86_task.c:13:
/Users/runner/work/qemu/qemu/include/system/hvf.h:42:5: error: unknown type name 'vaddr'
    vaddr pc;
    ^
/Users/runner/work/qemu/qemu/include/system/hvf.h:43:5: error: unknown type name 'vaddr'
    vaddr saved_insn;
    ^
/Users/runner/work/qemu/qemu/include/system/hvf.h:45:5: error: type name requires a specifier or qualifier
    QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
    ^
/Users/runner/work/qemu/qemu/include/system/hvf.h:45:18: error: a parameter list without types is only allowed in a function definition
    QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
                 ^
/Users/runner/work/qemu/qemu/include/system/hvf.h:45:36: error: expected ';' at end of declaration list
    QTAILQ_ENTRY(hvf_sw_breakpoint) entry;

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 include/system/hvf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/system/hvf.h b/include/system/hvf.h
index 730f927f034..356fced63e3 100644
--- a/include/system/hvf.h
+++ b/include/system/hvf.h
@@ -15,6 +15,7 @@
 
 #include "qemu/accel.h"
 #include "qom/object.h"
+#include "exec/vaddr.h"
 
 #ifdef COMPILING_PER_TARGET
 #include "cpu.h"
-- 
2.47.2
Re: [PATCH 02/13] include/system/hvf: missing vaddr include
Posted by Philippe Mathieu-Daudé 5 months, 2 weeks ago
Hi Pierrick,

On 29/4/25 06:59, Pierrick Bouvier wrote:
> On MacOS x86_64:
> In file included from ../target/i386/hvf/x86_task.c:13:
> /Users/runner/work/qemu/qemu/include/system/hvf.h:42:5: error: unknown type name 'vaddr'
>      vaddr pc;
>      ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:43:5: error: unknown type name 'vaddr'
>      vaddr saved_insn;
>      ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:5: error: type name requires a specifier or qualifier
>      QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
>      ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:18: error: a parameter list without types is only allowed in a function definition
>      QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
>                   ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:36: error: expected ';' at end of declaration list
>      QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   include/system/hvf.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/include/system/hvf.h b/include/system/hvf.h
> index 730f927f034..356fced63e3 100644
> --- a/include/system/hvf.h
> +++ b/include/system/hvf.h
> @@ -15,6 +15,7 @@
>   
>   #include "qemu/accel.h"
>   #include "qom/object.h"
> +#include "exec/vaddr.h"
>   
>   #ifdef COMPILING_PER_TARGET
>   #include "cpu.h"

What do you think of these changes instead?

https://lore.kernel.org/qemu-devel/20250403235821.9909-27-philmd@linaro.org/
Re: [PATCH 02/13] include/system/hvf: missing vaddr include
Posted by Pierrick Bouvier 5 months, 2 weeks ago
On 4/29/25 12:13 AM, Philippe Mathieu-Daudé wrote:
> Hi Pierrick,
> 
> On 29/4/25 06:59, Pierrick Bouvier wrote:
>> On MacOS x86_64:
>> In file included from ../target/i386/hvf/x86_task.c:13:
>> /Users/runner/work/qemu/qemu/include/system/hvf.h:42:5: error: unknown type name 'vaddr'
>>       vaddr pc;
>>       ^
>> /Users/runner/work/qemu/qemu/include/system/hvf.h:43:5: error: unknown type name 'vaddr'
>>       vaddr saved_insn;
>>       ^
>> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:5: error: type name requires a specifier or qualifier
>>       QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
>>       ^
>> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:18: error: a parameter list without types is only allowed in a function definition
>>       QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
>>                    ^
>> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:36: error: expected ';' at end of declaration list
>>       QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
>>
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> ---
>>    include/system/hvf.h | 1 +
>>    1 file changed, 1 insertion(+)
>>
>> diff --git a/include/system/hvf.h b/include/system/hvf.h
>> index 730f927f034..356fced63e3 100644
>> --- a/include/system/hvf.h
>> +++ b/include/system/hvf.h
>> @@ -15,6 +15,7 @@
>>    
>>    #include "qemu/accel.h"
>>    #include "qom/object.h"
>> +#include "exec/vaddr.h"
>>    
>>    #ifdef COMPILING_PER_TARGET
>>    #include "cpu.h"
> 
> What do you think of these changes instead?
> 
> https://lore.kernel.org/qemu-devel/20250403235821.9909-27-philmd@linaro.org/

Sounds good to me, it's the right include set.
I tried to remove cpu.h, and noticed the error, so readded it, without 
investigating too much.

Feel free to merge the current patch on your side (or the version you 
wrote, it's ok for me).

Re: [PATCH 02/13] include/system/hvf: missing vaddr include
Posted by Philippe Mathieu-Daudé 5 months, 2 weeks ago
On 29/4/25 06:59, Pierrick Bouvier wrote:
> On MacOS x86_64:
> In file included from ../target/i386/hvf/x86_task.c:13:
> /Users/runner/work/qemu/qemu/include/system/hvf.h:42:5: error: unknown type name 'vaddr'
>      vaddr pc;
>      ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:43:5: error: unknown type name 'vaddr'
>      vaddr saved_insn;
>      ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:5: error: type name requires a specifier or qualifier
>      QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
>      ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:18: error: a parameter list without types is only allowed in a function definition
>      QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
>                   ^
> /Users/runner/work/qemu/qemu/include/system/hvf.h:45:36: error: expected ';' at end of declaration list
>      QTAILQ_ENTRY(hvf_sw_breakpoint) entry;
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   include/system/hvf.h | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>