From: "Jan Beulich" Subject: Re: [RFC PATCH 1/3] xen/hvm-save: Refactor HVM_REGISTER_SAVE_RESTORE Date: Mon, 16 Dec 2013 09:33:03 +0000 Message-ID: <52AED6DF020000780010D891@nat28.tlf.novell.com> References: <1387160259-9638-1-git-send-email-andrew.cooper3@citrix.com> <1387160259-9638-2-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VsUY0-0006wn-F4 for xen-devel@lists.xenproject.org; Mon, 16 Dec 2013 09:33:08 +0000 In-Reply-To: <1387160259-9638-2-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: George Dunlap , xen-devel , Keir Fraser , Don Slutz List-Id: xen-devel@lists.xenproject.org >>> On 16.12.13 at 03:17, Andrew Cooper wrote: > The instance id in a save record served two purposes. For a PER_VCPU record, > it was the VCPU id while for a PER_DOM it was just an index. > > As the number of instances needs to be stored to help fix hvm_save_one() > later > in this series, refactor HVM_REGISTER_SAVE_RESTORE to simplify the interface > and prevent the buggy case of registering a PER_VCPU record with multiple > instances. The 'kind' can now be inferred from the number of instances. > > There is now HVM_REGISTER_SAVE_RESTORE_PER_DOM() and > HVM_REGISTER_SAVE_RESTORE_PER_VCPU() which both take fewer arguments, and > only > PER_DOM() allows setting a number of instances. > > There is no observable change as a result of this patch. I think this is removing flexibilty (even if not needed by current code) is that it disallows multiple instances of per-vCPU records. After all the current "instance == vCPU-ID" implication is a per-save-type one, not one baked into the interface. Jan