qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH] spapr: Provide an error message when migration fails due to htab_shift mismatch
@ 2015-07-30 14:55 Bharata B Rao
  2015-07-31  7:13 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Bharata B Rao @ 2015-07-30 14:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: aik, Bharata B Rao, qemu-ppc, agraf, david

Include an error message when migration fails due to mismatch in
htab_shift values at source and target. This should provide a bit more
verbose message in addition to the current migration failure message
that reads like:

qemu-system-ppc64: error while loading state for instance 0x0 of device 'spapr/htab'

After this patch, the failure message will look like this:

qemu-system-ppc64: htab_shift mismatch: source 29 target 24
qemu-system-ppc64: error while loading state for instance 0x0 of device 'spapr/htab'

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
Applies against spapr-next branch of David Gibson's tree.

 hw/ppc/spapr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index dfd808f..2dcab34 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1471,6 +1471,8 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id)
     if (section_hdr) {
         /* First section, just the hash shift */
         if (spapr->htab_shift != section_hdr) {
+            error_report("htab_shift mismatch: source %d target %d",
+                         section_hdr, spapr->htab_shift);
             return -EINVAL;
         }
         return 0;
-- 
2.1.0

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

* Re: [Qemu-devel] [RFC PATCH] spapr: Provide an error message when migration fails due to htab_shift mismatch
  2015-07-30 14:55 [Qemu-devel] [RFC PATCH] spapr: Provide an error message when migration fails due to htab_shift mismatch Bharata B Rao
@ 2015-07-31  7:13 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2015-07-31  7:13 UTC (permalink / raw)
  To: Bharata B Rao; +Cc: aik, qemu-ppc, qemu-devel, agraf

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

On Thu, Jul 30, 2015 at 08:25:15PM +0530, Bharata B Rao wrote:
> Include an error message when migration fails due to mismatch in
> htab_shift values at source and target. This should provide a bit more
> verbose message in addition to the current migration failure message
> that reads like:
> 
> qemu-system-ppc64: error while loading state for instance 0x0 of device 'spapr/htab'
> 
> After this patch, the failure message will look like this:
> 
> qemu-system-ppc64: htab_shift mismatch: source 29 target 24
> qemu-system-ppc64: error while loading state for instance 0x0 of device 'spapr/htab'
> 
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>

I've applied this to spapr-next and a new spapr-fix tree (intended for
fixes which should go to the current feature-frozen qemu, not just the
next one).  It's certainly better than the current cryptic failure.

Longer term I think we need to work harder to try to get the hash
table size the same at both ends though - we should rearrange things
so we get the size from the migration stream and then use that to feed
the hint to the kernel allocation.

Sorry I haven't looked properly yet at the patch you sent which works
towards that.

-- 
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: Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-07-31  7:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 14:55 [Qemu-devel] [RFC PATCH] spapr: Provide an error message when migration fails due to htab_shift mismatch Bharata B Rao
2015-07-31  7:13 ` David Gibson

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).