12 Aug, 2008

1 commit

  • Using a simple page table thrashing program I measure a slight
    improvement. The program creates five processes. Each touches 1000
    pages then schedules the next process. We repeat this 1000 times. As
    lguest only caches 4 cr3 values, this rebuilds a lot of shadow page
    tables requiring virt->phys mappings.

    Before: 5.93 seconds
    After: 5.40 seconds

    (Counts of slow vs fastpath in this usage are 6092 and 2852462 respectively.)

    And more importantly for lguest, the code is simpler.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

28 Mar, 2008

1 commit


11 Mar, 2008

1 commit

  • Ahmed managed to crash the Host in release_pgd(), which cannot be a Guest
    bug, and indeed it wasn't.

    The bug was that handing a 0 as the address of the toplevel page table
    being manipulated can cause the lookup code in find_pgdir() to return
    an uninitialized cache entry (we shadow up to 4 top level page tables
    for each Guest).

    Commit 37cc8d7f963ba2deec29c9b68716944516a3244f introduced this
    behaviour in the Guest, uncovering the bug.

    The patch which he submitted (which removed the /4 from the index
    calculation) simply ensured that these high-indexed entries hit the
    early exit path of guest_set_pmd(). But you get lots of segfaults in
    guest userspace as the PMDs aren't being updated.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

10 Feb, 2008

1 commit

  • Beginning from commit 4138cc3418f5, ioremap_nocache() sets the _PAGE_PWT
    flag.

    Lguest doesn't accept a guest pte with a _PWT flag and reports a "bad
    page table entry" in that case.

    Accept guest _PAGE_PWT page table entries.

    Signed-off-by: Ahmed S. Darwish
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ahmed S. Darwish
     

30 Jan, 2008

8 commits


25 Oct, 2007

1 commit


23 Oct, 2007

5 commits

  • Jes complains that page table code still uses lgread_u32 even though
    it now uses general kernel pte types. The best thing to do is to
    generalize lgread_u32 and lgwrite_u32.

    This means we lose the efficiency of getuser(). We could potentially
    regain it if we used __copy_from_user instead of copy_from_user, but
    I'm not certain that our range check is equivalent to access_ok() on
    all platforms.

    Signed-off-by: Rusty Russell
    Acked-by: Jes Sorensen

    Rusty Russell
     
  • 1) This allows us to get alot closer to booting bzImages.

    2) It means we don't have to know page_offset.

    3) The Guest needs to modify the boot pagetables to create the
    PAGE_OFFSET mapping before jumping to C code.

    4) guest_pa() walks the page tables rather than using page_offset.

    5) We don't use page_offset to figure out whether to emulate: it was
    always kinda quesationable, and won't work for instructions done
    before remapping (bzImage unpacking in particular).

    6) We still want the kernel address for tlb flushing: have the initial
    hypercall give us that, too.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Signed-off-by: Rusty Russell

    Rusty Russell
     
  • This is my first step in the migration of page_tables.c to the kernel
    types and functions/macros (2.6.23-rc3). Seems to be working OK.

    Signed-off-by: Matias Zabaljauregui
    Signed-off-by: Rusty Russell

    Matias Zabaljauregui
     
  • In order to avoid problematic special linking of the Launcher, we give
    the Host an offset: this means we can use any memory region in the
    Launcher as Guest memory rather than insisting on mmap() at 0.

    The result is quite pleasing: a number of casts are replaced with
    simple additions.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

27 Jul, 2007

3 commits


20 Jul, 2007

1 commit

  • This is the code for the "lg.ko" module, which allows lguest guests to
    be launched.

    [akpm@linux-foundation.org: update for futex-new-private-futexes]
    [akpm@linux-foundation.org: build fix]
    [jmorris@namei.org: lguest: use hrtimers]
    [akpm@linux-foundation.org: x86_64 build fix]
    Signed-off-by: Rusty Russell
    Cc: Andi Kleen
    Cc: Eric Dumazet
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell