From: "Jan Beulich" Subject: Re: [PATCH v5 2/3] xen: add the RTC io space to the blocked access list Date: Fri, 08 May 2015 13:09:20 +0100 Message-ID: <554CC39002000078000783AD@mail.emea.novell.com> References: <1431010459-20920-1-git-send-email-roger.pau@citrix.com> <1431010459-20920-3-git-send-email-roger.pau@citrix.com> <554CBF3B020000780007835D@mail.emea.novell.com> <554CA427.7050509@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yqh5k-00031H-HH for xen-devel@lists.xenproject.org; Fri, 08 May 2015 12:09:20 +0000 In-Reply-To: <554CA427.7050509@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: =?UTF-8?Q?Roger=20Pau=20Monn=C3=A9?= Cc: Andrew Cooper , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 08.05.15 at 13:55, wrote: > El 08/05/15 a les 13.50, Jan Beulich ha escrit: >>>>> On 07.05.15 at 16:54, wrote: >>> @@ -1548,6 +1549,8 @@ int __init construct_dom0( >>> rc |= ioports_deny_access(d, pmtmr_ioport, pmtmr_ioport + 3); >>> /* PCI configuration space (NB. 0xcf8 has special treatment). */ >>> rc |= ioports_deny_access(d, 0xcfc, 0xcff); >>> + /* Never permit direct access to the RTC/CMOS registers. */ >>> + rc |= ioports_deny_access(d, RTC_PORT(0), RTC_PORT(1)); >> >> Looks like I prematurely committed this: Did you test that Dom0 >> still can access CMOS/RTC with that change? I ask because the >> ioports_access_permitted() checks in guest_io_{read,write}() >> now ought to fail for Dom0... (Apart from that on second thought >> it looks wrong also conceptionally - we don't want to deny Dom0 >> access to these ports, we just don't want it to access them >> directly.) > > Yes, it looks like this needs to be reverted. I think we need to do > something similar to what I've done with 0xcf8; don't add the ports to > ioports_deny_access and just trap them for PVH in setup_io_bitmap. Right. Hence I'll ditch that v2 patch, awaiting a v3 doing both. Jan