qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/intc/xics: Add missing call to register vmstate_icp_server
@ 2025-08-14 11:35 Fabian Vogt
  2025-08-14 11:44 ` [PATCH-for-10.1] " Philippe Mathieu-Daudé
  2025-08-19  2:55 ` [PATCH] " Fabiano Rosas
  0 siblings, 2 replies; 5+ messages in thread
From: Fabian Vogt @ 2025-08-14 11:35 UTC (permalink / raw)
  To: Harsh Prateek Bora; +Cc: qemu-ppc, Nicholas Piggin, qemu-devel

An obsolete wrapper function with a workaround was removed entirely,
without restoring the call it wrapped.

Without this, the guest is stuck after savevm/loadvm.

Fixes: 24ee9229fe31 ("ppc/spapr: remove deprecated machine pseries-2.9")
Signed-off-by: Fabian Vogt <fvogt@suse.de>
---
 hw/intc/xics.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index d9a199e883..200710eb6c 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -335,6 +335,8 @@ static void icp_realize(DeviceState *dev, Error **errp)
             return;
         }
     }
+
+    vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);
 }
 
 static void icp_unrealize(DeviceState *dev)
-- 
2.50.1






^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH-for-10.1] hw/intc/xics: Add missing call to register vmstate_icp_server
  2025-08-14 11:35 [PATCH] hw/intc/xics: Add missing call to register vmstate_icp_server Fabian Vogt
@ 2025-08-14 11:44 ` Philippe Mathieu-Daudé
  2025-08-19  2:55 ` [PATCH] " Fabiano Rosas
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-08-14 11:44 UTC (permalink / raw)
  To: Fabian Vogt, Harsh Prateek Bora; +Cc: qemu-ppc, Nicholas Piggin, qemu-devel

On 14/8/25 13:35, Fabian Vogt wrote:
> An obsolete wrapper function with a workaround was removed entirely,
> without restoring the call it wrapped.
> 
> Without this, the guest is stuck after savevm/loadvm.
> 
> Fixes: 24ee9229fe31 ("ppc/spapr: remove deprecated machine pseries-2.9")
> Signed-off-by: Fabian Vogt <fvogt@suse.de>
> ---
>   hw/intc/xics.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index d9a199e883..200710eb6c 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -335,6 +335,8 @@ static void icp_realize(DeviceState *dev, Error **errp)
>               return;
>           }
>       }
> +
> +    vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);
>   }
>   
>   static void icp_unrealize(DeviceState *dev)

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hw/intc/xics: Add missing call to register vmstate_icp_server
  2025-08-14 11:35 [PATCH] hw/intc/xics: Add missing call to register vmstate_icp_server Fabian Vogt
  2025-08-14 11:44 ` [PATCH-for-10.1] " Philippe Mathieu-Daudé
@ 2025-08-19  2:55 ` Fabiano Rosas
  2025-08-19  7:29   ` Harsh Prateek Bora
  1 sibling, 1 reply; 5+ messages in thread
From: Fabiano Rosas @ 2025-08-19  2:55 UTC (permalink / raw)
  To: Fabian Vogt, Harsh Prateek Bora
  Cc: qemu-ppc, Nicholas Piggin, qemu-devel, peterx

Fabian Vogt <fvogt@suse.de> writes:

+CC Peter

> An obsolete wrapper function with a workaround was removed entirely,
> without restoring the call it wrapped.
>
> Without this, the guest is stuck after savevm/loadvm.
>

I'd note that this only affects guests that have actually negotiated
XICS, so guests using ic-mode=xive are safe.

With this patch, backward migration to QEMU versions >= 9.2 is
broken. Which I can only assume is ok, since the hard break (vmstate
gets rejected) is better than weird post-migration hangs.

If the PPC folks can spot a scenario where migration would provide
reasonable results even without the emulated interrupt controller state
being migrated, then we'll need a compat property for this.

Also, a 9.2 guest cannot move to a more recent QEMU version without a
reboot. If this is an important scenario, then the new QEMU needs to
provide some compatibility knob.

Otherwise:

Acked-by: Fabiano Rosas <farosas@suse.de>
Cc: qemu-stable@nongnu.org


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hw/intc/xics: Add missing call to register vmstate_icp_server
  2025-08-19  2:55 ` [PATCH] " Fabiano Rosas
@ 2025-08-19  7:29   ` Harsh Prateek Bora
  2025-08-19 15:07     ` Miles Glenn
  0 siblings, 1 reply; 5+ messages in thread
