From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKpFx-000058-UJ for qemu-devel@nongnu.org; Thu, 30 Jul 2015 10:56:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKpFu-0002N6-3p for qemu-devel@nongnu.org; Thu, 30 Jul 2015 10:56:25 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:58131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKpFt-0002MB-Gt for qemu-devel@nongnu.org; Thu, 30 Jul 2015 10:56:22 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 Jul 2015 00:56:18 +1000 From: Bharata B Rao Date: Thu, 30 Jul 2015 20:25:15 +0530 Message-Id: <1438268115-25273-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH] spapr: Provide an error message when migration fails due to htab_shift mismatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aik@ozlabs.ru, Bharata B Rao , qemu-ppc@nongnu.org, agraf@suse.de, david@gibson.dropbear.id.au 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 --- 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