diff mbox series

target/i386/hvf: Include missing 'exec/target_page.h' header

Message ID 20250425174310.70890-1-philmd@linaro.org
State New
Headers show
Series target/i386/hvf: Include missing 'exec/target_page.h' header | expand

Commit Message

Philippe Mathieu-Daudé April 25, 2025, 5:43 p.m. UTC
Include "exec/target_page.h" to be able to compile HVF on x86_64:

  ../target/i386/hvf/hvf.c:139:49: error: use of undeclared identifier 'TARGET_PAGE_SIZE'
              uint64_t dirty_page_start = gpa & ~(TARGET_PAGE_SIZE - 1u);
                                                ^
  ../target/i386/hvf/hvf.c:141:45: error: use of undeclared identifier 'TARGET_PAGE_SIZE'
              hv_vm_protect(dirty_page_start, TARGET_PAGE_SIZE,

Fixes: 9c2ff9cdc9b ("exec/cpu-all: remove exec/target_page include")
Reported-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/i386/hvf/hvf.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pierrick Bouvier April 25, 2025, 5:51 p.m. UTC | #1
On 4/25/25 10:43, Philippe Mathieu-Daudé wrote:
> Include "exec/target_page.h" to be able to compile HVF on x86_64:
> 
>    ../target/i386/hvf/hvf.c:139:49: error: use of undeclared identifier 'TARGET_PAGE_SIZE'
>                uint64_t dirty_page_start = gpa & ~(TARGET_PAGE_SIZE - 1u);
>                                                  ^
>    ../target/i386/hvf/hvf.c:141:45: error: use of undeclared identifier 'TARGET_PAGE_SIZE'
>                hv_vm_protect(dirty_page_start, TARGET_PAGE_SIZE,
> 
> Fixes: 9c2ff9cdc9b ("exec/cpu-all: remove exec/target_page include")
> Reported-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/i386/hvf/hvf.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
> index 23ebf2550ac..da1dc66da07 100644
> --- a/target/i386/hvf/hvf.c
> +++ b/target/i386/hvf/hvf.c
> @@ -50,6 +50,7 @@
>   #include "qemu/error-report.h"
>   #include "qemu/memalign.h"
>   #include "qapi/error.h"
> +#include "exec/target_page.h"
>   #include "migration/blocker.h"
>   
>   #include "system/hvf.h"

Thanks for the patch Philippe,

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff mbox series

Patch

diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 23ebf2550ac..da1dc66da07 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -50,6 +50,7 @@ 
 #include "qemu/error-report.h"
 #include "qemu/memalign.h"
 #include "qapi/error.h"
+#include "exec/target_page.h"
 #include "migration/blocker.h"
 
 #include "system/hvf.h"