All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arne Mejlholm <mejlholm@cs.aau.dk>
To: xen-devel@lists.xensource.com
Subject: Odd mapping behavior with map_pages_to_xen
Date: Thu, 16 Mar 2006 15:24:29 +0100	[thread overview]
Message-ID: <4419751D.1070404@cs.aau.dk> (raw)

Dear all,

I'm experiencing some odd behavior when using the map_pages_to_xen 
function in arch/x86/mm.c.

The set up is as follows:

1. I allocate an entire page and get its virtual address.
2. For each machine frame number (mfn) I map the mfn onto the virtual 
address acquired in step 1.
        a. I read the contents of the page.
        b. If softirqs are pending, exit and do_softirq(); else continue 
with next mfn.

most of the time this procedure works just fine, but once in a while I 
get odd results. In one iteration all the
pages are reported to contain only zeros. This of course cannot be true.

Perhaps it should be noted that step 2 is carried out from within the 
idle_loop. Although it seems safe to
exploit this idle state, could there be some assumptions that does not 
hold? Could it be that for reasons not
evident to me, mapping pages into Xen during this idle time, is a bad 
idea and not safe?

About mapping pages into Xen, if I understand it correctly, Xen's 64MB 
address space is mapped into every
page table for every process in every domain, so the virtual address 
allocated in step 1 should be accessible
in any context. Is this not the case?

Furthermore there seems to be a direct connection with whether the tls 
libraries are disabled or not. When they are not
disabled, the odd results seems to occur more frequently.

Thank you in advance,
Arne Mejlholm

             reply	other threads:[~2006-03-16 14:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16 14:24 Arne Mejlholm [this message]
2006-03-16 14:53 ` Odd mapping behavior with map_pages_to_xen Keir Fraser
2006-03-16 19:05   ` Arne Mejlholm
2006-03-17  8:47     ` Keir Fraser

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=4419751D.1070404@cs.aau.dk \
    --to=mejlholm@cs.aau.dk \
    --cc=xen-devel@lists.xensource.com \
    /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.