From: "Jan Beulich" Subject: Re: XenServer Xen-4.5 (-rc3ish) testing Date: Tue, 09 Dec 2014 08:57:05 +0000 Message-ID: <5486C771020000780004DFCD@mail.emea.novell.com> References: <5485F5F7.6040206@citrix.com> <20141208200034.GA3891@laptop.dumpdata.com> <54864081.6090606@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54864081.6090606@citrix.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: Andrew Cooper , Konrad Rzeszutek Wilk Cc: Xen-devel List List-Id: xen-devel@lists.xenproject.org >>> On 09.12.14 at 01:21, wrote: > On 08/12/2014 20:00, Konrad Rzeszutek Wilk wrote: >> On Mon, Dec 08, 2014 at 07:03:19PM +0000, Andrew Cooper wrote: >>> XEN_DOMCTL_memory_mapping hypercall fails with EPERM where it didn't in >>> xen-4.4, given identical parameters. The hypercall gained an extra >>> permission check as part of 0561e1f01e. Our usecase here is a daemon in >>> dom0 mapping guest RAM to emulate a graphics card, but I currently don't >>> see how that is incompatible with the new permissions check. >> I presume the daemon also does 'XEN_DOMCTL_iomem_permission' to grant >> the other domain access to its RAM? And before it makes the >> XEN_DOMCTL_memory_mapping hypercall. > > This is purely an implementer of the ioreq server infrastructure > providing an emulated set of BARs in the guest as qemu would, but > without using dom0 map-foreign powers. The gfn ranges in question are > regular guest RAM as far as I am aware, and should not require any > special io permissions. > > Either way, the identified changeset has apparently caused a regression, > but I am not yet certain whether it is legitimately disabling something > which should not have worked in the first place, or whether it is a > change which needs reconsidering. Actually I think this is still too lax: When we set up Dom0's iomem permissions, we blindly add all memory, when we should only add all I/O memory (or better, exclude all RAM). Iiuc such a change would similarly break your daemon, without need for Arianna's. Jan