* [Qemu-devel] [PATCH 1/6] wdt_i6300esb: port to vmstate
2009-10-14 23:39 [Qemu-devel] [PATCH 0/6] Port of watchdogs to vmstate Juan Quintela
@ 2009-10-14 23:39 ` Juan Quintela
2009-10-15 8:39 ` [Qemu-devel] " Richard W.M. Jones
2009-10-14 23:39 ` [Qemu-devel] [PATCH 2/6] wdt_i6300esb: remove useless casts from void * Juan Quintela
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Juan Quintela @ 2009-10-14 23:39 UTC (permalink / raw)
To: qemu-devel; +Cc: rjones
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/wdt_i6300esb.c | 67 ++++++++++++++++++----------------------------------
1 files changed, 23 insertions(+), 44 deletions(-)
diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c
index 3abaa87..ab8210b 100644
--- a/hw/wdt_i6300esb.c
+++ b/hw/wdt_i6300esb.c
@@ -369,48 +369,28 @@ static void i6300esb_map(PCIDevice *dev, int region_num,
/* qemu_register_coalesced_mmio (addr, 0x10); ? */
}
-static void i6300esb_save(QEMUFile *f, void *vp)
-{
- I6300State *d = (I6300State *) vp;
-
- pci_device_save(&d->dev, f);
- qemu_put_be32(f, d->reboot_enabled);
- qemu_put_be32(f, d->clock_scale);
- qemu_put_be32(f, d->int_type);
- qemu_put_be32(f, d->free_run);
- qemu_put_be32(f, d->locked);
- qemu_put_be32(f, d->enabled);
- qemu_put_timer(f, d->timer);
- qemu_put_be32(f, d->timer1_preload);
- qemu_put_be32(f, d->timer2_preload);
- qemu_put_be32(f, d->stage);
- qemu_put_be32(f, d->unlock_state);
- qemu_put_be32(f, d->previous_reboot_flag);
-}
-
-static int i6300esb_load(QEMUFile *f, void *vp, int version)
-{
- I6300State *d = (I6300State *) vp;
-
- if (version != sizeof (I6300State))
- return -EINVAL;
-
- pci_device_load(&d->dev, f);
- d->reboot_enabled = qemu_get_be32(f);
- d->clock_scale = qemu_get_be32(f);
- d->int_type = qemu_get_be32(f);
- d->free_run = qemu_get_be32(f);
- d->locked = qemu_get_be32(f);
- d->enabled = qemu_get_be32(f);
- qemu_get_timer(f, d->timer);
- d->timer1_preload = qemu_get_be32(f);
- d->timer2_preload = qemu_get_be32(f);
- d->stage = qemu_get_be32(f);
- d->unlock_state = qemu_get_be32(f);
- d->previous_reboot_flag = qemu_get_be32(f);
-
- return 0;
-}
+static const VMStateDescription vmstate_i6300esb = {
+ .name = "i6300esb_wdt",
+ .version_id = sizeof(I6300State),
+ .minimum_version_id = sizeof(I6300State),
+ .minimum_version_id_old = sizeof(I6300State),
+ .fields = (VMStateField []) {
+ VMSTATE_PCI_DEVICE(dev, I6300State),
+ VMSTATE_INT32(reboot_enabled, I6300State),
+ VMSTATE_INT32(clock_scale, I6300State),
+ VMSTATE_INT32(int_type, I6300State),
+ VMSTATE_INT32(free_run, I6300State),
+ VMSTATE_INT32(locked, I6300State),
+ VMSTATE_INT32(enabled, I6300State),
+ VMSTATE_TIMER(timer, I6300State),
+ VMSTATE_UINT32(timer1_preload, I6300State),
+ VMSTATE_UINT32(timer2_preload, I6300State),
+ VMSTATE_INT32(stage, I6300State),
+ VMSTATE_INT32(unlock_state, I6300State),
+ VMSTATE_INT32(previous_reboot_flag, I6300State),
+ VMSTATE_END_OF_LIST()
+ }
+};
static int i6300esb_init(PCIDevice *dev)
{
@@ -439,8 +419,7 @@ static int i6300esb_init(PCIDevice *dev)
pci_register_bar(&d->dev, 0, 0x10,
PCI_ADDRESS_SPACE_MEM, i6300esb_map);
- register_savevm("i6300esb_wdt", -1, sizeof(I6300State),
- i6300esb_save, i6300esb_load, d);
+ vmstate_register(-1, &vmstate_i6300esb, d);
return 0;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] Re: [PATCH 1/6] wdt_i6300esb: port to vmstate
2009-10-14 23:39 ` [Qemu-devel] [PATCH 1/6] wdt_i6300esb: port " Juan Quintela
@ 2009-10-15 8:39 ` Richard W.M. Jones
0 siblings, 0 replies; 13+ messages in thread
From: Richard W.M. Jones @ 2009-10-15 8:39 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On Thu, Oct 15, 2009 at 01:39:57AM +0200, Juan Quintela wrote:
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> hw/wdt_i6300esb.c | 67 ++++++++++++++++++----------------------------------
> 1 files changed, 23 insertions(+), 44 deletions(-)
As far as I understand the vmstate API, this looks like a
straightforward conversion, so ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH 2/6] wdt_i6300esb: remove useless casts from void *
2009-10-14 23:39 [Qemu-devel] [PATCH 0/6] Port of watchdogs to vmstate Juan Quintela
2009-10-14 23:39 ` [Qemu-devel] [PATCH 1/6] wdt_i6300esb: port " Juan Quintela
@ 2009-10-14 23:39 ` Juan Quintela
2009-10-15 8:39 ` [Qemu-devel] " Richard W.M. Jones
2009-10-14 23:39 ` [Qemu-devel] [PATCH 3/6] wdt_i6300esb: move PCI_DEVICE_IDE_INTEL_ESB_9 to pci_ids.h Juan Quintela
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Juan Quintela @ 2009-10-14 23:39 UTC (permalink / raw)
To: qemu-devel; +Cc: rjones
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/wdt_i6300esb.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c
index ab8210b..3d920ea 100644
--- a/hw/wdt_i6300esb.c
+++ b/hw/wdt_i6300esb.c
@@ -163,7 +163,7 @@ static void i6300esb_reset(I6300State *d)
*/
static void i6300esb_timer_expired(void *vp)
{
- I6300State *d = (I6300State *) vp;
+ I6300State *d = vp;
i6300esb_debug("stage %d\n", d->stage);
@@ -257,7 +257,7 @@ static uint32_t i6300esb_mem_readb(void *vp, target_phys_addr_t addr)
static uint32_t i6300esb_mem_readw(void *vp, target_phys_addr_t addr)
{
uint32_t data = 0;
- I6300State *d = (I6300State *) vp;
+ I6300State *d = vp;
i6300esb_debug("addr = %x\n", (int) addr);
@@ -281,7 +281,7 @@ static uint32_t i6300esb_mem_readl(void *vp, target_phys_addr_t addr)
static void i6300esb_mem_writeb(void *vp, target_phys_addr_t addr, uint32_t val)
{
- I6300State *d = (I6300State *) vp;
+ I6300State *d = vp;
i6300esb_debug("addr = %x, val = %x\n", (int) addr, val);
@@ -293,7 +293,7 @@ static void i6300esb_mem_writeb(void *vp, target_phys_addr_t addr, uint32_t val)
static void i6300esb_mem_writew(void *vp, target_phys_addr_t addr, uint32_t val)
{
- I6300State *d = (I6300State *) vp;
+ I6300State *d = vp;
i6300esb_debug("addr = %x, val = %x\n", (int) addr, val);
@@ -326,7 +326,7 @@ static void i6300esb_mem_writew(void *vp, target_phys_addr_t addr, uint32_t val)
static void i6300esb_mem_writel(void *vp, target_phys_addr_t addr, uint32_t val)
{
- I6300State *d = (I6300State *) vp;
+ I6300State *d = vp;
i6300esb_debug ("addr = %x, val = %x\n", (int) addr, val);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH 3/6] wdt_i6300esb: move PCI_DEVICE_IDE_INTEL_ESB_9 to pci_ids.h
2009-10-14 23:39 [Qemu-devel] [PATCH 0/6] Port of watchdogs to vmstate Juan Quintela
2009-10-14 23:39 ` [Qemu-devel] [PATCH 1/6] wdt_i6300esb: port " Juan Quintela
2009-10-14 23:39 ` [Qemu-devel] [PATCH 2/6] wdt_i6300esb: remove useless casts from void * Juan Quintela
@ 2009-10-14 23:39 ` Juan Quintela
2009-10-15 8:40 ` [Qemu-devel] " Richard W.M. Jones
2009-10-14 23:40 ` [Qemu-devel] [PATCH 4/6] ib700: Introduce IB700State Juan Quintela
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Juan Quintela @ 2009-10-14 23:39 UTC (permalink / raw)
To: qemu-devel; +Cc: rjones
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/pci_ids.h | 1 +
hw/wdt_i6300esb.c | 4 ----
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/hw/pci_ids.h b/hw/pci_ids.h
index 3afe674..63379c2 100644
--- a/hw/pci_ids.h
+++ b/hw/pci_ids.h
@@ -88,6 +88,7 @@
#define PCI_VENDOR_ID_INTEL 0x8086
#define PCI_DEVICE_ID_INTEL_82441 0x1237
#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415
+#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c
index 3d920ea..40081ca 100644
--- a/hw/wdt_i6300esb.c
+++ b/hw/wdt_i6300esb.c
@@ -36,10 +36,6 @@
#define i6300esb_debug(fs,...)
#endif
-#ifndef PCI_DEVICE_ID_INTEL_ESB_9
-#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
-#endif
-
/* PCI configuration registers */
#define ESB_CONFIG_REG 0x60 /* Config register */
#define ESB_LOCK_REG 0x68 /* WDT lock register */
--
1.6.2.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] Re: [PATCH 3/6] wdt_i6300esb: move PCI_DEVICE_IDE_INTEL_ESB_9 to pci_ids.h
2009-10-14 23:39 ` [Qemu-devel] [PATCH 3/6] wdt_i6300esb: move PCI_DEVICE_IDE_INTEL_ESB_9 to pci_ids.h Juan Quintela
@ 2009-10-15 8:40 ` Richard W.M. Jones
0 siblings, 0 replies; 13+ messages in thread
From: Richard W.M. Jones @ 2009-10-15 8:40 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On Thu, Oct 15, 2009 at 01:39:59AM +0200, Juan Quintela wrote:
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> hw/pci_ids.h | 1 +
> hw/wdt_i6300esb.c | 4 ----
> 2 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/hw/pci_ids.h b/hw/pci_ids.h
> index 3afe674..63379c2 100644
> --- a/hw/pci_ids.h
> +++ b/hw/pci_ids.h
> @@ -88,6 +88,7 @@
> #define PCI_VENDOR_ID_INTEL 0x8086
> #define PCI_DEVICE_ID_INTEL_82441 0x1237
> #define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415
> +#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
> #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
> #define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
> #define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
> diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c
> index 3d920ea..40081ca 100644
> --- a/hw/wdt_i6300esb.c
> +++ b/hw/wdt_i6300esb.c
> @@ -36,10 +36,6 @@
> #define i6300esb_debug(fs,...)
> #endif
>
> -#ifndef PCI_DEVICE_ID_INTEL_ESB_9
> -#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
> -#endif
> -
> /* PCI configuration registers */
> #define ESB_CONFIG_REG 0x60 /* Config register */
> #define ESB_LOCK_REG 0x68 /* WDT lock register */
> --
> 1.6.2.5
Ah ha, yes, I was looking for the proper place to put that define
(I thought it was in a Linux / system header file).
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH 4/6] ib700: Introduce IB700State
2009-10-14 23:39 [Qemu-devel] [PATCH 0/6] Port of watchdogs to vmstate Juan Quintela
` (2 preceding siblings ...)
2009-10-14 23:39 ` [Qemu-devel] [PATCH 3/6] wdt_i6300esb: move PCI_DEVICE_IDE_INTEL_ESB_9 to pci_ids.h Juan Quintela
@ 2009-10-14 23:40 ` Juan Quintela
2009-10-15 8:41 ` [Qemu-devel] " Richard W.M. Jones
2009-10-14 23:40 ` [Qemu-devel] [PATCH 5/6] ib700: move timer to IB700State Juan Quintela
2009-10-14 23:40 ` [Qemu-devel] [PATCH 6/6] ib700: port to vmstate Juan Quintela
5 siblings, 1 reply; 13+ messages in thread
From: Juan Quintela @ 2009-10-14 23:40 UTC (permalink / raw)
To: qemu-devel; +Cc: rjones
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/wdt_ib700.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/hw/wdt_ib700.c b/hw/wdt_ib700.c
index 0ee3a5c..e598df5 100644
--- a/hw/wdt_ib700.c
+++ b/hw/wdt_ib700.c
@@ -35,6 +35,10 @@
#define ib700_debug(fs,...)
#endif
+typedef struct IB700state {
+ ISADevice dev;
+} IB700State;
+
/* This is the timer. We use a global here because the watchdog
* code ensures there is only one watchdog (it is located at a fixed,
* unchangable IO port, so there could only ever be one anyway).
@@ -90,10 +94,12 @@ static int ib700_load(QEMUFile *f, void *vp, int version)
static int wdt_ib700_init(ISADevice *dev)
{
- timer = qemu_new_timer(vm_clock, ib700_timer_expired, NULL);
- register_savevm("ib700_wdt", -1, 0, ib700_save, ib700_load, NULL);
- register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, NULL);
- register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, NULL);
+ IB700State *s = DO_UPCAST(IB700State, dev, dev);
+
+ timer = qemu_new_timer(vm_clock, ib700_timer_expired, s);
+ register_savevm("ib700_wdt", -1, 0, ib700_save, ib700_load, s);
+ register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, s);
+ register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, s);
return 0;
}
@@ -105,7 +111,7 @@ static WatchdogTimerModel model = {
static ISADeviceInfo wdt_ib700_info = {
.qdev.name = "ib700",
- .qdev.size = sizeof(ISADevice),
+ .qdev.size = sizeof(IB700State),
.init = wdt_ib700_init,
};
--
1.6.2.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH 5/6] ib700: move timer to IB700State
2009-10-14 23:39 [Qemu-devel] [PATCH 0/6] Port of watchdogs to vmstate Juan Quintela
` (3 preceding siblings ...)
2009-10-14 23:40 ` [Qemu-devel] [PATCH 4/6] ib700: Introduce IB700State Juan Quintela
@ 2009-10-14 23:40 ` Juan Quintela
2009-10-15 8:42 ` [Qemu-devel] " Richard W.M. Jones
2009-10-14 23:40 ` [Qemu-devel] [PATCH 6/6] ib700: port to vmstate Juan Quintela
5 siblings, 1 reply; 13+ messages in thread
From: Juan Quintela @ 2009-10-14 23:40 UTC (permalink / raw)
To: qemu-devel; +Cc: rjones
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/wdt_ib700.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/hw/wdt_ib700.c b/hw/wdt_ib700.c
index e598df5..d2b9b41 100644
--- a/hw/wdt_ib700.c
+++ b/hw/wdt_ib700.c
@@ -37,17 +37,18 @@
typedef struct IB700state {
ISADevice dev;
+ QEMUTimer *timer;
} IB700State;
/* This is the timer. We use a global here because the watchdog
* code ensures there is only one watchdog (it is located at a fixed,
* unchangable IO port, so there could only ever be one anyway).
*/
-static QEMUTimer *timer = NULL;
/* A write to this register enables the timer. */
static void ib700_write_enable_reg(void *vp, uint32_t addr, uint32_t data)
{
+ IB700State *s = vp;
static int time_map[] = {
30, 28, 26, 24, 22, 20, 18, 16,
14, 12, 10, 8, 6, 4, 2, 0
@@ -57,37 +58,45 @@ static void ib700_write_enable_reg(void *vp, uint32_t addr, uint32_t data)
ib700_debug("addr = %x, data = %x\n", addr, data);
timeout = (int64_t) time_map[data & 0xF] * get_ticks_per_sec();
- qemu_mod_timer(timer, qemu_get_clock (vm_clock) + timeout);
+ qemu_mod_timer(s->timer, qemu_get_clock (vm_clock) + timeout);
}
/* A write (of any value) to this register disables the timer. */
static void ib700_write_disable_reg(void *vp, uint32_t addr, uint32_t data)
{
+ IB700State *s = vp;
+
ib700_debug("addr = %x, data = %x\n", addr, data);
- qemu_del_timer(timer);
+ qemu_del_timer(s->timer);
}
/* This is called when the watchdog expires. */
static void ib700_timer_expired(void *vp)
{
+ IB700State *s = vp;
+
ib700_debug("watchdog expired\n");
watchdog_perform_action();
- qemu_del_timer(timer);
+ qemu_del_timer(s->timer);
}
static void ib700_save(QEMUFile *f, void *vp)
{
- qemu_put_timer(f, timer);
+ IB700State *s = vp;
+
+ qemu_put_timer(f, s->timer);
}
static int ib700_load(QEMUFile *f, void *vp, int version)
{
+ IB700State *s = vp;
+
if (version != 0)
return -EINVAL;
- qemu_get_timer(f, timer);
+ qemu_get_timer(f, s->timer);
return 0;
}
@@ -96,7 +105,7 @@ static int wdt_ib700_init(ISADevice *dev)
{
IB700State *s = DO_UPCAST(IB700State, dev, dev);
- timer = qemu_new_timer(vm_clock, ib700_timer_expired, s);
+ s->timer = qemu_new_timer(vm_clock, ib700_timer_expired, s);
register_savevm("ib700_wdt", -1, 0, ib700_save, ib700_load, s);
register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, s);
register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, s);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] Re: [PATCH 5/6] ib700: move timer to IB700State
2009-10-14 23:40 ` [Qemu-devel] [PATCH 5/6] ib700: move timer to IB700State Juan Quintela
@ 2009-10-15 8:42 ` Richard W.M. Jones
0 siblings, 0 replies; 13+ messages in thread
From: Richard W.M. Jones @ 2009-10-15 8:42 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On Thu, Oct 15, 2009 at 01:40:01AM +0200, Juan Quintela wrote:
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
[...]
Simple clean-up, removes a global variable, and the fact that
the device registers a global port should ensure we can't have
more than one of them anyway.
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH 6/6] ib700: port to vmstate
2009-10-14 23:39 [Qemu-devel] [PATCH 0/6] Port of watchdogs to vmstate Juan Quintela
` (4 preceding siblings ...)
2009-10-14 23:40 ` [Qemu-devel] [PATCH 5/6] ib700: move timer to IB700State Juan Quintela
@ 2009-10-14 23:40 ` Juan Quintela
2009-10-15 8:43 ` [Qemu-devel] " Richard W.M. Jones
5 siblings, 1 reply; 13+ messages in thread
From: Juan Quintela @ 2009-10-14 23:40 UTC (permalink / raw)
To: qemu-devel; +Cc: rjones
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/wdt_ib700.c | 30 +++++++++++-------------------
1 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/hw/wdt_ib700.c b/hw/wdt_ib700.c
index d2b9b41..d67bf9e 100644
--- a/hw/wdt_ib700.c
+++ b/hw/wdt_ib700.c
@@ -82,31 +82,23 @@ static void ib700_timer_expired(void *vp)
qemu_del_timer(s->timer);
}
-static void ib700_save(QEMUFile *f, void *vp)
-{
- IB700State *s = vp;
-
- qemu_put_timer(f, s->timer);
-}
-
-static int ib700_load(QEMUFile *f, void *vp, int version)
-{
- IB700State *s = vp;
-
- if (version != 0)
- return -EINVAL;
-
- qemu_get_timer(f, s->timer);
-
- return 0;
-}
+static const VMStateDescription vmstate_ib700 = {
+ .name = "ib700_wdt",
+ .version_id = 0,
+ .minimum_version_id = 0,
+ .minimum_version_id_old = 0,
+ .fields = (VMStateField []) {
+ VMSTATE_TIMER(timer, IB700State),
+ VMSTATE_END_OF_LIST()
+ }
+};
static int wdt_ib700_init(ISADevice *dev)
{
IB700State *s = DO_UPCAST(IB700State, dev, dev);
s->timer = qemu_new_timer(vm_clock, ib700_timer_expired, s);
- register_savevm("ib700_wdt", -1, 0, ib700_save, ib700_load, s);
+ vmstate_register(-1, &vmstate_ib700, s);
register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, s);
register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, s);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] Re: [PATCH 6/6] ib700: port to vmstate
2009-10-14 23:40 ` [Qemu-devel] [PATCH 6/6] ib700: port to vmstate Juan Quintela
@ 2009-10-15 8:43 ` Richard W.M. Jones
0 siblings, 0 replies; 13+ messages in thread
From: Richard W.M. Jones @ 2009-10-15 8:43 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On Thu, Oct 15, 2009 at 01:40:02AM +0200, Juan Quintela wrote:
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
As for patch 1/6, as far as I understand the VMState API, this
looks like a simple, straightforward translation.
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
^ permalink raw reply [flat|nested] 13+ messages in thread