qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6274] Fix TLB access (Jakub Jermar)
@ 2009-01-12 21:12 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2009-01-12 21:12 UTC (permalink / raw)
  To: qemu-devel

Revision: 6274
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6274
Author:   blueswir1
Date:     2009-01-12 21:12:22 +0000 (Mon, 12 Jan 2009)

Log Message:
-----------
Fix TLB access (Jakub Jermar)

Modified Paths:
--------------
    trunk/target-sparc/helper.c

Modified: trunk/target-sparc/helper.c
===================================================================
--- trunk/target-sparc/helper.c	2009-01-12 20:00:29 UTC (rev 6273)
+++ trunk/target-sparc/helper.c	2009-01-12 21:12:22 UTC (rev 6274)
@@ -402,12 +402,12 @@
             mask = 0xffffffffffc00000ULL;
             break;
         }
-        // ctx match, vaddr match?
+        // ctx match, vaddr match, valid?
         if (env->dmmuregs[1] == (env->dtlb_tag[i] & 0x1fff) &&
-            (address & mask) == (env->dtlb_tag[i] & ~0x1fffULL)) {
-            // valid, access ok?
-            if ((env->dtlb_tte[i] & 0x8000000000000000ULL) == 0 ||
-                ((env->dtlb_tte[i] & 0x4) && is_user) ||
+            (address & mask) == (env->dtlb_tag[i] & ~0x1fffULL) &&
+            (env->dtlb_tte[i] & 0x8000000000000000ULL)) {
+            // access ok?
+            if (((env->dtlb_tte[i] & 0x4) && is_user) ||
                 (!(env->dtlb_tte[i] & 0x2) && (rw == 1))) {
                 if (env->dmmuregs[3]) /* Fault status register */
                     env->dmmuregs[3] = 2; /* overflow (not read before
@@ -465,12 +465,12 @@
             mask = 0xffffffffffc00000ULL;
                 break;
         }
-        // ctx match, vaddr match?
+        // ctx match, vaddr match, valid?
         if (env->dmmuregs[1] == (env->itlb_tag[i] & 0x1fff) &&
-            (address & mask) == (env->itlb_tag[i] & ~0x1fffULL)) {
-            // valid, access ok?
-            if ((env->itlb_tte[i] & 0x8000000000000000ULL) == 0 ||
-                ((env->itlb_tte[i] & 0x4) && is_user)) {
+            (address & mask) == (env->itlb_tag[i] & ~0x1fffULL) &&
+            (env->itlb_tte[i] & 0x8000000000000000ULL)) {
+            // access ok?
+            if ((env->itlb_tte[i] & 0x4) && is_user) {
                 if (env->immuregs[3]) /* Fault status register */
                     env->immuregs[3] = 2; /* overflow (not read before
                                              another fault) */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-12 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 21:12 [Qemu-devel] [6274] Fix TLB access (Jakub Jermar) Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).