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] Fix read of guest psr to properly set dfh and other bits

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix read of guest psr to properly set dfh and other bits (by Matt Chapman)
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 20 Nov 2005 12:58:14 +0000
Delivery-date: Sun, 20 Nov 2005 12:59:30 +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 84f9bec4feaf996671eabd83694ea19a3bdbbaaf
# Parent  14393678d999399af2b63617f01b18ec83948ae8
Fix read of guest psr to properly set dfh and other bits (by Matt Chapman)

diff -r 14393678d999 -r 84f9bec4feaf xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Fri Nov 18 16:58:03 2005
+++ b/xen/arch/ia64/xen/vcpu.c  Fri Nov 18 17:04:58 2005
@@ -345,19 +345,17 @@
 
 IA64FAULT vcpu_get_psr(VCPU *vcpu, UINT64 *pval)
 {
-       UINT64 psr;
+       REGS *regs = vcpu_regs(vcpu);
        struct ia64_psr newpsr;
 
-       // TODO: This needs to return a "filtered" view of
-       // the psr, not the actual psr.  Probably the psr needs
-       // to be a field in regs (in addition to ipsr).
-       __asm__ __volatile ("mov %0=psr;;" : "=r"(psr) :: "memory");
-       newpsr = *(struct ia64_psr *)&psr;
+       newpsr = *(struct ia64_psr *)&regs->cr_ipsr;
        if (newpsr.cpl == 2) newpsr.cpl = 0;
        if (PSCB(vcpu,interrupt_delivery_enabled)) newpsr.i = 1;
        else newpsr.i = 0;
        if (PSCB(vcpu,interrupt_collection_enabled)) newpsr.ic = 1;
        else newpsr.ic = 0;
+       if (PSCB(vcpu,metaphysical_mode)) newpsr.dt = 0;
+       else newpsr.dt = 1;
 // FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?)
        if (PSCB(vcpu,tmp[8])) newpsr.pp = 1;
        else newpsr.pp = 0;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix read of guest psr to properly set dfh and other bits (by Matt Chapman), Xen patchbot -unstable <=