From: "Jan Beulich" Subject: Re: [PATCH v2] VMX: don't allow PVH to reach handle_mmio() Date: Wed, 10 Dec 2014 09:07:33 +0000 Message-ID: <54881B65020000780004E733@mail.emea.novell.com> References: <54857995020000780004DA2D@mail.emea.novell.com> <54872B02.50300@citrix.com> <54873D3D020000780004E3D4@mail.emea.novell.com> <54873645.9070204@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 1XydFA-0002Kl-JN for xen-devel@lists.xenproject.org; Wed, 10 Dec 2014 09:07:36 +0000 In-Reply-To: <54873645.9070204@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: xen-devel , Kevin Tian , Eddie Dong , JunNakajima List-Id: xen-devel@lists.xenproject.org >>> On 09.12.14 at 18:49, wrote: > El 09/12/14 a les 18.19, Jan Beulich ha escrit: >>>>> On 09.12.14 at 18:01, wrote: >>> For 4.6 I think we need to start using a different hvm_io_bitmap for PVH >>> Dom0 that allows direct access to the IO ports, bypassing the vmexit and >>> simplifying the code in Xen (this would also fix INS/OUTS). Still not >>> sure what should be done for PVH DomUs, specially when PVH gains support >>> for pci-passthrough. >> >> With the difficulty being that for PV the hypervisor intentionally >> intercepts accesses to some of the ports, so we can't blindly >> allow PVH access to all the ports its allowed access to. > > I assume this is mainly for DomUs but not for Dom0? Or should PVH Dom0 > access to the IO space also be filtered and emulated for some ports? It should indeed - just look at guest_io_read() and guest_io_write(). I.e. an eventual PVH specific bitmap would need to be populated based on what admin_io_okay() returns (instead of ioports_access_permitted()), carefully taking into consideration the possible access widths. Jan