From owner-freebsd-virtualization@FreeBSD.ORG Wed Apr 3 16:34:49 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8E8AA203 for ; Wed, 3 Apr 2013 16:34:49 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 4BB0BEC7 for ; Wed, 3 Apr 2013 16:34:49 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 9417512299; Thu, 4 Apr 2013 02:34:41 +1000 (EST) Received: from vpn2ntap-731294.vpn.netapp.com (pos-ext.netapp.com [198.95.226.40]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BLE29008 (AUTH peterg@ptree32.com.au); Thu, 4 Apr 2013 02:34:39 +1000 Message-ID: <515C5A1B.5070903@freebsd.org> Date: Wed, 03 Apr 2013 10:34:35 -0600 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Takuya ASADA Subject: Re: suspend/resume on BHyVe References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 16:34:49 -0000 > You can dump whole struct just a binary array(don't look into it in your > program), and get sizeof(vmxctx) via ioctl return. It should enough to > suspend/resume. > Then if AMD SVM mode will have different values on the structure, your > implementation won't break. > > Does it make sense? > Peter, Neel I was thinking of something a bit more abstract. There shouldn't be any need to encode VMCS/SVM info in the save/restore state - that can be recreated on demand. For instance, bhyveload can pass off execution state to bhyve without having any knowledge of VMCS/SVM. You'd need to represent the entire CPU register state of the VM, memory, and also enough for the virtual devices to be able to resurrect state. Plus, there needs to be some versioning to allow suspend/resume between different revs of bhyve. later, Peter.