qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script with radix table
Date: Tue, 5 Dec 2017 13:14:56 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

* David Gibson (address@hidden) wrote:
> On Tue, Dec 05, 2017 at 12:44:40PM +0000, Dr. David Alan Gilbert wrote:
> > * Laurent Vivier (address@hidden) 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 <address@hidden>
> > 
> > Reviewed-by: Dr. David Alan Gilbert <address@hidden>
> 
> 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 / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]