From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Quintela Subject: Re: [PATCH 0/6] Save state error handling (kill off no_migrate) Date: Tue, 16 Nov 2010 11:23:43 +0100 Message-ID: References: <20101006204546.32127.70109.stgit@s20.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, cam@cs.ualberta.ca, kvm@vger.kernel.org To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48100 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932571Ab0KPKX6 (ORCPT ); Tue, 16 Nov 2010 05:23:58 -0500 In-Reply-To: <20101006204546.32127.70109.stgit@s20.home> (Alex Williamson's message of "Wed, 06 Oct 2010 14:58:57 -0600") Sender: kvm-owner@vger.kernel.org List-ID: Alex Williamson wrote: > Our code paths for saving or migrating a VM are full of functions that > return void, leaving no opportunity for a device to cancel a migration, > either from error or incompatibility. The ivshmem driver attempted to > solve this with a no_migrate flag on the save state entry. I think the > more generic and flexible way to solve this is to allow driver save > functions to fail. This series implements that and converts ivshmem > to uses a set_params function to NAK migration much earlier in the > processes. This touches a lot of files, but bulk of those changes are > simply s/void/int/ and tacking a "return 0" to the end of functions. > Thanks, > > Alex > Reviewed-by: Juan Quintela Just to address some of mst concerns: - no_migrate was wrong from the beggining. We have enough setup to disable tihngs. - I did save handlers that didn't return any error because they dind't have it when I started, it would have been way better if I had done it the other way around. I was going to need this change done _anyways_, didn't start for there because there were other things to fix. - we really need to be able to return errors in save paths: * ihvm device, it can migrate some times, and no others (we can discuss the details) * device assignment: we can't migrate, and we need a way to say so. * if we want reliable migration & machine definitions, we are going to have to implement device versions at some point. This clearly requires failure of save migration (i.e. we ask to save a device with version n-1 (or without some subsection) and it finds that this would breaks. So I woh Later, Juan. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40315 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIIhZ-0002HK-Ru for qemu-devel@nongnu.org; Tue, 16 Nov 2010 05:23:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIIhY-000778-Ml for qemu-devel@nongnu.org; Tue, 16 Nov 2010 05:23:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIIhY-000773-FR for qemu-devel@nongnu.org; Tue, 16 Nov 2010 05:23:48 -0500 From: Juan Quintela In-Reply-To: <20101006204546.32127.70109.stgit@s20.home> (Alex Williamson's message of "Wed, 06 Oct 2010 14:58:57 -0600") Message-ID: References: <20101006204546.32127.70109.stgit@s20.home> Date: Tue, 16 Nov 2010 11:23:43 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 0/6] Save state error handling (kill off no_migrate) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: cam@cs.ualberta.ca, qemu-devel@nongnu.org, kvm@vger.kernel.org Alex Williamson wrote: > Our code paths for saving or migrating a VM are full of functions that > return void, leaving no opportunity for a device to cancel a migration, > either from error or incompatibility. The ivshmem driver attempted to > solve this with a no_migrate flag on the save state entry. I think the > more generic and flexible way to solve this is to allow driver save > functions to fail. This series implements that and converts ivshmem > to uses a set_params function to NAK migration much earlier in the > processes. This touches a lot of files, but bulk of those changes are > simply s/void/int/ and tacking a "return 0" to the end of functions. > Thanks, > > Alex > Reviewed-by: Juan Quintela Just to address some of mst concerns: - no_migrate was wrong from the beggining. We have enough setup to disable tihngs. - I did save handlers that didn't return any error because they dind't have it when I started, it would have been way better if I had done it the other way around. I was going to need this change done _anyways_, didn't start for there because there were other things to fix. - we really need to be able to return errors in save paths: * ihvm device, it can migrate some times, and no others (we can discuss the details) * device assignment: we can't migrate, and we need a way to say so. * if we want reliable migration & machine definitions, we are going to have to implement device versions at some point. This clearly requires failure of save migration (i.e. we ask to save a device with version n-1 (or without some subsection) and it finds that this would breaks. So I woh Later, Juan.