qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix ioapic vmstate
@ 2011-06-17  7:30 Pavel Dovgaluk
  2011-06-17 19:20 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Dovgaluk @ 2011-06-17  7:30 UTC (permalink / raw)
  To: 'qemu-devel'

  This patch fixes save/restore vmstate of IOAPIC.
  When irr member of IOAPICState is not saved and loaded,
restoring becomes non-deterministic, because irr is kept from
state of VM that was before loading.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>
---
 hw/ioapic.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/ioapic.c b/hw/ioapic.c
index 2109568..e583284 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -207,6 +207,7 @@ static const VMStateDescription vmstate_ioapic = {
     .fields      = (VMStateField []) {
         VMSTATE_UINT8(id, IOAPICState),
         VMSTATE_UINT8(ioregsel, IOAPICState),
+        VMSTATE_UINT32(irr, IOAPICState),
         VMSTATE_UINT64_ARRAY(ioredtbl, IOAPICState, IOAPIC_NUM_PINS),
         VMSTATE_END_OF_LIST()
     }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix ioapic vmstate
       [not found] <8199.95195274732$1308296048@news.gmane.org>
@ 2011-06-17  7:40 ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2011-06-17  7:40 UTC (permalink / raw)
  To: Pavel Dovgaluk; +Cc: 'qemu-devel'

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

On 2011-06-17 09:30, Pavel Dovgaluk wrote:
>   This patch fixes save/restore vmstate of IOAPIC.
>   When irr member of IOAPICState is not saved and loaded,
> restoring becomes non-deterministic, because irr is kept from
> state of VM that was before loading.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>
> ---
>  hw/ioapic.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/ioapic.c b/hw/ioapic.c
> index 2109568..e583284 100644
> --- a/hw/ioapic.c
> +++ b/hw/ioapic.c
> @@ -207,6 +207,7 @@ static const VMStateDescription vmstate_ioapic = {
>      .fields      = (VMStateField []) {
>          VMSTATE_UINT8(id, IOAPICState),
>          VMSTATE_UINT8(ioregsel, IOAPICState),
> +        VMSTATE_UINT32(irr, IOAPICState),
>          VMSTATE_UINT64_ARRAY(ioredtbl, IOAPICState, IOAPIC_NUM_PINS),
>          VMSTATE_END_OF_LIST()
>      }
> 

You are using an old qemu version. This was fixed via commit 35a74c5c59.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix ioapic vmstate
  2011-06-17  7:30 Pavel Dovgaluk
@ 2011-06-17 19:20 ` Andreas Färber
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Färber @ 2011-06-17 19:20 UTC (permalink / raw)
  To: Pavel Dovgaluk; +Cc: qemu-devel Developers, Juan Quintela

Am 17.06.2011 um 09:30 schrieb Pavel Dovgaluk:

>  This patch fixes save/restore vmstate of IOAPIC.
>  When irr member of IOAPICState is not saved and loaded,
> restoring becomes non-deterministic, because irr is kept from
> state of VM that was before loading.
>
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>
> ---
> hw/ioapic.c |    1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/hw/ioapic.c b/hw/ioapic.c
> index 2109568..e583284 100644
> --- a/hw/ioapic.c
> +++ b/hw/ioapic.c
> @@ -207,6 +207,7 @@ static const VMStateDescription vmstate_ioapic = {
>     .fields      = (VMStateField []) {
>         VMSTATE_UINT8(id, IOAPICState),
>         VMSTATE_UINT8(ioregsel, IOAPICState),
> +        VMSTATE_UINT32(irr, IOAPICState),
>         VMSTATE_UINT64_ARRAY(ioredtbl, IOAPICState, IOAPIC_NUM_PINS),
>         VMSTATE_END_OF_LIST()
>     }

You can't just add a field to VMState. Either the version_id must be  
incremented, or a subsection must be used.

Andreas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-17 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <8199.95195274732$1308296048@news.gmane.org>
2011-06-17  7:40 ` [Qemu-devel] [PATCH] Fix ioapic vmstate Jan Kiszka
2011-06-17  7:30 Pavel Dovgaluk
2011-06-17 19:20 ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).