All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Igor Kozhukhov <ikozhukhov@gmail.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: sources of freebsd with xen-4.2 kernel updates
Date: Mon, 30 Dec 2013 09:52:43 -0500	[thread overview]
Message-ID: <20131230145243.GA14189@phenom.dumpdata.com> (raw)
In-Reply-To: <52C16CAD.4040009@citrix.com>

On Mon, Dec 30, 2013 at 01:53:01PM +0100, Roger Pau Monné 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é 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.
> >>
> > 
> > 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 <konrad.wilk@oracle.com>
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 0000000000000400
    IP: [<ffffffff81375ae9>] 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:[<ffffffff81375ae9>]  [<ffffffff81375ae9>] 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:0000000000000000
    ...

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

  reply	other threads:[~2013-12-30 14:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-29 17:54 sources of freebsd with xen-4.2 kernel updates Igor Kozhukhov
2013-12-30  8:10 ` Roger Pau Monné
2013-12-30 10:57   ` Igor Kozhukhov
2013-12-30 11:25     ` Roger Pau Monné
2013-12-30 12:18       ` Igor Kozhukhov
2013-12-30 12:42         ` Wei Liu
2013-12-30 12:53           ` Roger Pau Monné
2013-12-30 14:52             ` Konrad Rzeszutek Wilk [this message]
2013-12-30 12:59       ` Igor Kozhukhov
2013-12-30 14:53         ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131230145243.GA14189@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=ikozhukhov@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.