From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Kozhukhov Subject: sources of freebsd with xen-4.2 kernel updates Date: Sun, 29 Dec 2013 21:54:20 +0400 Message-ID: Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/mixed; boundary="===============7679726446515128088==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============7679726446515128088== Content-Type: multipart/alternative; boundary="Apple-Mail=_F5C6AA3E-99CB-4585-BB5A-0D999FF316B6" --Apple-Mail=_F5C6AA3E-99CB-4585-BB5A-0D999FF316B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi All, could you please help me try to find sources of FreeBSD with xen-4.x = kernel updates ? i'm interested in grant-table realization with v1 and v2. -- Best regards, Igor Kozhukhov --Apple-Mail=_F5C6AA3E-99CB-4585-BB5A-0D999FF316B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
--
Best regards,
Igor = Kozhukhov




= --Apple-Mail=_F5C6AA3E-99CB-4585-BB5A-0D999FF316B6-- --===============7679726446515128088== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7679726446515128088==-- 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 09:10:05 +0100 Message-ID: <52C12A5D.3030409@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Igor Kozhukhov , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 29/12/13 18:54, Igor Kozhukhov wrote: > Hi All, > > could you please help me try to find sources of FreeBSD with xen-4.x > kernel updates ? > i'm interested in grant-table realization with v1 and v2. Hello, You can find FreeBSD grant table related code here: http://svnweb.freebsd.org/base/head/sys/xen/gnttab.c?view=co It contains support for both HVM and PV guests, but only version 1. Roger. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Kozhukhov Subject: Re: sources of freebsd with xen-4.2 kernel updates Date: Mon, 30 Dec 2013 14:57:13 +0400 Message-ID: <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.com> References: <52C12A5D.3030409@citrix.com> Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <52C12A5D.3030409@citrix.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: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Roger, thanks for the link. I have the same/(similar the same) implementation on illumos(OpenSolaris). do you have plans for grant table v1 & v2 implementation on FreeBSD ? -- Best regards, Igor Kozhukhov On Dec 30, 2013, at 12:10 PM, Roger Pau Monn=E9 wrote: > On 29/12/13 18:54, Igor Kozhukhov wrote: >> Hi All, >> = >> could you please help me try to find sources of FreeBSD with xen-4.x >> kernel updates ? >> i'm interested in grant-table realization with v1 and v2. > = > Hello, > = > You can find FreeBSD grant table related code here: > = > http://svnweb.freebsd.org/base/head/sys/xen/gnttab.c?view=3Dco > = > It contains support for both HVM and PV guests, but only version 1. > = > Roger. > = 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 12:25:56 +0100 Message-ID: <52C15844.6050309@citrix.com> References: <52C12A5D.3030409@citrix.com> <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.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: Igor Kozhukhov Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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(OpenSolaris). > > 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. Roger. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Kozhukhov Subject: Re: sources of freebsd with xen-4.2 kernel updates Date: Mon, 30 Dec 2013 16:18:28 +0400 Message-ID: <3D73274A-8C14-49BF-8DF3-27CE840CC275@gmail.com> References: <52C12A5D.3030409@citrix.com> <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.com> <52C15844.6050309@citrix.com> Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <52C15844.6050309@citrix.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: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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(OpenSolaris= ). >> = >> 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. -Igor > Roger. > = From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: sources of freebsd with xen-4.2 kernel updates Date: Mon, 30 Dec 2013 12:42:21 +0000 Message-ID: <20131230124221.GA14746@zion.uk.xensource.com> References: <52C12A5D.3030409@citrix.com> <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.com> <52C15844.6050309@citrix.com> <3D73274A-8C14-49BF-8DF3-27CE840CC275@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <3D73274A-8C14-49BF-8DF3-27CE840CC275@gmail.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: Igor Kozhukhov Cc: xen-devel@lists.xen.org, wei.liu2@citrix.com, Roger Pau =?iso-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org 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, a= nd 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. Wei. > -Igor > = > > Roger. > > = > = > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Kozhukhov Subject: Re: sources of freebsd with xen-4.2 kernel updates Date: Mon, 30 Dec 2013 16:59:42 +0400 Message-ID: References: <52C12A5D.3030409@citrix.com> <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.com> <52C15844.6050309@citrix.com> Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <52C15844.6050309@citrix.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: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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(OpenSolaris= ). >> = >> 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. > = Thank you all for your info. I have just tested it and can see that PV and HVM guests are using V1 if V2= not implemented on dom0 - for example: on xen-3.4 hypervisor. well - my first step for xen-4.2 port to illumos based platform have progre= ss :) after updates xen-4.2 public headers with grant tables and some additional = changes, PV and HVM guests works on xen-3.4 dom0. i have DilOS(illumos based platform) with xen-3.4.5-pre1(latest updates on = 3.4) as dom0. i'm interested in xen-4.2 port with next updates to xen-4.4. -Igor > Roger. > = From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: sources of freebsd with xen-4.2 kernel updates Date: Mon, 30 Dec 2013 09:53:03 -0500 Message-ID: <20131230145303.GB14189@phenom.dumpdata.com> References: <52C12A5D.3030409@citrix.com> <6BFA750A-977E-4119-BC97-594754C42CE3@gmail.com> <52C15844.6050309@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Igor Kozhukhov Cc: xen-devel@lists.xen.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org On Mon, Dec 30, 2013 at 04:59:42PM +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. > > = > = > Thank you all for your info. > = > I have just tested it and can see that PV and HVM guests are using V1 if = V2 not implemented on dom0 - for example: on xen-3.4 hypervisor. > = > well - my first step for xen-4.2 port to illumos based platform have prog= ress :) Woot! > after updates xen-4.2 public headers with grant tables and some additiona= l changes, PV and HVM guests works on xen-3.4 dom0. > = > i have DilOS(illumos based platform) with xen-3.4.5-pre1(latest updates o= n 3.4) as dom0. > i'm interested in xen-4.2 port with next updates to xen-4.4. > = > -Igor > = > = > > Roger. > > = > = > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: sources of freebsd with xen-4.2 kernel updates Date: Mon, 30 Dec 2013 09:52:43 -0500 Message-ID: <20131230145243.GA14189@phenom.dumpdata.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> <52C16CAD.4040009@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <52C16CAD.4040009@citrix.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: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: Igor Kozhukhov , Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Dec 30, 2013 at 01:53:01PM +0100, Roger Pau Monn=E9 wrote: > 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(OpenSol= aris). > >>>> > >>>> 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 featur= es > >>> 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 B/c it did not have the code to support mapping of the status page: commit 69e8f430e243d657c2053f097efebc2e2cd559f0 Author: Konrad Rzeszutek Wilk Date: Wed Jan 25 00:13:20 2012 -0500 xen/granttable: Disable grant v2 for HVM domains. = As proper scaffolding for supporting error status is not yet implemented. = BUG: unable to handle kernel NULL pointer dereference at 00000000000004= 00 IP: [] gnttab_end_foreign_access_ref_v2+0x29/0x40 PGD 32aa3067 PUD 32a87067 PMD 0 Oops: 0000 [#1] PREEMPT SMP CPU 0 Modules linked in: sg sr_mod cdrom ata_generic ata_piix libata scsi_mod= xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillr cmd = Pid: 2307, comm: ip Not tainted 3.3.0-rc1 #1 Xen HVM domU RIP: 0010:[] [] gnttab_end_foreign= _access_ref_v2+0x29/0x40 RSP: 0018:ffff88003be03d38 EFLAGS: 00010206 RAX: 0000000000000000 RBX: ffff880033210640 RCX: 0000000000000040 RDX: 0000000000002000 RSI: 0000000000000000 RDI: 0000000000000200 RBP: ffff88003be03d38 R08: 0000000000000101 R09: 0000000000000000 R10: dead000000100100 R11: 0000000000000000 R12: ffff88003be03e48 R13: 0000000000000001 R14: ffff880039461c00 R15: 0000000000000200 FS: 00007fb1f84ec700(0000) GS:ffff88003be00000(0000) knlGS:00000000000= 00000 ... It should be implemented at some point.. but since there are no real users of V2 it is a the bottom of the pile of 'todo'. > 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. > = > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel