All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Stecklina <der_julian@web.de>
To: xen-devel@lists.xensource.com
Subject: Mini-OS: new_pt_frame fails
Date: Thu, 08 Mar 2007 15:32:44 +0100	[thread overview]
Message-ID: <esp6qc$ofs$1@sea.gmane.org> (raw)

Hello,

as some might have read in my previous postings, I have a Mini-OS dom0
that constructs a Mini-OS domU on x86 xen-3.0.4-testing. As the memory
layout my Dom0 builds does not guarantee, that pages the DomU Mini-OS 
tries to
use as page tables are mapped to existing memory, I changed new_pt_frame
in arch/x86/mm.c in the following way:

The pt_pfn is mapped R/W, then it is zeroed by a memset(). After that it
is mapped with the correct protection flags and pinned. The problem is
that the first mapping fails:

Mapping memory range 0xc0400000 - 0xc1000000
MINI_OS(file=mm.c, line=68) Allocating new L1 pt frame for pt_pfn=36,
mfn=ca8, prev_l_mfn=cad, offset=301
(XEN) .../xen-3.0.4-testing.hg/xen/include/asm/mm.h:184:d1 Error pfn 0:
rd=ffbe8100, od=ffbf4100, caf=80000002, taf=e8000002
(XEN) mm.c:456:d1 Could not get page ref for pfn 0
(XEN) mm.c:2225:d1 Could not get page for normal update
New PT could not be mapped R/W.

Now I am puzzled what these hypervisor errors mean, and what I could 
have done wrong? The code in question is the following:

     mmu_updates[0].ptr = ((pgentry_t)tab[l2_table_offset(pt_page)] &
PAGE_MASK) +
                          sizeof(pgentry_t) * l1_table_offset(pt_page);
     mmu_updates[0].val = ((pgentry_t)pfn_to_mfn(*pt_pfn) << PAGE_SHIFT) 
| _PAGE_RW | _PAGE_PRESENT;
     if(HYPERVISOR_mmu_update(mmu_updates, 1, NULL, DOMID_SELF) < 0)
     {
          printk("New PT could not be mapped R/W.\n");
          do_exit();
     }


Any help is appreciated.

Regards,
Julian

             reply	other threads:[~2007-03-08 14:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 14:32 Julian Stecklina [this message]
2007-03-08 14:49 ` Mini-OS: new_pt_frame fails Keir Fraser
2007-03-08 16:54 ` Jacob Gorm Hansen
2007-03-14 11:19   ` Grzegorz Milos

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='esp6qc$ofs$1@sea.gmane.org' \
    --to=der_julian@web.de \
    --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.