From: Wei Huang Subject: Question on QEMU and P2M Date: Tue, 23 Jun 2009 18:31:43 -0500 Message-ID: <4A4165DF.9000403@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "'xen-devel@lists.xensource.com'" , Keir Fraser List-Id: xen-devel@lists.xenproject.org I am facing a qemu-dm problem when setting up 1GB page table to P2M. Setting 1GB page table is very straight forward: just skip the last two levels of p2m table. While doing gfn_to_mfn translation, I have to check PSE bits in level 3 page table entry first. If this bit is 1, I calculate the target mfn and return immediately. Two gfn_to_mfn translation functions, p2m_gfn_to_mfn_current() and p2m_gfn_to_mfn(), are changed in this way. However, QEMU dm starts to function weirdly with this change. For instance, linux guest won't be able to locate hard disk because port IO access returns incorrect values. I couldn't control guest keyboard either. I am thinking that there are some Xen codes (related to qemu) which doesn't goes through gfn_to_mfn translation inside p2m.c. It might assume p2m table always has L2 P2M table and does fast translation. But I haven't found such areas yet. Any suggestion of suspicious code areas to look at? -Wei