From owner-freebsd-virtualization@FreeBSD.ORG Tue Apr 2 09:37:43 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 77DC5904 for ; Tue, 2 Apr 2013 09:37:43 +0000 (UTC) (envelope-from syuu@dokukino.com) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx1.freebsd.org (Postfix) with ESMTP id 4F5763F7 for ; Tue, 2 Apr 2013 09:37:43 +0000 (UTC) Received: by mail-pb0-f46.google.com with SMTP id rp8so144529pbb.33 for ; Tue, 02 Apr 2013 02:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dokukino.com; s=google; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=w3PIW5whRk1kAkDPRR96lAPGDXj9xglC03r3q+i1NtU=; b=dJNYSwkQjlU8xJBXX1N80oPxHyRUapwJXwPcVXLGCvqWa3nvtGml/jeacssf8roJkj Ild8Pv4ukzuyw6MdgXBoYPL1Ve7ErE6hkcQVzud7MogCwbl5vXFokbw9cEmpoqLxBQ4U OO8yw7A+y/lL4iwEhjvVy41uoDSlUUseCdEDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=w3PIW5whRk1kAkDPRR96lAPGDXj9xglC03r3q+i1NtU=; b=pjWAO97kpLPLNkbHgLb36RiKPLHugp6TGh8I0mTJWGsEIPDwD3TVRr31974riu59k2 JlbDJI1aXefhYQDGAqsbs0JnZqpWXoEmlfMHotx8s2eBrPy6VQajqSx6hGVSzPiErToH v9H573gmX60OOVdbEgaBmkBMgUCt9qwEuQ0NC+LQQk4ztRT4oxeG961ARvgBeekgd6bK UAQi6UqVL1E2TlckDVRZ7TvZsp5aNixKELcbvMCoByntqSiRAq8bAOm85tvwMhUqubFU A+Zi7QxbXIpL1SwtirO/NOkEVDXMMZBA60VeeCK5j2vw+citXboDogM2Gt2gIQq9GDAw i/+Q== MIME-Version: 1.0 X-Received: by 10.66.19.201 with SMTP id h9mr23661304pae.188.1364895456982; Tue, 02 Apr 2013 02:37:36 -0700 (PDT) Received: by 10.68.243.41 with HTTP; Tue, 2 Apr 2013 02:37:36 -0700 (PDT) In-Reply-To: References: Date: Tue, 2 Apr 2013 18:37:36 +0900 Message-ID: Subject: Re: suspend/resume on BHyVe From: Takuya ASADA To: Iori YONEJI X-Gm-Message-State: ALoCoQkal0YwdI3in4Lz6ESdqE4BuaMWUJVhYBUKeLZE33dZ6+VI1kNDGfEPnvuUk8NRGDiCWp36 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Tue, 02 Apr 2013 09:37:43 -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 And, AMD SVM's vmxctx will not have much difference than Intel's one, I guess. (VMCS/VMCB layout are differ, though. But it's different topic.) 2013=E5=B9=B44=E6=9C=882=E6=97=A5=E7=81=AB=E6=9B=9C=E6=97=A5 Iori YONEJI fi= vo.11235813@gmail.com: > Hi all, > > I couldn't spare much time to consider about this topic because I have > to move to new house, but now I'm OK. > > I'm implementing registers-save feature including: > 1. libvmmapi with get_vmxctx > 2. kernel supports of 1. > 3. user-land hack using 1, that saves registers and some > configurations into (possibly msgpack) binary file. > > But I noticed that vmxctx is depending on Intel VT-x, and we also need > to support AMD SVM, > so I need common struct registers. > > I heard about SVM support but it's not in my repository copy(Revision: > 248994), > how much do I have to care about AMD? >