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-changelog

[Xen-changelog] Load kernel regs from virtual kernel regs at domain swit

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Load kernel regs from virtual kernel regs at domain switch (found by Kevin Tian)
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Nov 2005 11:56:06 +0000
Delivery-date: Tue, 08 Nov 2005 11:56:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID 4f83028380371149d9922130dde4022fdf2837ed
# Parent  aa81f4e44ca5e4eddb1b7a29f9a25ec46fa9d796
Load kernel regs from virtual kernel regs at domain switch (found by Kevin Tian)

diff -r aa81f4e44ca5 -r 4f8302838037 xen/arch/ia64/xen/process.c
--- a/xen/arch/ia64/xen/process.c       Mon Oct 31 23:27:38 2005
+++ b/xen/arch/ia64/xen/process.c       Tue Nov  1 04:07:56 2005
@@ -83,9 +83,8 @@
     if(VMX_DOMAIN(current)){
        vmx_load_all_rr(current);
     }else{
-           if (rr7 = load_region_regs(current)) {
-                   printk("schedule_tail: change to rr7 not yet 
implemented\n");
-       }
+           load_region_regs(current);
+            vcpu_load_kernel_regs(current);
     }
 }
 
diff -r aa81f4e44ca5 -r 4f8302838037 xen/arch/ia64/xen/regionreg.c
--- a/xen/arch/ia64/xen/regionreg.c     Mon Oct 31 23:27:38 2005
+++ b/xen/arch/ia64/xen/regionreg.c     Tue Nov  1 04:07:56 2005
@@ -341,23 +341,13 @@
 // rr7 (because we have to to assembly and physical mode
 // to change rr7).  If no change to rr7 is required, returns 0.
 //
-unsigned long load_region_regs(struct vcpu *v)
+void load_region_regs(struct vcpu *v)
 {
        unsigned long rr0, rr1,rr2, rr3, rr4, rr5, rr6, rr7;
        // TODO: These probably should be validated
        unsigned long bad = 0;
 
        if (VCPU(v,metaphysical_mode)) {
-               ia64_rr rrv;
-
-#if 0
-               rrv.rrval = 0;
-               rrv.rid = v->domain->arch.metaphysical_rr0;
-               rrv.ps = PAGE_SHIFT;
-               rrv.ve = 1;
-               rr0 = rrv.rrval;
-               set_rr_no_srlz(0x0000000000000000L, rr0);
-#endif
                rr0 = v->domain->arch.metaphysical_rr0;
                ia64_set_rr(0x0000000000000000L, rr0);
                ia64_srlz_d();
@@ -383,5 +373,4 @@
        if (bad) {
                panic_domain(0,"load_region_regs: can't set! bad=%lx\n",bad);
        }
-       return 0;
-}
+}
diff -r aa81f4e44ca5 -r 4f8302838037 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Mon Oct 31 23:27:38 2005
+++ b/xen/arch/ia64/xen/vcpu.c  Tue Nov  1 04:07:56 2005
@@ -134,6 +134,18 @@
 /**************************************************************************
  VCPU privileged application register access routines
 **************************************************************************/
+
+void vcpu_load_kernel_regs(VCPU *vcpu)
+{
+       ia64_set_kr(0, VCPU(vcpu, krs[0]));
+       ia64_set_kr(1, VCPU(vcpu, krs[1]));
+       ia64_set_kr(2, VCPU(vcpu, krs[2]));
+       ia64_set_kr(3, VCPU(vcpu, krs[3]));
+       ia64_set_kr(4, VCPU(vcpu, krs[4]));
+       ia64_set_kr(5, VCPU(vcpu, krs[5]));
+       ia64_set_kr(6, VCPU(vcpu, krs[6]));
+       ia64_set_kr(7, VCPU(vcpu, krs[7]));
+}
 
 IA64FAULT vcpu_set_ar(VCPU *vcpu, UINT64 reg, UINT64 val)
 {
@@ -1872,4 +1884,3 @@
        // don't forget to recompute itr_regions
        return (IA64_ILLOP_FAULT);
 }
-
diff -r aa81f4e44ca5 -r 4f8302838037 xen/arch/ia64/xen/xenmisc.c
--- a/xen/arch/ia64/xen/xenmisc.c       Mon Oct 31 23:27:38 2005
+++ b/xen/arch/ia64/xen/xenmisc.c       Tue Nov  1 04:07:56 2005
@@ -320,6 +320,7 @@
                VHPT_ENABLED);
        if (!is_idle_task(current->domain)) {
                load_region_regs(current);
+               vcpu_load_kernel_regs(current);
                    if (vcpu_timer_expired(current)) vcpu_pend_timer(current);
        }
            if (vcpu_timer_expired(current)) vcpu_pend_timer(current);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Load kernel regs from virtual kernel regs at domain switch (found by Kevin Tian), Xen patchbot -unstable <=