From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: sources of freebsd with xen-4.2 kernel updates Date: Mon, 30 Dec 2013 13:53:01 +0100 Message-ID: <52C16CAD.4040009@citrix.com> References: <52C12A5D.3030409@citrix.com> <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.com> <52C15844.6050309@citrix.com> <3D73274A-8C14-49BF-8DF3-27CE840CC275@gmail.com> <20131230124221.GA14746@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20131230124221.GA14746@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu , Igor Kozhukhov Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 30/12/13 13:42, Wei Liu wrote: > On Mon, Dec 30, 2013 at 04:18:28PM +0400, Igor Kozhukhov wrote: >> >> On Dec 30, 2013, at 3:25 PM, Roger Pau Monn=E9 wrote: >> >>> On 30/12/13 11:57, Igor Kozhukhov wrote: >>>> Hi Roger, >>>> >>>> thanks for the link. >>>> I have the same/(similar the same) implementation on illumos(OpenSolar= is). >>>> >>>> do you have plans for grant table v1 & v2 implementation on FreeBSD ? >>> >>> Grant table v1 is the current implementation, and I don't have plans >>> currently to add support for v2 (cannot speak of others though). >>> >>> Linux has v2 implemented, but AFAIK there's no user of the new features >>> introduced by v2. Right now with v2 you just end up with less grants, >>> because v2 grants metadata use twice as much memory as v1 grants, and >>> the number of grant frames is limited by the hypervisor. >>> >> Thanks for your info. >> >> Could you please let me know - can we use v1 for PV and HVM guests ? >> I looked v2 implementation on Linux and found that v1 is using for HVM, = and v2 for PV - but maybe i'm wrong. >> > = > You can use V1 for all guests for sure. > = > My understanding is that the code in Linux's grant-table.c requests V2 > form the hypervisor, but it will fall back to using V1 if V2 is not > avaiable. Linux explicitly requests v1 when running as an HVM guest (I have no idea why), for the rest it tries v2 first and falls back to v1 if there's no v2 support: http://lxr.free-electrons.com/source/drivers/xen/grant-table.c#L1116 As Wei points out, you can safely use v1 for all kind of guests, at least on x86. Roger.