WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] Question: Special linux dom0 handling in vcpu_translate

To: Xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] Question: Special linux dom0 handling in vcpu_translate()
From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Jun 2007 09:09:12 +0200
Delivery-date: Thu, 21 Jun 2007 00:07:01 -0700
Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; b=KQmQ7mAc262VSeIba820H3GbYFsb3MNwM0NdxOf0tOGTkcMIaFdQUuKP/PMltn7NnRjV6xf1GP2evS6TTYSlC9h/XHlBabPgw7T3V2rVTjFI9QUsaRcNS8hEzQGanFa0;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
Hi,

in vcpu_translate I found some lines of code which seems to be an optimization 
for the linux dom0:

if (!(rr & RR_VE_MASK) || !(pta & IA64_PTA_VE)) {
                REGS *regs = vcpu_regs(vcpu);
                // NOTE: This is specific code for linux kernel
                // We assume region 7 is identity mapped
                if (region == 7 && ia64_psr(regs)->cpl == 2) {
                        pte.val = address & _PAGE_PPN_MASK;
                        pte.val = pte.val | pgprot_val(PAGE_KERNEL);
                        goto out;
                }
.....
out:
                *itir = rr & RR_PS_MASK;
                *pteval = pte.val;

This means, that on a page fault in ia64_do_page_fault() the function 
vcpu_translate() is called, which returns the pte/itir and an itc is done in 
the hypervisor without reflecting the trap to the domU.
I found this, because mini-os uses the same scheme. Now the hypervisor does 
the itc for mini-os with a linux kernel identity mapped pte!
In general this may leads to problems if other systems with similar region 
scheme are running on xen.
In particular I have here the problem that using protection keys for such 
addresses is impossible!
Is it possible to do this optimization for the linux kernel another way?
Thanks.

Dietmar

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel