From: "Jan Beulich" Subject: Re: [PATCH v15 14/19] pvh: Use PV handlers for PIO Date: Tue, 12 Nov 2013 14:33:44 +0000 Message-ID: <52824A5802000078001026C8@nat28.tlf.novell.com> References: <1384181841-22739-1-git-send-email-george.dunlap@eu.citrix.com> <1384181841-22739-15-git-send-email-george.dunlap@eu.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 1VgF2L-0008UV-26 for xen-devel@lists.xenproject.org; Tue, 12 Nov 2013 14:33:49 +0000 In-Reply-To: <1384181841-22739-15-git-send-email-george.dunlap@eu.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: George Dunlap Cc: Keir Fraser , Tim Deegan , Eddie Dong , Jun Nakajima , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 11.11.13 at 15:57, George Dunlap wrote: > @@ -566,7 +581,10 @@ int hvm_domain_initialise(struct domain *d) > d->arch.hvm_domain.io_handler->num_slot = 0; > > if ( is_pvh_domain(d) ) > + { > + register_portio_handler(d, 0, 0xffffffff, handle_pvh_io); Nice idea, but I'm afraid it'll need a little more than this long term (i.e. I'm fine for this to go is as is, with the second paragraph below address in some way): hvm_io_intercept() first tries dpci_ioport_intercept(), and without device model I think that's not correct. If indeed it isn't, a simple solution might be to just disallow the registration of translated I/O port ranges for PVH guests. The other thing here is the use of 0xffffffff: The parameter is a size one, not an end of range. And considering that we're talking about I/O ports, 0x10000 would seem to be the right value (or, if taking the potential wrapping into account, 0x10003). Jan