[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/6] migration/pcspk: Add a property to state if pcsp
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 4/6] migration/pcspk: Add a property to state if pcspk is migrated |
Date: |
Mon, 28 Nov 2016 23:40:35 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Allow us to turn migration of pcspk off for compatibility.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/audio/pcspk.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
index 984534b..7980022 100644
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -54,6 +54,7 @@ typedef struct {
unsigned int play_pos;
uint8_t data_on;
uint8_t dummy_refresh_clock;
+ bool migrate;
} PCSpkState;
static const char *s_spk = "pcspk";
@@ -187,11 +188,19 @@ static void pcspk_realizefn(DeviceState *dev, Error
**errp)
pcspk_state = s;
}
+static bool migrate_needed(void *opaque)
+{
+ PCSpkState *s = opaque;
+
+ return s->migrate;
+}
+
static const VMStateDescription vmstate_spk = {
.name = "pcspk",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
+ .needed = migrate_needed,
.fields = (VMStateField[]) {
VMSTATE_UINT8(data_on, PCSpkState),
VMSTATE_UINT8(dummy_refresh_clock, PCSpkState),
@@ -201,6 +210,7 @@ static const VMStateDescription vmstate_spk = {
static Property pcspk_properties[] = {
DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, -1),
+ DEFINE_PROP_BOOL("migrate", PCSpkState, migrate, true),
DEFINE_PROP_END_OF_LIST(),
};
--
1.8.3.1
- [Qemu-devel] [PULL 0/6] More patches for QEMU 2.8-rc2, Paolo Bonzini, 2016/11/28
- [Qemu-devel] [PULL 1/6] megasas: do not call pci_dma_unmap after having freed the frame once, Paolo Bonzini, 2016/11/28
- [Qemu-devel] [PULL 2/6] megasas: clean up and fix request completion/cancellation, Paolo Bonzini, 2016/11/28
- [Qemu-devel] [PULL 3/6] pci-assign: sync MSI/MSI-X cap and table with PCIDevice, Paolo Bonzini, 2016/11/28
- [Qemu-devel] [PULL 4/6] migration/pcspk: Add a property to state if pcspk is migrated,
Paolo Bonzini <=
- [Qemu-devel] [PULL 5/6] migration/pcspk: Turn migration of pcspk off for 2.7 and older, Paolo Bonzini, 2016/11/28
- [Qemu-devel] [PULL 6/6] rules.mak: Use -r instead of -Wl, -r to fix building when PIE is default, Paolo Bonzini, 2016/11/28
- Re: [Qemu-devel] [PULL 0/6] More patches for QEMU 2.8-rc2, Stefan Hajnoczi, 2016/11/29
- Re: [Qemu-devel] [PULL 0/6] More patches for QEMU 2.8-rc2, Stefan Hajnoczi, 2016/11/29