* [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table
@ 2017-12-05 12:27 Laurent Vivier
2017-12-05 12:44 ` Dr. David Alan Gilbert
2017-12-05 19:48 ` Greg Kurz
0 siblings, 2 replies; 5+ messages in thread
From: Laurent Vivier @ 2017-12-05 12:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, David Gibson, Bharata B Rao, Juan Quintela,
Dr . David Alan Gilbert, Greg Kurz, Laurent Vivier
Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
the HTAB migration stream contains a header set to "-1", meaning there
is no HPT. Teach analyze-migration.py to ignore the section in this case.
Without this fix, the script fails with a dump from a POWER9 guest:
Traceback (most recent call last):
File "./qemu/scripts/analyze-migration.py", line 602, in <module>
dump.read(dump_memory = args.memory)
File "./qemu/scripts/analyze-migration.py", line 539, in read
section.read()
File "./qemu/scripts/analyze-migration.py", line 250, in read
self.file.readvar(n_valid * self.HASH_PTE_SIZE_64)
File "./qemu/scripts/analyze-migration.py", line 64, in readvar
raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell()))
Exception: Unexpected end of migrate.dump at 0x1d4763ba
Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
scripts/analyze-migration.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
index 14553876a2..88ff4adb30 100755
--- a/scripts/analyze-migration.py
+++ b/scripts/analyze-migration.py
@@ -234,6 +234,10 @@ class HTABSection(object):
header = self.file.read32()
+ if (header == -1):
+ # "no HPT" encoding
+ return
+
if (header > 0):
# First section, just the hash shift
return
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table
2017-12-05 12:27 [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table Laurent Vivier
@ 2017-12-05 12:44 ` Dr. David Alan Gilbert
2017-12-05 13:04 ` David Gibson
2017-12-05 19:48 ` Greg Kurz
1 sibling, 1 reply; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2017-12-05 12:44 UTC (permalink / raw)
To: Laurent Vivier
Cc: qemu-devel, qemu-ppc, David Gibson, Bharata B Rao, Juan Quintela,
Greg Kurz
* Laurent Vivier (lvivier@redhat.com) wrote:
> Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> the HTAB migration stream contains a header set to "-1", meaning there
> is no HPT. Teach analyze-migration.py to ignore the section in this case.
>
> Without this fix, the script fails with a dump from a POWER9 guest:
>
> Traceback (most recent call last):
> File "./qemu/scripts/analyze-migration.py", line 602, in <module>
> dump.read(dump_memory = args.memory)
> File "./qemu/scripts/analyze-migration.py", line 539, in read
> section.read()
> File "./qemu/scripts/analyze-migration.py", line 250, in read
> self.file.readvar(n_valid * self.HASH_PTE_SIZE_64)
> File "./qemu/scripts/analyze-migration.py", line 64, in readvar
> raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell()))
> Exception: Unexpected end of migrate.dump at 0x1d4763ba
>
> Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> scripts/analyze-migration.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
> index 14553876a2..88ff4adb30 100755
> --- a/scripts/analyze-migration.py
> +++ b/scripts/analyze-migration.py
> @@ -234,6 +234,10 @@ class HTABSection(object):
>
> header = self.file.read32()
>
> + if (header == -1):
> + # "no HPT" encoding
> + return
> +
> if (header > 0):
> # First section, just the hash shift
> return
> --
> 2.14.3
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table
2017-12-05 12:44 ` Dr. David Alan Gilbert
@ 2017-12-05 13:04 ` David Gibson
2017-12-05 13:14 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: David Gibson @ 2017-12-05 13:04 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: Laurent Vivier, qemu-devel, qemu-ppc, Bharata B Rao,
Juan Quintela, Greg Kurz
[-- Attachment #1: Type: text/plain, Size: 2159 bytes --]
On Tue, Dec 05, 2017 at 12:44:40PM +0000, Dr. David Alan Gilbert wrote:
> * Laurent Vivier (lvivier@redhat.com) wrote:
> > Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> > the HTAB migration stream contains a header set to "-1", meaning there
> > is no HPT. Teach analyze-migration.py to ignore the section in this case.
> >
> > Without this fix, the script fails with a dump from a POWER9 guest:
> >
> > Traceback (most recent call last):
> > File "./qemu/scripts/analyze-migration.py", line 602, in <module>
> > dump.read(dump_memory = args.memory)
> > File "./qemu/scripts/analyze-migration.py", line 539, in read
> > section.read()
> > File "./qemu/scripts/analyze-migration.py", line 250, in read
> > self.file.readvar(n_valid * self.HASH_PTE_SIZE_64)
> > File "./qemu/scripts/analyze-migration.py", line 64, in readvar
> > raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell()))
> > Exception: Unexpected end of migrate.dump at 0x1d4763ba
> >
> > Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> > Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Should I queue this (for 2.12), or do you want to take it via the
migration tree?
>
> > ---
> > scripts/analyze-migration.py | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
> > index 14553876a2..88ff4adb30 100755
> > --- a/scripts/analyze-migration.py
> > +++ b/scripts/analyze-migration.py
> > @@ -234,6 +234,10 @@ class HTABSection(object):
> >
> > header = self.file.read32()
> >
> > + if (header == -1):
> > + # "no HPT" encoding
> > + return
> > +
> > if (header > 0):
> > # First section, just the hash shift
> > return
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table
2017-12-05 13:04 ` David Gibson
@ 2017-12-05 13:14 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2017-12-05 13:14 UTC (permalink / raw)
To: David Gibson
Cc: Laurent Vivier, qemu-devel, qemu-ppc, Bharata B Rao,
Juan Quintela, Greg Kurz
* David Gibson (david@gibson.dropbear.id.au) wrote:
> On Tue, Dec 05, 2017 at 12:44:40PM +0000, Dr. David Alan Gilbert wrote:
> > * Laurent Vivier (lvivier@redhat.com) wrote:
> > > Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> > > the HTAB migration stream contains a header set to "-1", meaning there
> > > is no HPT. Teach analyze-migration.py to ignore the section in this case.
> > >
> > > Without this fix, the script fails with a dump from a POWER9 guest:
> > >
> > > Traceback (most recent call last):
> > > File "./qemu/scripts/analyze-migration.py", line 602, in <module>
> > > dump.read(dump_memory = args.memory)
> > > File "./qemu/scripts/analyze-migration.py", line 539, in read
> > > section.read()
> > > File "./qemu/scripts/analyze-migration.py", line 250, in read
> > > self.file.readvar(n_valid * self.HASH_PTE_SIZE_64)
> > > File "./qemu/scripts/analyze-migration.py", line 64, in readvar
> > > raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell()))
> > > Exception: Unexpected end of migrate.dump at 0x1d4763ba
> > >
> > > Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> > > Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> >
> > Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>
> Should I queue this (for 2.12), or do you want to take it via the
> migration tree?
We can take it via migration.
Dave
> >
> > > ---
> > > scripts/analyze-migration.py | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
> > > index 14553876a2..88ff4adb30 100755
> > > --- a/scripts/analyze-migration.py
> > > +++ b/scripts/analyze-migration.py
> > > @@ -234,6 +234,10 @@ class HTABSection(object):
> > >
> > > header = self.file.read32()
> > >
> > > + if (header == -1):
> > > + # "no HPT" encoding
> > > + return
> > > +
> > > if (header > 0):
> > > # First section, just the hash shift
> > > return
>
> --
> David Gibson | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
> | _way_ _around_!
> http://www.ozlabs.org/~dgibson
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table
2017-12-05 12:27 [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table Laurent Vivier
2017-12-05 12:44 ` Dr. David Alan Gilbert
@ 2017-12-05 19:48 ` Greg Kurz
1 sibling, 0 replies; 5+ messages in thread
From: Greg Kurz @ 2017-12-05 19:48 UTC (permalink / raw)
To: Laurent Vivier
Cc: qemu-devel, qemu-ppc, David Gibson, Bharata B Rao, Juan Quintela,
Dr . David Alan Gilbert
On Tue, 5 Dec 2017 13:27:40 +0100
Laurent Vivier <lvivier@redhat.com> wrote:
> Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> the HTAB migration stream contains a header set to "-1", meaning there
> is no HPT. Teach analyze-migration.py to ignore the section in this case.
>
> Without this fix, the script fails with a dump from a POWER9 guest:
>
> Traceback (most recent call last):
> File "./qemu/scripts/analyze-migration.py", line 602, in <module>
> dump.read(dump_memory = args.memory)
> File "./qemu/scripts/analyze-migration.py", line 539, in read
> section.read()
> File "./qemu/scripts/analyze-migration.py", line 250, in read
> self.file.readvar(n_valid * self.HASH_PTE_SIZE_64)
> File "./qemu/scripts/analyze-migration.py", line 64, in readvar
> raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell()))
> Exception: Unexpected end of migrate.dump at 0x1d4763ba
>
> Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
Reviewed-by: Greg Kurz <groug@kaod.org>
> scripts/analyze-migration.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
> index 14553876a2..88ff4adb30 100755
> --- a/scripts/analyze-migration.py
> +++ b/scripts/analyze-migration.py
> @@ -234,6 +234,10 @@ class HTABSection(object):
>
> header = self.file.read32()
>
> + if (header == -1):
> + # "no HPT" encoding
> + return
> +
> if (header > 0):
> # First section, just the hash shift
> return
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-05 19:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-05 12:27 [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table Laurent Vivier
2017-12-05 12:44 ` Dr. David Alan Gilbert
2017-12-05 13:04 ` David Gibson
2017-12-05 13:14 ` Dr. David Alan Gilbert
2017-12-05 19:48 ` Greg Kurz
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.