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

Re: [Xen-devel] [RFC Design Doc] Add vNVDIMM support for Xen



On 03/02/16 15:22, Stefano Stabellini wrote:
> On Wed, 3 Feb 2016, George Dunlap wrote:
>> On 03/02/16 12:02, Stefano Stabellini wrote:
>>> On Wed, 3 Feb 2016, Haozhong Zhang wrote:
>>>> Or, we can make a file system on /dev/pmem0, create files on it, set
>>>> the owner of those files to xen-qemuuser-domid$domid, and then pass
>>>> those files to QEMU. In this way, non-root QEMU should be able to
>>>> mmap those files.
>>>
>>> Maybe that would work. Worth adding it to the design, I would like to
>>> read more details on it.
>>>
>>> Also note that QEMU initially runs as root but drops privileges to
>>> xen-qemuuser-domid$domid before the guest is started. Initially QEMU
>>> *could* mmap /dev/pmem0 while is still running as root, but then it
>>> wouldn't work for any devices that need to be mmap'ed at run time
>>> (hotplug scenario).
>>
>> This is basically the same problem we have for a bunch of other things,
>> right?  Having xl open a file and then pass it via qmp to qemu should
>> work in theory, right?
> 
> Is there one /dev/pmem? per assignable region? Otherwise it wouldn't be
> safe.

If I understood Haozhong's description right, you'd be passing through
the entirety of one thing that Linux gave you.  At the moment that'sone
/dev/pmemX, which at the moment corresponds to one region as specified
in the ACPI tables.  I understood his design going forward to mean that
it would rely on Linux to do any further partitioning within regions if
that was desired; in which case there would again be a single file that
qemu would have access to.

 -George

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