From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions Date: Fri, 23 Jan 2015 10:04:45 -0500 Message-ID: <20150123150445.GJ7365@l.oracle.com> References: <1421939963-22182-1-git-send-email-roger.pau@citrix.com> <1421939963-22182-3-git-send-email-roger.pau@citrix.com> <20150122202824.GD5813@l.oracle.com> <54C23CB70200007800058B17@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YEfn3-0005eN-NJ for xen-devel@lists.xenproject.org; Fri, 23 Jan 2015 15:04:53 +0000 Content-Disposition: inline In-Reply-To: <54C23CB70200007800058B17@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , xen-devel@lists.xenproject.org, Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On Fri, Jan 23, 2015 at 11:21:11AM +0000, Jan Beulich wrote: > >>> On 22.01.15 at 21:28, wrote: > > On Thu, Jan 22, 2015 at 04:19:22PM +0100, Roger Pau Monne wrote: > >> Check that MMIO regions added to PVH Dom0 are allowed. Previously a PVH Dom0 > >> would have access to the full MMIO range. > > > > How do we do this for normal PV dom0? Do we enforce the same > > restriction? > > We do, at the MMU level at least. Thing is (see an earlier > reply, maybe on Elena's thread) that we may still be too lax. Looking at vtd_set_hwdom_mapping looks to be having quite simplified mechanism for PV. This is of course for those weird devices that do DMA operations behind the OS'es back. If we go that route we would probablly need logic in there to change too - otherwise we have .. Ah, this is where Tim's idea of having a guest just having an flag of 'I_need_IOMMU' would be so nice and having only one code-path that could be used for both PV and PVH. > > Jan >