From: "Jan Beulich" Subject: [PATCH 2/3] x86: don't allow Dom0 access to the HT address range Date: Wed, 21 Aug 2013 07:37:27 +0100 Message-ID: <52147C4702000078000ED38F@nat28.tlf.novell.com> References: <5214784202000078000ED378@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part794A3237.1__=" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VC22u-00055Z-85 for xen-devel@lists.xenproject.org; Wed, 21 Aug 2013 06:37:32 +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. --=__Part794A3237.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 @@ -1126,6 +1126,10 @@ int __init construct_dom0( 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)); + /* HyperTransport range. */ + if ( boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_AMD ) + rc |=3D iomem_deny_access(dom0, paddr_to_pfn(0xfdULL << 32), + paddr_to_pfn((1ULL << 40) - 1)); =20 /* Remove access to E820_UNUSABLE I/O regions above 1MB. */ for ( i =3D 0; i < e820.nr_map; i++ ) --=__Part794A3237.1__= Content-Type: text/plain; name="x86-exclude-HT-range.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-exclude-HT-range.patch" x86: don't allow Dom0 access to the HT 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@@ -1126,6 +1126,10 @@ int __init = construct_dom0(=0A rc |=3D iomem_deny_access(dom0, paddr_to_pfn(MSI_ADD= R_BASE_LO),=0A paddr_to_pfn(MSI_ADDR_BASE_LO = +=0A MSI_ADDR_DEST_ID_MASK));=0A+ = /* HyperTransport range. */=0A+ if ( boot_cpu_data.x86_vendor =3D=3D = X86_VENDOR_AMD )=0A+ rc |=3D iomem_deny_access(dom0, paddr_to_pfn(0x= fdULL << 32),=0A+ paddr_to_pfn((1ULL << 40) = - 1));=0A =0A /* Remove access to E820_UNUSABLE I/O regions above 1MB. = */=0A for ( i =3D 0; i < e820.nr_map; i++ )=0A --=__Part794A3237.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 --=__Part794A3237.1__=--