From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] [Xen] Check FADT's signature Date: Fri, 10 Aug 2007 16:58:21 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1211217768==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefan Berger Cc: xen-devel , Jan Beulich List-Id: xen-devel@lists.xenproject.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --===============1211217768== Content-type: multipart/alternative; boundary="B_3269609902_25039046" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3269609902_25039046 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable So the bug could be either that the read is getting hoisted above the pagetable update (unlikely) or that there is a stale TLB entry (more likely). You could discount the first possibility by replacing your local_flush_tlb_pge() with mb() at the end of map_pages_to_xen(). If that does not fix the bug then the problem is not that the read is getting hoisted. The TLB handling looks correct though =8B if the modified PTE was not previously empty then we execute an INVLPG on that virtual address. Might b= e worth adding some tracing around there to see if the code thinks the PTE wa= s previously present, and hence whether the INVLPG actually gets executed? -- Keir On 10/8/07 16:35, "Stefan Berger" wrote: > Keir Fraser wrote on 08/10/2007 11:09:43 AM: >=20 >> > Not by my reading of the code, but your testing shows differently ;-) >> >=20 >> > Have you tried adding tracing to map_pages_to_xen()? That=B9s the guts >> > of the remapping code. >=20 > Now I did...=20 --B_3269609902_25039046 Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Re: [Xen-devel] [PATCH] [Xen] Check FADT's signature So th= e bug could be either that the read is getting hoisted above the pagetable u= pdate (unlikely) or that there is a stale TLB entry (more likely). You could= discount the first possibility by replacing your local_flush_tlb_pge() with= mb() at the end of map_pages_to_xen(). If that does not fix the bug then th= e problem is not that the read is getting hoisted.

The TLB handling looks correct though — if the modified PTE was not p= reviously empty then we execute an INVLPG on that virtual address. Might be = worth adding some tracing around there to see if the code thinks the PTE was= previously present, and hence whether the INVLPG actually gets executed?
 -- Keir

On 10/8/07 16:35, "Stefan Berger" <stefanb@us.ibm.com> wrot= e:

Keir Fraser <keir@xensource.com> wrote on 08/10/2007 11:09:43 AM:

> Not by my reading of the code, but your testing shows differently ;-)<= BR> >
> Have you tried adding tracing to map_pages_to_xen()? That’s the = guts
> of the remapping code.
<= BR>
Now I did...

--B_3269609902_25039046-- --===============1211217768== 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.xensource.com http://lists.xensource.com/xen-devel --===============1211217768==--