[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
  • 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;
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.