xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Leonard <talex5@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Julien Grall <julien.grall@citrix.com>,
	Julien Grall <julien.grall@linaro.org>,
	Wei Liu <wei.liu2@citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH v3 0/3] map grant refs at pfn = mfn
Date: Wed, 6 Aug 2014 15:04:40 +0100	[thread overview]
Message-ID: <CAG4opy_pgpihacVX21KUO6z2cboGa9nRTS34r_WvZXOxnNDdbg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1408061445440.2293@kaball.uk.xensource.com>

On 6 August 2014 14:46, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> On Wed, 6 Aug 2014, Thomas Leonard wrote:
>> On 6 August 2014 14:35, Stefano Stabellini
>> <stefano.stabellini@eu.citrix.com> wrote:
>> > On Wed, 6 Aug 2014, Thomas Leonard wrote:
>> >> On 1 August 2014 19:12, Thomas Leonard <talex5@gmail.com> wrote:
>> >> > On 1 August 2014 18:16, Stefano Stabellini
>> >> > <stefano.stabellini@eu.citrix.com> wrote:
>> >> >> On Fri, 1 Aug 2014, Thomas Leonard wrote:
>> >> >>> On 1 August 2014 18:01, Stefano Stabellini
>> >> >>> <stefano.stabellini@eu.citrix.com> wrote:
>> >> >>> > On Fri, 1 Aug 2014, Thomas Leonard wrote:
>> >> >>> >> On 1 August 2014 17:25, Stefano Stabellini
>> >> >>> >> <stefano.stabellini@eu.citrix.com> wrote:
>> >> >>> >> > On Fri, 1 Aug 2014, Julien Grall wrote:
>> >> >>> >> >> On 01/08/14 17:16, Thomas Leonard wrote:
>> >> >>> >> >> > On 1 August 2014 16:13, Stefano Stabellini
>> >> >>> >> >> > <stefano.stabellini@eu.citrix.com> wrote:
>> >> >>> >> >> > > On Fri, 1 Aug 2014, Thomas Leonard wrote:
>> >> >>> >> >> > > > On 24/07/14 14:30, Stefano Stabellini wrote:
>> >> >>> >> >> > > > > Hi all,
>> >> >>> >> >> > > > > this patch series introduces a second p2m mapping of grant reference
>> >> >>> >> >> > > > > on
>> >> >>> >> >> > > > > ARM at guest physical address == machine address of the grant ref.  It
>> >> >>> >> >> > > > > is safe because dom0 is already mapped 1:1. We export
>> >> >>> >> >> > > > > XENFEAT_grant_map_identity to signal the guest that this second p2m
>> >> >>> >> >> > > > > mapping is
>> >> >>> >> >> > > > > available.
>> >> >>> >> >> > > > >
>> >> >>> >> >> > > > > One reason for wanting the second p2m mapping is to avoid tracking mfn
>> >> >>> >> >> > > > > to pfn mappings in the guest kernel. Since the same mfn can be granted
>> >> >>> >> >> > > > > multiple times to the backend, finding the right pfn corresponding to
>> >> >>> >> >> > > > > a
>> >> >>> >> >> > > > > given mfn can be difficult and expensive. Providing a second mapping
>> >> >>> >> >> > > > > at
>> >> >>> >> >> > > > > a known address allow the kernel to access the page without knowing
>> >> >>> >> >> > > > > the
>> >> >>> >> >> > > > > pfn.
>> >> >>> >> >> > > >
>> >> >>> >> >> > > > Is there a version of these patches for Xen 4.4 that I can test? The
>> >> >>> >> >> > > > restriction on duplicate pages is causing trouble for networking on
>> >> >>> >> >> > > > Mirage too
>> >> >>> >> >> > > > (http://roscidus.com/blog/blog/2014/07/28/my-first-unikernel/#tcp-retransmissions).
>> >> [...]
>> >> >> Checkout the branch grant_map_identity_4.4_2
>> >> >
>> >> > Thanks - it's working now!
>> >>
>> >> Update: if my VM uses the network and then exits quickly, dom0 gets
>> >> stuck.
>> >
>> > What do you mean by exit quickly? xl destroy domain?
>>
>> The guest starts, sends a few packets and then exits (possibly before
>> the packets have been transmitted). This happens before "xl create"
>> manages to attach to the console.
>
> I haven't seen anything like this and I cannot reproduce the issue on
> unstable.

Here's a test case (tested on stable-4.4 with your patches:
https://github.com/talex5/xen/commits/stable-4.4):

$ wget http://test.roscidus.com/static/breaks.xen

$ cat > breaks.xl << EOF
name = 'breaks'
kernel = 'breaks.xen'
builder = 'linux'
memory = 256
on_crash = 'preserve'
vif = [ 'mac=c0:ff:ee:c0:ff:ee,bridge=br0' ]
EOF

$ sudo xl create -c breaks.xl
Parsing config from breaks.xl
xenconsole: Could not read tty from store: No such file or directory
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: console
child [0] exited with error status 2

$ sudo xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   512     2     r-----     335.1
(null)                                       8     0     1     --ps-d       0.1


> What if you delay the network initialization within the guest to a bit
> later?

Yes, it's fine with a delay before using the network.


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

  reply	other threads:[~2014-08-06 14:04 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 13:30 [PATCH v3 0/3] map grant refs at pfn = mfn Stefano Stabellini
2014-07-24 13:31 ` [PATCH v3 1/3] xen/x86: introduce is_domain_direct_mapped(d) as (0) on x86 Stefano Stabellini
2014-07-24 13:41   ` Julien Grall
2014-07-24 16:51     ` Stefano Stabellini
2014-07-24 13:31 ` [PATCH v3 2/3] xen: introduce arch_grant_(un)map_page_identity Stefano Stabellini
2014-07-24 13:42   ` Jan Beulich
2014-07-24 16:55     ` Stefano Stabellini
2014-07-24 13:44   ` Julien Grall
2014-07-24 16:57     ` Stefano Stabellini
2014-07-24 16:59       ` Julien Grall
2014-07-24 13:31 ` [PATCH v3 3/3] xen/arm: introduce XENFEAT_grant_map_identity Stefano Stabellini
2014-07-24 13:41   ` Jan Beulich
2014-07-24 14:10     ` Stefano Stabellini
2014-07-24 14:43       ` Jan Beulich
2014-07-24 14:47         ` Julien Grall
2014-07-24 15:02           ` Stefano Stabellini
2014-07-24 15:17             ` Julien Grall
2014-07-24 17:15               ` Stefano Stabellini
2014-07-24 13:50   ` Julien Grall
2014-07-24 14:14     ` Stefano Stabellini
2014-07-24 14:51       ` Julien Grall
2014-08-01 12:35 ` [PATCH v3 0/3] map grant refs at pfn = mfn Thomas Leonard
2014-08-01 12:37 ` Thomas Leonard
2014-08-01 15:13   ` Stefano Stabellini
2014-08-01 16:16     ` Thomas Leonard
2014-08-01 16:21       ` Julien Grall
2014-08-01 16:25         ` Stefano Stabellini
2014-08-01 16:56           ` Thomas Leonard
2014-08-01 17:01             ` Stefano Stabellini
2014-08-01 17:04               ` Thomas Leonard
2014-08-01 17:16                 ` Stefano Stabellini
2014-08-01 18:12                   ` Thomas Leonard
2014-08-06 11:22                     ` Thomas Leonard
2014-08-06 13:35                       ` Stefano Stabellini
2014-08-06 13:39                         ` Thomas Leonard
2014-08-06 13:46                           ` Stefano Stabellini
2014-08-06 14:04                             ` Thomas Leonard [this message]
2014-08-06 14:14                               ` Stefano Stabellini
2014-08-06 14:19                                 ` Thomas Leonard
2014-08-06 14:27                                   ` Stefano Stabellini
2014-08-06 14:53                                     ` Thomas Leonard
2014-08-06 15:59                                       ` Wei Liu
2014-08-06 17:50                                         ` Thomas Leonard
2014-08-06 20:46                                           ` Wei Liu
2014-08-07  7:59                                             ` Thomas Leonard
2014-08-07 10:40                                               ` Wei Liu
2014-08-07 11:19                                                 ` Thomas Leonard
2014-08-06 14:24                                 ` Thomas Leonard
2014-08-06 14:11                           ` Wei Liu

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=CAG4opy_pgpihacVX21KUO6z2cboGa9nRTS34r_WvZXOxnNDdbg@mail.gmail.com \
    --to=talex5@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).