All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: qemu-s390x@nongnu.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Thomas Huth <thuth@redhat.com>, Peter Xu <peterx@redhat.com>,
	Fabiano Rosas <farosas@suse.de>,
	Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org
Subject: [RFC PATCH 1/3] hw/intc/s390_flic: Migrate pending state
Date: Sat, 25 May 2024 23:12:38 +1000	[thread overview]
Message-ID: <20240525131241.378473-2-npiggin@gmail.com> (raw)
In-Reply-To: <20240525131241.378473-1-npiggin@gmail.com>

The flic pending state is not migrated, so if the machine is migrated
while an interrupt is pending, it can be lost. This shows up in
qtest migration test, an extint is pending (due to console writes?)
and the CPU waits via s390_cpu_set_psw and expects the interrupt to
wake it. However when the flic pending state is lost, s390_cpu_has_int
returns false, so s390_cpu_exec_interrupt falls through to halting
again.

Fix this by migrating pending. This prevents the qtest from hanging.
Does service_param need to be migrated? Or the IO lists?

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 hw/intc/s390_flic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index 6771645699..b70cf2295a 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -369,6 +369,7 @@ static const VMStateDescription qemu_s390_flic_vmstate = {
     .fields = (const VMStateField[]) {
         VMSTATE_UINT8(simm, QEMUS390FLICState),
         VMSTATE_UINT8(nimm, QEMUS390FLICState),
+        VMSTATE_UINT32(pending, QEMUS390FLICState),
         VMSTATE_END_OF_LIST()
     }
 };
-- 
2.43.0



  reply	other threads:[~2024-05-25 13:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-25 13:12 [RFC PATCH 0/3] Fix s390x flic migration and add some more qtests Nicholas Piggin
2024-05-25 13:12 ` Nicholas Piggin [this message]
2024-05-26 15:53   ` [RFC PATCH 1/3] hw/intc/s390_flic: Migrate pending state David Hildenbrand
2024-05-26 19:44     ` Richard Henderson
2024-05-26 20:33       ` David Hildenbrand
2024-05-27  5:51         ` Thomas Huth
2024-05-27  7:11           ` Nicholas Piggin
2024-05-25 13:12 ` [RFC PATCH 2/3] tests/qtest/migration-test: enable on s390x Nicholas Piggin
2024-05-27  5:46   ` Prasad Pandit
2024-05-27  7:04     ` Nicholas Piggin
2024-05-27  7:40       ` Prasad Pandit
2024-05-25 13:12 ` [RFC PATCH 3/3] tests/qtest/migration-test: Enable test_ignore_shared Nicholas Piggin
2024-05-27 12:42   ` Fabiano Rosas
2024-05-27 14:56     ` Peter Xu
2024-05-27 15:11       ` Fabiano Rosas
2024-05-27 15:41         ` Peter Xu
2024-05-27  7:13 ` [RFC PATCH 0/3] Fix s390x flic migration and add some more qtests Thomas Huth

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=20240525131241.378473-2-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /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.