[PATCH] target/i386: Replace target_ulong -> uint64_t for TARGET_X86_64

Philippe Mathieu-Daudé posted 1 patch 3 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260315165319.39727-1-philmd@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>
target/i386/cpu.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[PATCH] target/i386: Replace target_ulong -> uint64_t for TARGET_X86_64
Posted by Philippe Mathieu-Daudé 3 weeks, 1 day ago
These registers are only available on 64-bit builds, thus
always handled as 64-bit. This isn't even a migration break
because they are migrated as 64-bit since the beginning
(see commit 02536f8b1f9 "x86_64 save/restore").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/i386/cpu.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index e5ae29f8af1..b0c730b3390 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -2058,10 +2058,10 @@ typedef struct CPUArchState {
     uint64_t vm_hsave;
 
 #ifdef TARGET_X86_64
-    target_ulong lstar;
-    target_ulong cstar;
-    target_ulong fmask;
-    target_ulong kernelgsbase;
+    uint64_t lstar;
+    uint64_t cstar;
+    uint64_t fmask;
+    uint64_t kernelgsbase;
 
     /* FRED MSRs */
     uint64_t fred_rsp0;
-- 
2.53.0


Re: [PATCH] target/i386: Replace target_ulong -> uint64_t for TARGET_X86_64
Posted by Philippe Mathieu-Daudé 2 weeks ago
On 15/3/26 17:53, Philippe Mathieu-Daudé wrote:
> These registers are only available on 64-bit builds, thus
> always handled as 64-bit. This isn't even a migration break
> because they are migrated as 64-bit since the beginning
> (see commit 02536f8b1f9 "x86_64 save/restore").
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/i386/cpu.h | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)

Queued for 11.1, thanks.

Re: [PATCH] target/i386: Replace target_ulong -> uint64_t for TARGET_X86_64
Posted by Anton Johansson via qemu development 3 weeks ago
On 15/03/26, Philippe Mathieu-Daudé wrote:
> These registers are only available on 64-bit builds, thus
> always handled as 64-bit. This isn't even a migration break
> because they are migrated as 64-bit since the beginning
> (see commit 02536f8b1f9 "x86_64 save/restore").
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/i386/cpu.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index e5ae29f8af1..b0c730b3390 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -2058,10 +2058,10 @@ typedef struct CPUArchState {
>      uint64_t vm_hsave;
>  
>  #ifdef TARGET_X86_64
> -    target_ulong lstar;
> -    target_ulong cstar;
> -    target_ulong fmask;
> -    target_ulong kernelgsbase;
> +    uint64_t lstar;
> +    uint64_t cstar;
> +    uint64_t fmask;
> +    uint64_t kernelgsbase;
>  
>      /* FRED MSRs */
>      uint64_t fred_rsp0;
> -- 
> 2.53.0
> 

Reviewed-by: Anton Johansson <anjo@rev.ng>