From: Keir Fraser Subject: Re: Guest-vs-Host MTRR/PAT conflict and a crash? Date: Wed, 12 Dec 2007 23:02:48 +0000 Message-ID: References: <1a74a8410712121413g12f4d09dobef330bc8be1d98c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1a74a8410712121413g12f4d09dobef330bc8be1d98c@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: David Stone , Xen Developers List-Id: xen-devel@lists.xenproject.org On 12/12/07 22:13, "David Stone" wrote: > root@localhost xen]# (XEN) mtrr.c:552:d1 Conflict occurs for a given > guest l1e flags:63 at 10000000 (the effective mm type:6), because the > host mtrr type is:0 > (XEN) CPU 1: Machine Check Exception: 0000000000000005 > (XEN) Bank 0: b200004000000800 > (XEN) Bank 5: b200121020080400 > (XEN) > (XEN) **************************************** > (XEN) Panic on CPU 1: > (XEN) CPU context corrupt**************************************** > (XEN) > (XEN) Reboot in five seconds.. That looks like the CPU toasted itself. Bits 0-16 == 0x0400 in a machine-check status register means 'CPU internal timer error'. Perhaps this #MC means something else in the context of VT-d though? We probably need someone from Intel to help decode what happened here. > I guess my question is can someone give a higher-level explaination of > how MTRR/PAT is supposed to work between Xen (the real MTRRs and real > PATs in the real ("shadow") PTEs) and an HVM DomU (virtual MTRRs and > fake PATs in the fake PTEs)? You pretty much described it yourself. It tries to pick a shadow-pte PAT value which, coupled with the physical MTRR value for that physical address, will give the same cache attribute as the guest virtual PAT/MTRR combination. If it can't find a match (not entirely unlikely I suspect) then we print a warning and fall back to UC. This code is quite 'fresh' and definitely open for changes based on real-world testing. -- Keir