From: "Jan Beulich" Subject: Re: [PATCH v1 0/2] Extend ioreq-server to support page write protection Date: Mon, 04 Aug 2014 08:35:06 +0100 Message-ID: <53DF53CA0200007800028CF4@mail.emea.novell.com> References: <1406570127-3616-1-git-send-email-wei.ye@intel.com> <53D624E702000078000266BE@mail.emea.novell.com> <76A3A946BA26DE4F9D9D5090FFA4A649318AB1@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <76A3A946BA26DE4F9D9D5090FFA4A649318AB1@SHSMSX101.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Ye Cc: Kevin Tian , "keir@xen.org" , "ian.campbell@citrix.com" , "stefano.stabellini@eu.citrix.com" , "tim@xen.org" , "ian.jackson@eu.citrix.com" , "xen-devel@lists.xen.org" , "Paul.Durrant@citrix.com" , Zhiyuan Lv List-Id: xen-devel@lists.xenproject.org >>> On 04.08.14 at 07:05, wrote: > >> -----Original Message----- >> From: Jan Beulich [mailto:JBeulich@suse.com] >> Sent: Monday, July 28, 2014 4:25 PM >> To: Ye, Wei >> Cc: ian.campbell@citrix.com; Paul.Durrant@citrix.com; >> ian.jackson@eu.citrix.com; stefano.stabellini@eu.citrix.com; xen- >> devel@lists.xen.org; keir@xen.org >> Subject: Re: [PATCH v1 0/2] Extend ioreq-server to support page write >> protection >> >> >>> On 28.07.14 at 19:55, wrote: >> > ioreq-server is proposed to forward PIO and MMIO request to multiple >> > device models according to the io range. XenGT (Intel Graphics >> > Virtualization technology, please refer to >> > https://01.org/xen/blogs/srclarkx/2013/graphics-virtualization- >> > xengt) driver reside in Dom0 as a virtual graphics device model also >> > need to trap and emulate the guest's write operation to some specific >> > memory pages, like the memory pages used by guest graphics driver as >> > PPGTT(per-process graphics translation table). We add an new p2m type >> > "p2m_ram_wp" to trap the page write operation. Page of this new p2m >> > type is read only and for write, the request will go to device model >> > via ioreq-server. >> >> So how is this write-protection supposed to work on the IOMMU side when >> sharing page tables? > > Thanks for pointing out this question. Write-protection is not supposed to > work when sharing page tables between EPT and vt-d. > An explicit command line "iommu=no-sharept" should be setted for avoiding > undesirable iommu fault. Requiring the unconditional use of a specific command line option is certainly fine for experimental code, but not beyond that. Behavior should be correct by default in production code. But what's worse here: The option _allows_ device side writes from the guest. Why would device side writes be okay, but CPU side ones not? Jan