diff options
| author | Xiaoyao Li <xiaoyao.li@intel.com> | 2026-05-12 16:21:06 +0800 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2026-06-26 00:48:23 +0200 |
| commit | a5b14a8e38f25b7adfda1164da83bdceeb10a9ae (patch) | |
| tree | d7b0ec7856e8acf7b1becb71ccb7d11f045808b1 /system | |
| parent | 5cd5188ef8ae90624eeca023e9dc8ef18eb747b1 (diff) | |
| download | qemu-a5b14a8e38f25b7adfda1164da83bdceeb10a9ae.tar.gz qemu-a5b14a8e38f25b7adfda1164da83bdceeb10a9ae.zip | |
i386/tdx: Use .has_gpa field to check if the gpa is valid
When translating the QAPI type GuestPanicInformationTdx into its C
struct, the generated code provides a .has_gpa boolean field to indicate
whether the optional gpa field is present.
Replace the magic sentinel value -1ULL, previously used to signal "no
valid GPA", with the idiomatic .has_gpa field. This removes the
implicit sentinel coupling and makes the validity check self-documenting.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Link: https://lore.kernel.org/r/20260512082108.621596-2-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'system')
| -rw-r--r-- | system/runstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/runstate.c b/system/runstate.c index 0e1cb3b4e6..09be7c8d20 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -706,7 +706,7 @@ void qemu_system_guest_panicked(GuestPanicInformation *info) " error code: 0x%" PRIx32 " error message:\"%s\"\n", info->u.tdx.error_code, message); g_free(message); - if (info->u.tdx.gpa != -1ull) { + if (info->u.tdx.has_gpa) { qemu_log_mask(LOG_GUEST_ERROR, "Additional error information " "can be found at gpa page: 0x%" PRIx64 "\n", info->u.tdx.gpa); |
