From: "Jan Beulich" Subject: [PATCH 1/2] x86/tboot: invalidate FIX_TBOOT_MAP_ADDRESS mapping after use Date: Wed, 18 Feb 2015 09:03:10 +0000 Message-ID: <54E4635E0200007800060EE1@mail.emea.novell.com> References: <54E461B50200007800060ED5@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartD3E66E5E.2__=" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YO0XL-0007KS-RZ for xen-devel@lists.xenproject.org; Wed, 18 Feb 2015 09:03:15 +0000 In-Reply-To: <54E461B50200007800060ED5@mail.emea.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: Andrew Cooper , Joseph Cihula , Gang Wei , Shane Wang 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. --=__PartD3E66E5E.2__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline In order for commit cbeeaa7d ("x86/nmi: fix shootdown of pcpus running in VMX non-root mode")'s re-use of that fixmap entry to not cause undesirable (in crash context) cross-CPU TLB flushes, invalidate the fixmap entry right after use. Signed-off-by: Jan Beulich --- a/xen/arch/x86/tboot.c +++ b/xen/arch/x86/tboot.c @@ -138,6 +138,7 @@ void __init tboot_probe(void) TXT_PUB_CONFIG_REGS_BASE + TXTCR_SINIT_BASE); tboot_copy_memory((unsigned char *)&sinit_size, sizeof(sinit_size), TXT_PUB_CONFIG_REGS_BASE + TXTCR_SINIT_SIZE); + __set_fixmap(FIX_TBOOT_MAP_ADDRESS, 0, 0); } =20 /* definitions from xen/drivers/passthrough/vtd/iommu.h @@ -476,6 +477,8 @@ int __init tboot_parse_dmar_table(acpi_t dmar_table_raw =3D xmalloc_array(unsigned char, dmar_table_length); tboot_copy_memory(dmar_table_raw, dmar_table_length, pa); dmar_table =3D (struct acpi_table_header *)dmar_table_raw; + __set_fixmap(FIX_TBOOT_MAP_ADDRESS, 0, 0); + rc =3D dmar_handler(dmar_table); xfree(dmar_table_raw); =20 --=__PartD3E66E5E.2__= Content-Type: text/plain; name="x86-tboot-invalidate.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-tboot-invalidate.patch" x86/tboot: invalidate FIX_TBOOT_MAP_ADDRESS mapping after use=0A=0AIn = order for commit cbeeaa7d ("x86/nmi: fix shootdown of pcpus=0Arunning in = VMX non-root mode")'s re-use of that fixmap entry to not=0Acause undesirabl= e (in crash context) cross-CPU TLB flushes, invalidate=0Athe fixmap entry = right after use.=0A=0ASigned-off-by: Jan Beulich =0A=0A-= -- a/xen/arch/x86/tboot.c=0A+++ b/xen/arch/x86/tboot.c=0A@@ -138,6 +138,7 = @@ void __init tboot_probe(void)=0A TXT_PUB_CONFIG_RE= GS_BASE + TXTCR_SINIT_BASE);=0A tboot_copy_memory((unsigned char = *)&sinit_size, sizeof(sinit_size),=0A TXT_PUB_CONFIG_= REGS_BASE + TXTCR_SINIT_SIZE);=0A+ __set_fixmap(FIX_TBOOT_MAP_ADDRESS, = 0, 0);=0A }=0A =0A /* definitions from xen/drivers/passthrough/vtd/iommu.h= =0A@@ -476,6 +477,8 @@ int __init tboot_parse_dmar_table(acpi_t=0A = dmar_table_raw =3D xmalloc_array(unsigned char, dmar_table_length);=0A = tboot_copy_memory(dmar_table_raw, dmar_table_length, pa);=0A dmar_table= =3D (struct acpi_table_header *)dmar_table_raw;=0A+ __set_fixmap(FIX_TB= OOT_MAP_ADDRESS, 0, 0);=0A+=0A rc =3D dmar_handler(dmar_table);=0A = xfree(dmar_table_raw);=0A =0A --=__PartD3E66E5E.2__= 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 --=__PartD3E66E5E.2__=--