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

Re: [Xen-devel] questions on mem_sharing_op*'s and tools/tests/mem-sharing/memshrtool



On Thu, Jun 15, 2017 at 10:00 PM, Zhongze Liu <blackskygg@xxxxxxxxx> wrote:
> 2017-06-16 11:50 GMT+08:00 Zhongze Liu <blackskygg@xxxxxxxxx>:
>> Hi there,
>>
>> I was experimenting with the mem_sharing_op and I found a handy tool:
>> tools/tests/mem-sharing/memshrtool
>> I set up two bare metal x86_64 VMS running some simple code in 16-bit
>> real mode and I tried to share the first physical page among them. so
>>
>
> And both of them are hvms and have a memory of 32M.
>
>>
>> I use:
>>
>> "./memshrtool enable src_dom "
>> "./memshrtool enable dst_dom"
>> "./memshrtool nominate src_dom 0"
>>
>> And it failed with an "error executing xc_memshr_nominate_gfn(xch,
>> domid, gfn, &handle): Argument list too long "
>>
>> But when I changed the gfn from 0 to 1000, it succeeds. Is there any
>> restrition on the gfns to be shared?
>>
>
> and the minimum gfn for the call to succeed is 256.

Memory sharing only works on certain types of guest pages (see
http://xenbits.xen.org/hg/staging/xen-unstable.hg/file/dec449c24a0c/xen/include/asm-x86/p2m.h#l138).
Having guest pages which fail to nominate is thus normal. I would
guess that the first 256 pages are mapped either as mmio or simply as
a hole. Maybe someone with a bit more knowledge about HVM domain
construction can chime in why that is so.

Tamas

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

 


Rackspace

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