From: "Jan Beulich" Subject: [PATCH 1/3] x86: don't allow Dom0 access to the MSI address range Date: Wed, 21 Aug 2013 07:36:58 +0100 Message-ID: <52147C2A02000078000ED38B@nat28.tlf.novell.com> References: <5214784202000078000ED378@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part54671F1A.1__=" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VC22R-000544-8v for xen-devel@lists.xenproject.org; Wed, 21 Aug 2013 06:37:03 +0000 In-Reply-To: <5214784202000078000ED378@nat28.tlf.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: xen-devel Cc: Keir Fraser , xiantao.zhang@intel.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part54671F1A.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline In particular, MMIO assignments should not be done using this area. Signed-off-by: Jan Beulich --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -1122,6 +1122,10 @@ int __init construct_dom0( if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn) ) rc |=3D iomem_deny_access(dom0, mfn, mfn); } + /* MSI range. */ + rc |=3D iomem_deny_access(dom0, paddr_to_pfn(MSI_ADDR_BASE_LO), + paddr_to_pfn(MSI_ADDR_BASE_LO + + MSI_ADDR_DEST_ID_MASK)); =20 /* Remove access to E820_UNUSABLE I/O regions above 1MB. */ for ( i =3D 0; i < e820.nr_map; i++ ) --=__Part54671F1A.1__= Content-Type: text/plain; name="x86-exclude-MSI-range.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-exclude-MSI-range.patch" x86: don't allow Dom0 access to the MSI address range=0A=0AIn particular, = MMIO assignments should not be done using this area.=0A=0ASigned-off-by: = Jan Beulich =0A=0A--- a/xen/arch/x86/domain_build.c=0A++= + b/xen/arch/x86/domain_build.c=0A@@ -1122,6 +1122,10 @@ int __init = construct_dom0(=0A if ( !rangeset_contains_singleton(mmio_ro_ranges= , mfn) )=0A rc |=3D iomem_deny_access(dom0, mfn, mfn);=0A = }=0A+ /* MSI range. */=0A+ rc |=3D iomem_deny_access(dom0, paddr_to_p= fn(MSI_ADDR_BASE_LO),=0A+ paddr_to_pfn(MSI_ADDR_= BASE_LO +=0A+ MSI_ADDR_DEST_ID_MASK= ));=0A =0A /* Remove access to E820_UNUSABLE I/O regions above 1MB. = */=0A for ( i =3D 0; i < e820.nr_map; i++ )=0A --=__Part54671F1A.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part54671F1A.1__=--