All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miles Glenn <milesg@linux.ibm.com>
To: Gautam Menghani <gautam@linux.ibm.com>,
	clg@kaod.org, harshpb@linux.ibm.com, kowal@linux.ibm.com
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] ppc/xive: Trigger the pending interrupt for a guest after migration
Date: Tue, 25 Aug 2026 09:42:53 -0500	[thread overview]
Message-ID: <7a5a04d4524d64a0768ed57486da20cec62cafc4.camel@linux.ibm.com> (raw)
In-Reply-To: <20260824070353.40016-1-gautam@linux.ibm.com>

Mike Kowal, can you please review this?

Thanks,

Glenn

On Mon, 2026-08-24 at 12:33 +0530, Gautam Menghani wrote:
> When a KVM guest is migrated to another LPAR while a stress-ng workload
> is running, lockups are seen when the guest resumes on the destination
> LPAR. This root cause is that if there was a pending interrupt for a cpu
> on the source machine but it was not presented yet when the migration
> started, the interrupt is not retriggered on the destination LPAR. This
> is evident when running 'info pic' on the destination LPAR:
> 
> $ virsh qemu-monitor-command --hmp migrate 'info pic' | grep -e OS -e MSI
> CPU[0000]:   OS    00   ff  00    ff   ff  00  ff   ff  80000400
> CPU[0001]:   OS    00   ff  00    ff   ff  00  ff   ff  80000401
> CPU[0002]:   OS    00   ff  00    ff   ff  00  ff   ff  80000402
> CPU[0003]:   OS    00   ff  00    ff   ff  00  ff   ff  80000403
> CPU[0004]:   OS    00   ff  00    ff   ff  00  ff   ff  80000404
> CPU[0005]:   OS    00   ff  00    ff   ff  00  ff   ff  80000405
> CPU[0006]:   OS    80   ff  02    ff   ff  00  ff   06  80000406
> CPU[0007]:   OS    00   ff  00    ff   ff  00  ff   ff  80000407
>   00000000 MSI --    00000010   0/6   3071/16384 @3710000 ^1 [ 80000010 80000010 80000010 80000010 80000010 ^00000000 ]
>   00000001 MSI --    00000010   1/6   1852/16384 @3980000 ^1 [ 80000010 80000033 80000033 80000033 80000033 ^00000000 ]
>   00000002 MSI --    00000010   2/6   4424/16384 @40c0000 ^1 [ 80000020 80000020 80000020 80000010 80000010 ^00000000 ]
>   00000003 MSI --    00000010   3/6   1913/16384 @4220000 ^1 [ 80000010 80000032 80000010 80000010 80000010 ^00000000 ]
>   00000004 MSI --    00000010   4/6   2946/16384 @4360000 ^1 [ 80000010 80000010 80000010 80000010 80000010 ^00000000 ]
>   00000005 MSI --    00000010   5/6   2313/16384 @44a0000 ^1 [ 80000010 80000010 80000010 80000010 80000010 ^00000000 ]
>   00000006 MSI P-    00000010   6/6   5825/16384 @45f0000 ^1 [ 80000024 80000024 80000024 80000010 80000016 ^00000000 ]
>   00000007 MSI --    00000010   7/6   2346/16384 @4760000 ^1 [ 80000032 80000032 80000010 80000032 80000032 ^00000000 ]
> 
> Fix this by calling xive_tctx_pipr_set() in
> vmstate_xive_tctx_post_load(), which ends up calling qemu_irq_raise() to
> present the interrupt.
> 
> Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
> ---
>  hw/intc/xive.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/hw/intc/xive.c b/hw/intc/xive.c
> index f473e6ac77..712498d4af 100644
> --- a/hw/intc/xive.c
> +++ b/hw/intc/xive.c
> @@ -1080,6 +1080,9 @@ static int vmstate_xive_tctx_post_load(void *opaque, int version_id)
>              error_report_err(local_err);
>              return ret;
>          }
> +    } else {
> +        uint8_t pipr = tctx->regs[TM_QW1_OS + TM_PIPR];
> +        xive_tctx_pipr_set(tctx, TM_QW1_OS, pipr, 0);
>      }
>  
>      return 0;



  parent reply	other threads:[~2026-08-25 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24  7:03 [PATCH] ppc/xive: Trigger the pending interrupt for a guest after migration Gautam Menghani
2026-08-24 20:31 ` Anushree Mathur
2026-08-25  5:25 ` Nikhil Kumar Singh
2026-08-25  7:50   ` Gautam Menghani
2026-08-25  8:17     ` Nikhil Kumar Singh
2026-08-25 14:42 ` Miles Glenn [this message]
2026-08-25 16:23   ` Mike Kowal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a5a04d4524d64a0768ed57486da20cec62cafc4.camel@linux.ibm.com \
    --to=milesg@linux.ibm.com \
    --cc=clg@kaod.org \
    --cc=gautam@linux.ibm.com \
    --cc=harshpb@linux.ibm.com \
    --cc=kowal@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.