[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 0/3] map grant refs at pfn = mfn



On Wed, 6 Aug 2014, Thomas Leonard wrote:
> On 6 August 2014 15:14, Stefano Stabellini
> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> > On Wed, 6 Aug 2014, Thomas Leonard wrote:
> >> On 6 August 2014 14:46, Stefano Stabellini
> >> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> >> > On Wed, 6 Aug 2014, Thomas Leonard wrote:
> >> >> On 6 August 2014 14:35, Stefano Stabellini
> >> >> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> >> >> > On Wed, 6 Aug 2014, Thomas Leonard wrote:
> >> >> >> On 1 August 2014 19:12, Thomas Leonard <talex5@xxxxxxxxx> wrote:
> >> >> >> > On 1 August 2014 18:16, Stefano Stabellini
> >> >> >> > <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> >> >> >> >> On Fri, 1 Aug 2014, Thomas Leonard wrote:
> >> >> >> >>> On 1 August 2014 18:01, Stefano Stabellini
> >> >> >> >>> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> >> >> >> >>> > On Fri, 1 Aug 2014, Thomas Leonard wrote:
> >> >> >> >>> >> On 1 August 2014 17:25, Stefano Stabellini
> >> >> >> >>> >> <stefano.stabellini@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> 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
> >
> > I cannot repro the issue even using "breaks.xen" as guest kernel.
> > What dom0 kernel are you using?
> 
> It's Linux 3.16-rc7, plus your patches:
> 
>   https://github.com/talex5/linux/commits/master

I realize that it's a bit old, but would you be able to test with a 3.14
dom0? I am asking because 3.14 doesn't need my patches to work properly,
so that would rule them out. You could also remove the corresponding Xen
series.



> I'm testing on a CubieTruck, using this SD card image (includes
> patched Linux and Xen):
> 
>   http://blobs.openmirage.org/cubietruck-xen-iso.tar.bz2
> 
> And yes, it's a Mirage unikernel.
> 
> >> $ 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.
> >
> > Very interesting.
> 
> 
> 
> 
> -- 
> 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
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.