All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: laurent@vivier.eu, pbonzini@redhat.com, fam@euphon.net,
	qemu-devel@nongnu.org
Subject: [PATCH 09/10] esp: include the current PDMA callback in the migration stream
Date: Mon, 28 Feb 2022 22:25:26 +0000	[thread overview]
Message-ID: <20220228222527.8234-10-mark.cave-ayland@ilande.co.uk> (raw)
In-Reply-To: <20220228222527.8234-1-mark.cave-ayland@ilande.co.uk>

This involves (re)adding a PDMA-specific subsection to hold the reference to the
current PDMA callback.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/scsi/esp.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index e8b6f25dbb..7998dcfb97 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -1210,6 +1210,25 @@ static int esp_post_load(void *opaque, int version_id)
     return 0;
 }
 
+static bool esp_pdma_needed(void *opaque)
+{
+    ESPState *s = ESP(opaque);
+
+    return s->dma_memory_read == NULL && s->dma_memory_write == NULL &&
+           s->dma_enabled;
+}
+
+static const VMStateDescription vmstate_esp_pdma = {
+    .name = "esp/pdma",
+    .version_id = 0,
+    .minimum_version_id = 0,
+    .needed = esp_pdma_needed,
+    .fields = (VMStateField[]) {
+        VMSTATE_UINT8(pdma_cb, ESPState),
+        VMSTATE_END_OF_LIST()
+    }
+};
+
 const VMStateDescription vmstate_esp = {
     .name = "esp",
     .version_id = 6,
@@ -1244,6 +1263,10 @@ const VMStateDescription vmstate_esp = {
         VMSTATE_UINT8_TEST(lun, ESPState, esp_is_version_6),
         VMSTATE_END_OF_LIST()
     },
+    .subsections = (const VMStateDescription * []) {
+        &vmstate_esp_pdma,
+        NULL
+    }
 };
 
 static void sysbus_esp_mem_write(void *opaque, hwaddr addr,
-- 
2.20.1



  parent reply	other threads:[~2022-02-28 22:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 22:25 [PATCH 00/10] q800: migration fixes Mark Cave-Ayland
2022-02-28 22:25 ` [PATCH 01/10] macfb: add VMStateDescription for MacfbNubusState and MacfbSysBusState Mark Cave-Ayland
2022-02-28 22:25 ` [PATCH 02/10] macfb: don't use special irq_state and irq_mask variables in MacfbState Mark Cave-Ayland
2022-02-28 23:11   ` Philippe Mathieu-Daudé
2022-02-28 22:25 ` [PATCH 03/10] macfb: increase number of registers saved " Mark Cave-Ayland
2022-03-02  9:11   ` Mark Cave-Ayland
2022-02-28 22:25 ` [PATCH 04/10] macfb: add VMStateDescription fields for display type and VBL timer Mark Cave-Ayland
2022-02-28 22:25 ` [PATCH 05/10] macfb: set initial value of mode control registers in macfb_common_realize() Mark Cave-Ayland
2022-02-28 22:25 ` [PATCH 06/10] esp: introduce esp_set_pdma_cb() function Mark Cave-Ayland
2022-02-28 23:06   ` Philippe Mathieu-Daudé
2022-02-28 22:25 ` [PATCH 07/10] esp: introduce esp_pdma_cb() function Mark Cave-Ayland
2022-02-28 23:06   ` Philippe Mathieu-Daudé
2022-02-28 22:25 ` [PATCH 08/10] esp: convert ESPState pdma_cb from a function pointer to an integer Mark Cave-Ayland
2022-02-28 23:10   ` Philippe Mathieu-Daudé
2022-03-02  9:17     ` Mark Cave-Ayland
2022-02-28 22:25 ` Mark Cave-Ayland [this message]
2022-02-28 22:25 ` [PATCH 10/10] esp: recreate ESPState current_req after migration Mark Cave-Ayland

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=20220228222527.8234-10-mark.cave-ayland@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=fam@euphon.net \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@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.