All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Jermar <jakub@jermar.eu>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] sparc64's get_physical_address_code should not fault on TTE's with V=0
Date: Mon, 12 Jan 2009 21:53:15 +0100	[thread overview]
Message-ID: <496BADBB.6010109@jermar.eu> (raw)

Hi,

when I make the following change to helper.c, get_physical_address_code:

-        // 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) {

HelenOS gets a little bit further than without this change and seems
to panic more or less gracefully later.

In short, non-valid entries should be skipped by the loop in
get_physical_address_code instead of causing TFAULT, because
the ITLB can contain a valid entry for the same address. The
same is true for DTLB.

Can you confirm this?

Thanks,
Jakub

             reply	other threads:[~2009-01-12 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 20:53 Jakub Jermar [this message]
2009-01-12 21:10 ` [Qemu-devel] Re: sparc64's get_physical_address_code should not fault on TTE's with V=0 Blue Swirl
2009-01-12 22:03   ` Jakub Jermar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=496BADBB.6010109@jermar.eu \
    --to=jakub@jermar.eu \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.