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] [xen-unstable] [IA64] Fix and cleanup move to psr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix and cleanup move to psr
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Apr 2008 02:01:00 -0700
Delivery-date: Tue, 08 Apr 2008 02:02:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1206390352 21600
# Node ID dba5f548b8943b0e0b00925cf362633a3585de5d
# Parent  bcf06182b795eb39095e7aa32304577047aa1c59
[IA64] Fix and cleanup move to psr

We need to both set and clear bits

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 xen/arch/ia64/xen/vcpu.c |   76 ++++++++++++++++-------------------------------
 1 files changed, 27 insertions(+), 49 deletions(-)

diff -r bcf06182b795 -r dba5f548b894 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Mon Mar 24 13:10:05 2008 -0600
+++ b/xen/arch/ia64/xen/vcpu.c  Mon Mar 24 14:25:52 2008 -0600
@@ -454,63 +454,41 @@ IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u6
 
        newpsr = *(struct ia64_psr *)&val;
        ipsr = (struct ia64_psr *)&regs->cr_ipsr;
-       // just handle psr.up and psr.pp for now
-       //if (val & ~(IA64_PSR_PP | IA64_PSR_UP | IA64_PSR_SP))
-       //      return IA64_ILLOP_FAULT;
-       // however trying to set other bits can't be an error as it is in ssm
-       if (newpsr.dfh) {
-               ipsr->dfh = 1;
-               PSCB(vcpu, vpsr_dfh) = 1;
-       } else {
-               ipsr->dfh = PSCB(vcpu, hpsr_dfh);
-               PSCB(vcpu, vpsr_dfh) = 0;
-       }       
-       if (newpsr.dfl)
-               ipsr->dfl = 1;
-       if (newpsr.pp) {
-               // xenoprof:
-               // Don't change ipsr->pp 
-               // It is manipulated by xenoprof
-               // ipsr->pp = 1;
-               PSCB(vcpu, vpsr_pp) = 1;
-       } else {
-               // xenoprof:
-               // Don't change ipsr->pp 
-               // It is manipulated by xenoprof
-               // ipsr->pp = 1;
-               PSCB(vcpu, vpsr_pp) = 0;
-       }
-       if (newpsr.up)
-               ipsr->up = 1;
-       if (newpsr.sp)
-               ipsr->sp = 1;
-       if (newpsr.i) {
-               if (vcpu->vcpu_info->evtchn_upcall_mask)
-                       enabling_interrupts = 1;
-               vcpu->vcpu_info->evtchn_upcall_mask = 0;
-       }
-       if (newpsr.ic)
-               PSCB(vcpu, interrupt_collection_enabled) = 1;
-       if (newpsr.mfl)
-               ipsr->mfl = 1;
-       if (newpsr.mfh)
-               ipsr->mfh = 1;
-       if (newpsr.ac)
-               ipsr->ac = 1;
-       if (newpsr.dt && newpsr.rt)
-               vcpu_set_metaphysical_mode(vcpu, FALSE);
-       else
-               vcpu_set_metaphysical_mode(vcpu, TRUE);
-       if (newpsr.be)
-               ipsr->be = 1;
+
+       ipsr->be = newpsr.be;
+       ipsr->up = newpsr.up;
+       ipsr->ac = newpsr.ac;
+       ipsr->mfl = newpsr.mfl;
+       ipsr->mfh = newpsr.mfh;
+
+       PSCB(vcpu, interrupt_collection_enabled) = newpsr.ic;
+
+       if (newpsr.i && vcpu->vcpu_info->evtchn_upcall_mask)
+               enabling_interrupts = 1;
+
+       vcpu->vcpu_info->evtchn_upcall_mask = !(newpsr.i);
+
        if (newpsr.pk) {
                vcpu_pkr_set_psr_handling(vcpu);
                ipsr->pk = 1;
        } else
                vcpu_pkr_use_unset(vcpu);
+
+       vcpu_set_metaphysical_mode(vcpu, !(newpsr.dt && newpsr.rt));
+
+       ipsr->dfl = newpsr.dfl;
+       PSCB(vcpu, vpsr_dfh) = newpsr.dfh;
+       ipsr->dfh = newpsr.dfh ? 1 : PSCB(vcpu, hpsr_dfh);
+
+       ipsr->sp = newpsr.sp;
+
+       /* xenoprof: Don't change ipsr->pp, it is manipulated by xenoprof */
+       PSCB(vcpu, vpsr_pp) = newpsr.pp;
+
        if (enabling_interrupts &&
            vcpu_check_pending_interrupts(vcpu) != SPURIOUS_VECTOR)
                PSCB(vcpu, pending_interruption) = 1;
+
        return IA64_NO_FAULT;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Fix and cleanup move to psr, Xen patchbot-unstable <=