[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 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. It keeps logging:

[  360.652715] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d
[  360.652796] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d
[  360.652835] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d
[  360.652874] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d
[  360.652910] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d
[  360.652947] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d
[  360.652983] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d
[  360.653026] vif vif-1-0 (unregistered net_device): Page still
granted! Index: 9d

The domain can't be destroyed:

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

top shows the "xenwatch" process using 100% CPU and I have to reboot.

A work-around is to use:

  on_poweroff = 'preserve'


-- 
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®.