From: Harsh Prateek Bora @ 2025-08-19  7:29 UTC (permalink / raw)
  To: Fabiano Rosas, Fabian Vogt, Gautam Menghani, Glenn Miles
  Cc: qemu-ppc, Nicholas Piggin, qemu-devel, peterx

+ Gautam, Glenn

Hi Fabian,


On 8/19/25 08:25, Fabiano Rosas wrote:
> Fabian Vogt <fvogt@suse.de> writes:
> 
> +CC Peter
> 
>> An obsolete wrapper function with a workaround was removed entirely,
>> without restoring the call it wrapped.
>>
>> Without this, the guest is stuck after savevm/loadvm.
>>
> 
> I'd note that this only affects guests that have actually negotiated
> XICS, so guests using ic-mode=xive are safe.

Since this affected only guests using XICS, would it be a better idea to 
mention this explicitly in commit log as well (?

> 
> With this patch, backward migration to QEMU versions >= 9.2 is
> broken. Which I can only assume is ok, since the hard break (vmstate
> gets rejected) is better than weird post-migration hangs.
> 
> If the PPC folks can spot a scenario where migration would provide
> reasonable results even without the emulated interrupt controller state
> being migrated, then we'll need a compat property for this.
> 
> Also, a 9.2 guest cannot move to a more recent QEMU version without a
> reboot. If this is an important scenario, then the new QEMU needs to
> provide some compatibility knob.

Gautam, Glenn - thoughts on above comments?

Thanks for the patch.

regards,
Harsh

> 
> Otherwise:
> 
> Acked-by: Fabiano Rosas <farosas@suse.de>
> Cc: qemu-stable@nongnu.org


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hw/intc/xics: Add missing call to register vmstate_icp_server
  2025-08-19  7:29   ` Harsh Prateek Bora
@ 2025-08-19 15:07     ` Miles Glenn
  0 siblings, 0 replies; 5+ messages in thread
From: Miles Glenn @ 2025-08-19 15:07 UTC (permalink / raw)
  To: Harsh Prateek Bora, Fabiano Rosas, Fabian Vogt, Gautam Menghani
  Cc: qemu-ppc, Nicholas Piggin, qemu-devel, peterx

On Tue, 2025-08-19 at 12:59 +0530, Harsh Prateek Bora wrote:
> + Gautam, Glenn
> 
> Hi Fabian,
> 
> 
> On 8/19/25 08:25, Fabiano Rosas wrote:
> > Fabian Vogt <fvogt@suse.de> writes:
> > 
> > +CC Peter
> > 
> > > An obsolete wrapper function with a workaround was removed entirely,
> > > without restoring the call it wrapped.
> > > 
> > > Without this, the guest is stuck after savevm/loadvm.
> > > 
> > 
> > I'd note that this only affects guests that have actually negotiated
> > XICS, so guests using ic-mode=xive are safe.
> 
> Since this affected only guests using XICS, would it be a better idea to 
> mention this explicitly in commit log as well (?
> 
> > With this patch, backward migration to QEMU versions >= 9.2 is
> > broken. Which I can only assume is ok, since the hard break (vmstate
> > gets rejected) is better than weird post-migration hangs.
> > 
> > If the PPC folks can spot a scenario where migration would provide
> > reasonable results even without the emulated interrupt controller state
> > being migrated, then we'll need a compat property for this.
> > 

I don't know much about the XICS controller, but migration without
restoring the interrupt controller state seems pretty risky to me.  I
wouldn't recommend it.

Glenn

> > Also, a 9.2 guest cannot move to a more recent QEMU version without a
> > reboot. If this is an important scenario, then the new QEMU needs to
> > provide some compatibility knob.
> 
> Gautam, Glenn - thoughts on above comments?
> 
> Thanks for the patch.
> 
> regards,
> Harsh
> 
> > Otherwise:
> > 
> > Acked-by: Fabiano Rosas <farosas@suse.de>
> > Cc: qemu-stable@nongnu.org



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-19 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 11:35 [PATCH] hw/intc/xics: Add missing call to register vmstate_icp_server Fabian Vogt
2025-08-14 11:44 ` [PATCH-for-10.1] " Philippe Mathieu-Daudé
2025-08-19  2:55 ` [PATCH] " Fabiano Rosas
2025-08-19  7:29   ` Harsh Prateek Bora
2025-08-19 15:07     ` Miles Glenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).