From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [RFC Design Doc] Add vNVDIMM support for Xen Date: Wed, 3 Feb 2016 10:35:09 -0500 Message-ID: <20160203153509.GF20732@char.us.oracle.com> References: <20160201054414.GA25211@hz-desktop.sh.intel.com> <20160203070052.GA4248@hz-desktop.sh.intel.com> <56B219D4.9030507@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Juergen Gross , Haozhong Zhang , Kevin Tian , Keir Fraser , Ian Campbell , George Dunlap , Andrew Cooper , Xiao Guangrong , Ian Jackson , George Dunlap , xen-devel@lists.xen.org, Jan Beulich , Jun Nakajima , Wei Liu List-Id: xen-devel@lists.xenproject.org On Wed, Feb 03, 2016 at 03:22:59PM +0000, 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. Can be - which may be interleaved on multiple NVDIMMs. But we would operate on files (on the /dev/pmem which has an DAX enabled filesystem).