On Thu, Jul 10, 2025 at 10:21:12PM +0800, Xiaoyao Li wrote:
> On 7/10/2025 10:11 PM, Daniel P. Berrangé wrote:
> > On Thu, Jul 10, 2025 at 10:06:10PM +0800, Xiaoyao Li wrote:
> > > My original patch used (gpa == -1) as the indicator for whether gpa is
> > > valid, this needs to be cleaned up. I will send the cleanup patch.
> > 
> > The value you assign to 'gpa' doesn't matter when 'has_gpa' is false,
> > as it'll never get into the JSON event, so having it be '-1' is not
> > significantly different from leaving it on 0.
> 
> I meant cleanup the QEMU internal logic in qemu_system_guest_panicked()
> 
> --- a/system/runstate.c
> +++ b/system/runstate.c
> @@ -690,7 +690,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);

Yes, that would be better


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to